]>
Commit | Line | Data |
---|---|---|
92a42be0 SL |
1 | // Copyright 2015 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | #![recursion_limit="1024"] | |
12 | ||
13 | pub struct S0<T>(T,T); | |
14 | pub struct S1<T>(Option<Box<S0<S0<T>>>>,Option<Box<S0<S0<T>>>>); | |
15 | pub struct S2<T>(Option<Box<S1<S1<T>>>>,Option<Box<S1<S1<T>>>>); | |
16 | pub struct S3<T>(Option<Box<S2<S2<T>>>>,Option<Box<S2<S2<T>>>>); | |
17 | pub struct S4<T>(Option<Box<S3<S3<T>>>>,Option<Box<S3<S3<T>>>>); | |
18 | pub struct S5<T>(Option<Box<S4<S4<T>>>>,Option<Box<S4<S4<T>>>>,Option<T>); | |
19 | ||
20 | trait Foo { fn xxx(&self); } | |
21 | trait Bar {} // anything local or #[fundamental] | |
22 | ||
23 | impl<T> Foo for T where T: Bar, T: Sync { | |
24 | fn xxx(&self) {} | |
25 | } | |
26 | ||
27 | impl Foo for S5<u32> { fn xxx(&self) {} } | |
28 | impl Foo for S5<u64> { fn xxx(&self) {} } | |
29 | ||
30 | fn main() { | |
54a0048b | 31 | let _ = <S5<_>>::xxx; //~ ERROR cannot resolve `S5<_>: Foo` |
92a42be0 | 32 | } |