Use run-make diff
output for stable output test · rust-lang/rust@05e6714 (original) (raw)
File tree
2 files changed
lines changed
- tests/run-make/missing-unstable-trait-bound
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
1 | +error[E0277]: the trait bound `T: Step` is not satisfied | |
2 | + --> missing-bound.rs:2:14 | |
3 | + | | |
4 | +2 | for _ in t {} | |
5 | + | ^ the trait `Step` is not implemented for `T` | |
6 | + | | |
7 | + = note: required for `std::ops::Range` to implement `Iterator` | |
8 | + = note: required for `std::ops::Range` to implement `IntoIterator` | |
9 | + | |
10 | +error: aborting due to 1 previous error | |
11 | + | |
12 | +For more information about this error, try `rustc --explain E0277`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,10 +6,10 @@ | ||
6 | 6 | // Ensure that on stable we don't suggest restricting with an unsafe trait and we continue |
7 | 7 | // mentioning the rest of the obligation chain. |
8 | 8 | |
9 | -use run_make_support::{rust_lib_name, rustc}; | |
9 | +use run_make_support::{diff, rust_lib_name, rustc}; | |
10 | 10 | |
11 | 11 | fn main() { |
12 | -rustc() | |
12 | +let out = rustc() | |
13 | 13 | .env("RUSTC_BOOTSTRAP", "-1") |
14 | 14 | .input("missing-bound.rs") |
15 | 15 | .run_fail() |
@@ -18,5 +18,7 @@ fn main() { | ||
18 | 18 | r#" |
19 | 19 | = note: required for `std::ops::Range` to implement `Iterator` |
20 | 20 | = note: required for `std::ops::Range` to implement `IntoIterator`"#, |
21 | -); | |
21 | +) | |
22 | +.stderr_utf8(); | |
23 | +diff().expected_file("missing-bound.stderr").actual_text("(stable rustc)", &out).run() | |
22 | 24 | } |