Skip to content

Commit 6277fb0

Browse files
committed
Use run-make diff output for stable output test
1 parent b466405 commit 6277fb0

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed
Original file line numberDiff line numberDiff 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<T>` to implement `Iterator`
8+
= note: required for `std::ops::Range<T>` to implement `IntoIterator`
9+
10+
error: aborting due to 1 previous error
11+
12+
For more information about this error, try `rustc --explain E0277`.

Diff for: tests/run-make/missing-unstable-trait-bound/rmake.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// Ensure that on stable we don't suggest restricting with an unsafe trait and we continue
77
// mentioning the rest of the obligation chain.
88

9-
use run_make_support::{rust_lib_name, rustc};
9+
use run_make_support::{diff, rust_lib_name, rustc};
1010

1111
fn main() {
12-
rustc()
12+
let out = rustc()
1313
.env("RUSTC_BOOTSTRAP", "-1")
1414
.input("missing-bound.rs")
1515
.run_fail()
@@ -18,5 +18,7 @@ fn main() {
1818
r#"
1919
= note: required for `std::ops::Range<T>` to implement `Iterator`
2020
= note: required for `std::ops::Range<T>` to implement `IntoIterator`"#,
21-
);
21+
)
22+
.stderr_utf8();
23+
diff().expected_file("missing-bound.stderr").actual_text("(stable rustc)", &out).run()
2224
}

0 commit comments

Comments
 (0)