]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-50716.rs
Rollup merge of #103146 - joboet:cleanup_pthread_condvar, r=Mark-Simulacrum
[rust.git] / src / test / 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() {}