File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
tests/run-make/missing-unstable-trait-bound Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 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`.
Original file line number Diff line number Diff line change 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
1111fn 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}
You can’t perform that action at this time.
0 commit comments