File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
src/test/ui/associated-type-bounds Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ feature( associated_type_bounds) ]
2+
3+ struct Incorrect ;
4+
5+ fn hello < F : for < ' a > Iterator < Item : ' a > > ( ) {
6+ Incorrect //~ERROR: mismatched types
7+ }
8+
9+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0308]: mismatched types
2+ --> $DIR/issue-71443-1.rs:6:5
3+ |
4+ LL | fn hello<F: for<'a> Iterator<Item: 'a>>() {
5+ | - help: try adding a return type: `-> Incorrect`
6+ LL | Incorrect
7+ | ^^^^^^^^^ expected `()`, found struct `Incorrect`
8+
9+ error: aborting due to previous error
10+
11+ For more information about this error, try `rustc --explain E0308`.
Original file line number Diff line number Diff line change 1+ // check-pass
2+
3+ #![ feature( associated_type_bounds) ]
4+
5+ fn hello < ' b , F > ( )
6+ where
7+ for < ' a > F : Iterator < Item : ' a > + ' b ,
8+ {
9+ }
10+
11+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments