]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/issue-41366.stderr
2f2871e9f0e90c89e1cfe7a6cbad4d9e544b278f
[rust.git] / src / test / ui / closures / issue-41366.stderr
1 error[E0631]: type mismatch in closure arguments
2   --> $DIR/issue-41366.rs:10:5
3    |
4 LL |     (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
5    |     ^^-----^
6    |     | |
7    |     | found signature of `fn(_) -> _`
8    |     expected signature of `for<'x> fn(<u32 as T<'x>>::V) -> _`
9    |
10    = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)`
11
12 error[E0271]: type mismatch resolving `for<'x> <[closure@$DIR/issue-41366.rs:10:7: 10:12] as std::ops::FnOnce<(<u32 as T<'x>>::V,)>>::Output == ()`
13   --> $DIR/issue-41366.rs:10:5
14    |
15 LL |     (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
16    |     ^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
17    |
18    = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)`
19
20 error: aborting due to 2 previous errors
21
22 Some errors have detailed explanations: E0271, E0631.
23 For more information about an error, try `rustc --explain E0271`.