fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
975 B23 linesraw
1error[E0631]: type mismatch in closure arguments
2  --> $DIR/issue-41366.rs:10:5
3   |
4LL |     (&|_|()) 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
12error[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   |
15LL |     (&|_|()) 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
20error: aborting due to 2 previous errors
21
22Some errors have detailed explanations: E0271, E0631.
23For more information about an error, try `rustc --explain E0271`.