diff --git a/src/test/pretty/cast-lt.pp b/src/test/pretty/cast-lt.pp index b21158abfe551..f1b4b4f5a0c8a 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 @@ 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 87b5274545f38..ca4c364c63157 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 81518b0b87271..a4380d9212fdf 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 408eda5ba5bb5..59ddc16715d3b 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) ); } }