]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-21520.rs
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / ui / issues / issue-21520.rs
1 // check-pass
2 #![allow(dead_code)]
3 // Test that the requirement (in `Bar`) that `T::Bar : 'static` does
4 // not wind up propagating to `T`.
5
6 // pretty-expanded FIXME #23616
7
8 pub trait Foo {
9     type Bar;
10
11     fn foo(&self) -> Self;
12 }
13
14 pub struct Static<T:'static>(T);
15
16 struct Bar<T:Foo>
17     where T::Bar : 'static
18 {
19     x: Static<Option<T::Bar>>
20 }
21
22 fn main() { }