]> git.proxmox.com Git - rustc.git/blob - tests/ui/nll/issue-50716.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / nll / issue-50716.rs
1 //
2 // Regression test for the issue #50716: NLL ignores lifetimes bounds
3 // derived from `Sized` requirements
4
5 trait A {
6 type X: ?Sized;
7 }
8
9 fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
10 where
11 for<'b> &'b T: A,
12 <&'static T as A>::X: Sized
13 {
14 let _x = *s; //~ ERROR
15 }
16
17 fn main() {}