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