|
| 1 | +error[E0631]: type mismatch in function arguments |
| 2 | + --> $DIR/issue-43623.rs:14:5 |
| 3 | + | |
| 4 | +LL | break_me::<Type, fn(_)>; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | expected signature of `for<'b> fn(<Type as Trait<'b>>::Assoc) -> _` |
| 8 | + | found signature of `fn(_) -> _` |
| 9 | + | |
| 10 | +note: required by `break_me` |
| 11 | + --> $DIR/issue-43623.rs:11:1 |
| 12 | + | |
| 13 | +LL | / pub fn break_me<T, F>(f: F) |
| 14 | +LL | | where T: for<'b> Trait<'b>, |
| 15 | +LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) { |
| 16 | +LL | | break_me::<Type, fn(_)>; |
| 17 | +LL | | |
| 18 | +LL | | |
| 19 | +LL | | } |
| 20 | + | |_^ |
| 21 | + |
| 22 | +error[E0271]: type mismatch resolving `for<'b> <fn(_) as std::ops::FnOnce<(<Type as Trait<'b>>::Assoc,)>>::Output == ()` |
| 23 | + --> $DIR/issue-43623.rs:14:5 |
| 24 | + | |
| 25 | +LL | break_me::<Type, fn(_)>; |
| 26 | + | ^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'b, found concrete lifetime |
| 27 | + | |
| 28 | +note: required by `break_me` |
| 29 | + --> $DIR/issue-43623.rs:11:1 |
| 30 | + | |
| 31 | +LL | / pub fn break_me<T, F>(f: F) |
| 32 | +LL | | where T: for<'b> Trait<'b>, |
| 33 | +LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) { |
| 34 | +LL | | break_me::<Type, fn(_)>; |
| 35 | +LL | | |
| 36 | +LL | | |
| 37 | +LL | | } |
| 38 | + | |_^ |
| 39 | + |
| 40 | +error: aborting due to 2 previous errors |
| 41 | + |
| 42 | +For more information about this error, try `rustc --explain E0271`. |
0 commit comments