]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-29147.rs
Auto merge of #104013 - notriddle:notriddle/rustdoc-sizeof, r=GuillaumeGomez
[rust.git] / src / test / ui / issues / issue-29147.rs
1 #![recursion_limit="1024"]
2 #![allow(dead_code)]
3
4 pub struct S0<T>(T,T);
5 pub struct S1<T>(Option<Box<S0<S0<T>>>>,Option<Box<S0<S0<T>>>>);
6 pub struct S2<T>(Option<Box<S1<S1<T>>>>,Option<Box<S1<S1<T>>>>);
7 pub struct S3<T>(Option<Box<S2<S2<T>>>>,Option<Box<S2<S2<T>>>>);
8 pub struct S4<T>(Option<Box<S3<S3<T>>>>,Option<Box<S3<S3<T>>>>);
9 pub struct S5<T>(Option<Box<S4<S4<T>>>>,Option<Box<S4<S4<T>>>>,Option<T>);
10
11 trait Foo { fn xxx(&self); }
12 trait Bar {} // anything local or #[fundamental]
13
14 impl<T> Foo for T where T: Bar, T: Sync {
15     fn xxx(&self) {}
16 }
17
18 impl Foo for S5<u32> { fn xxx(&self) {} }
19 impl Foo for S5<u64> { fn xxx(&self) {} }
20
21 fn main() {
22     let _ = <S5<_>>::xxx; //~ ERROR type annotations needed
23 }