]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/issue-41366.rs
Auto merge of #86492 - hyd-dev:no-mangle-method, r=petrochenkov
[rust.git] / src / test / ui / closures / issue-41366.rs
1 trait T<'x> {
2     type V;
3 }
4
5 impl<'g> T<'g> for u32 {
6     type V = u16;
7 }
8
9 fn main() {
10     (&|_| ()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
11     //~^ ERROR: type mismatch in closure arguments
12     //~| ERROR: size for values of type `<u32 as T<'_>>::V` cannot be known at compilation time
13 }