Skip to content

Commit 7a73856

Browse files
committed
Update compiltest to use rustfix 0.3.1
1 parent e063518 commit 7a73856

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/Cargo.lock

+5-4
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ dependencies = [
402402
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
403403
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
404404
"regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
405-
"rustfix 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
405+
"rustfix 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
406406
"serde 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
407407
"serde_derive 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
408408
"serde_json 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2282,10 +2282,11 @@ dependencies = [
22822282

22832283
[[package]]
22842284
name = "rustfix"
2285-
version = "0.2.0"
2285+
version = "0.3.1"
22862286
source = "registry+https://github.com/rust-lang/crates.io-index"
22872287
dependencies = [
2288-
"quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
2288+
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
2289+
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
22892290
"serde 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
22902291
"serde_derive 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
22912292
"serde_json 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3145,7 +3146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
31453146
"checksum rustc-rayon-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d69983f8613a9c3ba1a3bbf5e8bdf2fd5c42317b1d8dd8623ca8030173bf8a6b"
31463147
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
31473148
"checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a"
3148-
"checksum rustfix 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "165a212dd11124d7070892da20f71d82970ef1d1dd41cd804b70f39740a21c85"
3149+
"checksum rustfix 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9da3cf9b79dc889a2c9879643f26d7a53e37e9361c7566b7d2787d5ace0d8396"
31493150
"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
31503151
"checksum schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "85fd9df495640643ad2d00443b3d78aae69802ad488debab4f1dd52fc1806ade"
31513152
"checksum scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8674d439c964889e2476f474a3bf198cc9e199e77499960893bac5de7e9218a4"

src/tools/compiletest/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ regex = "0.2"
1313
serde = "1.0"
1414
serde_json = "1.0"
1515
serde_derive = "1.0"
16-
rustfix = "0.2"
16+
rustfix = "0.3.1"
1717

1818
[target.'cfg(unix)'.dependencies]
1919
libc = "0.2"

src/tools/compiletest/src/runtest.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,9 @@ impl<'test> TestCx<'test> {
25872587
let unfixed_code = self.load_expected_output_from_path(&self.testpaths.file)
25882588
.unwrap();
25892589
let suggestions = get_suggestions_from_json(&proc_res.stderr, &HashSet::new()).unwrap();
2590-
let fixed_code = apply_suggestions(&unfixed_code, &suggestions);
2590+
let fixed_code = apply_suggestions(&unfixed_code, &suggestions).expect(
2591+
&format!("failed to apply suggestions for {:?} with rustfix", self.testpaths.file)
2592+
);
25912593

25922594
errors += self.compare_output("fixed", &fixed_code, &expected_fixed);
25932595
} else if !expected_fixed.is_empty() {

0 commit comments

Comments
 (0)