summary refs log tree commit diff
path: root/src/test/ui/closures/issue-41366.stderr
blob: 2f2871e9f0e90c89e1cfe7a6cbad4d9e544b278f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error[E0631]: type mismatch in closure arguments
  --> $DIR/issue-41366.rs:10:5
   |
LL |     (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
   |     ^^-----^
   |     | |
   |     | found signature of `fn(_) -> _`
   |     expected signature of `for<'x> fn(<u32 as T<'x>>::V) -> _`
   |
   = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)`

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 == ()`
  --> $DIR/issue-41366.rs:10:5
   |
LL |     (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
   |     ^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
   |
   = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0271, E0631.
For more information about an error, try `rustc --explain E0271`.