fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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