]>
Commit | Line | Data |
---|---|---|
54a0048b | 1 | // Copyright 2016 The Rust Project Developers. See the COPYRIGHT |
223e47cc LB |
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 | ||
b7449926 | 11 | // run-pass |
32a655c1 | 12 | struct Foo<A: Repr>(<A as Repr>::Data); |
3157f602 | 13 | |
32a655c1 SL |
14 | impl<A> Copy for Foo<A> where <A as Repr>::Data: Copy { } |
15 | impl<A> Clone for Foo<A> where <A as Repr>::Data: Clone { | |
16 | fn clone(&self) -> Self { Foo(self.0.clone()) } | |
17 | } | |
3157f602 | 18 | |
32a655c1 SL |
19 | trait Repr { |
20 | type Data; | |
21 | } | |
3157f602 | 22 | |
32a655c1 SL |
23 | impl<A> Repr for A { |
24 | type Data = u32; | |
25 | } | |
a7813a04 | 26 | |
970d7e83 | 27 | fn main() { |
223e47cc | 28 | } |