about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorPascal Hertleif <killercup@gmail.com>2018-05-13 18:35:40 +0200
committerPascal Hertleif <killercup@gmail.com>2018-05-22 22:04:45 +0200
commit7a738564d746d7b4235300958b4e49a05896bb80 (patch)
tree7baef7115a3157d1c4a96b500ba5d45a657006c7 /src/tools/compiletest
parente0635188ed30e083245482218a0de9237f14ce90 (diff)
downloadrust-7a738564d746d7b4235300958b4e49a05896bb80.tar.gz
rust-7a738564d746d7b4235300958b4e49a05896bb80.zip
Update compiltest to use rustfix 0.3.1
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/Cargo.toml2
-rw-r--r--src/tools/compiletest/src/runtest.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml
index 45cb147fbbc..78038758023 100644
--- a/src/tools/compiletest/Cargo.toml
+++ b/src/tools/compiletest/Cargo.toml
@@ -13,7 +13,7 @@ regex = "0.2"
 serde = "1.0"
 serde_json = "1.0"
 serde_derive = "1.0"
-rustfix = "0.2"
+rustfix = "0.3.1"
 
 [target.'cfg(unix)'.dependencies]
 libc = "0.2"
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 140c90aaeac..f99b30151e4 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2587,7 +2587,9 @@ impl<'test> TestCx<'test> {
             let unfixed_code = self.load_expected_output_from_path(&self.testpaths.file)
                 .unwrap();
             let suggestions = get_suggestions_from_json(&proc_res.stderr, &HashSet::new()).unwrap();
-            let fixed_code = apply_suggestions(&unfixed_code, &suggestions);
+            let fixed_code = apply_suggestions(&unfixed_code, &suggestions).expect(
+                &format!("failed to apply suggestions for {:?} with rustfix", self.testpaths.file)
+            );
 
             errors += self.compare_output("fixed", &fixed_code, &expected_fixed);
         } else if !expected_fixed.is_empty() {