diff options
| author | bors <bors@rust-lang.org> | 2018-07-12 15:12:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-12 15:12:37 +0000 |
| commit | 6cc42a4488d5dbc4c4109ed4a2f2ea81efa77f86 (patch) | |
| tree | 38a04beeb18cf1aa034b30d40d82e2d15cb2ee71 | |
| parent | 7db82ccd765cbfe55c3d8a2c434bc6f9b986843d (diff) | |
| parent | b96deed121bae7f753ddcf11d419abd3962d39b5 (diff) | |
| download | rust-6cc42a4488d5dbc4c4109ed4a2f2ea81efa77f86.tar.gz rust-6cc42a4488d5dbc4c4109ed4a2f2ea81efa77f86.zip | |
Auto merge of #52256 - tinco:issue_52255, r=sanxiyn
make pretty source comparison check be fatal (fixes #52255) This is not ready for merging because it reveals (at least) two regressions in the pretty suite. Should I attempt to fix those in this PR also?
| -rw-r--r-- | src/test/pretty/cast-lt.pp | 3 | ||||
| -rw-r--r-- | src/test/pretty/cast-lt.rs | 1 | ||||
| -rw-r--r-- | src/test/pretty/issue-4264.pp | 2 | ||||
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 7 |
4 files changed, 5 insertions, 8 deletions
diff --git a/src/test/pretty/cast-lt.pp b/src/test/pretty/cast-lt.pp index b21158abfe5..f1b4b4f5a0c 100644 --- a/src/test/pretty/cast-lt.pp +++ b/src/test/pretty/cast-lt.pp @@ -3,7 +3,7 @@ #[prelude_import] use std::prelude::v1::*; #[macro_use] -extern crate std as std; +extern crate std; // Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. @@ -21,4 +21,3 @@ extern crate std as std; macro_rules! negative(( $ e : expr ) => { $ e < 0 }); fn main() { (1 as i32) < 0; } - diff --git a/src/test/pretty/cast-lt.rs b/src/test/pretty/cast-lt.rs index 87b5274545f..ca4c364c631 100644 --- a/src/test/pretty/cast-lt.rs +++ b/src/test/pretty/cast-lt.rs @@ -19,4 +19,3 @@ macro_rules! negative { fn main() { negative!(1 as i32); } - diff --git a/src/test/pretty/issue-4264.pp b/src/test/pretty/issue-4264.pp index 81518b0b872..a4380d9212f 100644 --- a/src/test/pretty/issue-4264.pp +++ b/src/test/pretty/issue-4264.pp @@ -1,7 +1,7 @@ #[prelude_import] use std::prelude::v1::*; #[macro_use] -extern crate std as std; +extern crate std; // Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 408eda5ba5b..59ddc16715d 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -519,9 +519,8 @@ impl<'test> TestCx<'test> { fn compare_source(&self, expected: &str, actual: &str) { if expected != actual { - self.error("pretty-printed source does not match expected source"); - println!( - "\n\ + self.fatal(&format!( + "pretty-printed source does not match expected source\n\ expected:\n\ ------------------------------------------\n\ {}\n\ @@ -531,7 +530,7 @@ impl<'test> TestCx<'test> { {}\n\ ------------------------------------------\n\ \n", - expected, actual + expected, actual) ); } } |
