diff --git a/tests/run-make/missing-unstable-trait-bound/missing-bound.stderr b/tests/run-make/missing-unstable-trait-bound/missing-bound.stderr new file mode 100644 index 0000000000000..7196a1a6fed77 --- /dev/null +++ b/tests/run-make/missing-unstable-trait-bound/missing-bound.stderr @@ -0,0 +1,12 @@ +error[E0277]: the trait bound `T: Step` is not satisfied + --> missing-bound.rs:2:14 + | +2 | for _ in t {} + | ^ the trait `Step` is not implemented for `T` + | + = note: required for `std::ops::Range` to implement `Iterator` + = note: required for `std::ops::Range` to implement `IntoIterator` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/run-make/missing-unstable-trait-bound/rmake.rs b/tests/run-make/missing-unstable-trait-bound/rmake.rs index 1e0cb1336a4a8..20f77f7c9aa0d 100644 --- a/tests/run-make/missing-unstable-trait-bound/rmake.rs +++ b/tests/run-make/missing-unstable-trait-bound/rmake.rs @@ -6,10 +6,10 @@ // Ensure that on stable we don't suggest restricting with an unsafe trait and we continue // mentioning the rest of the obligation chain. -use run_make_support::{rust_lib_name, rustc}; +use run_make_support::{diff, rust_lib_name, rustc}; fn main() { - rustc() + let out = rustc() .env("RUSTC_BOOTSTRAP", "-1") .input("missing-bound.rs") .run_fail() @@ -18,5 +18,7 @@ fn main() { r#" = note: required for `std::ops::Range` to implement `Iterator` = note: required for `std::ops::Range` to implement `IntoIterator`"#, - ); + ) + .stderr_utf8(); + diff().expected_file("missing-bound.stderr").actual_text("(stable rustc)", &out).run() }