]>
Commit | Line | Data |
---|---|---|
62682a34 | 1 | struct S<T: 'static>(Option<&'static T>); |
85aaf69f | 2 | |
62682a34 SL |
3 | trait Tr { type Out; } |
4 | impl<T> Tr for T { type Out = T; } | |
223e47cc | 5 | |
62682a34 SL |
6 | impl<T: 'static> Copy for S<T> where S<T>: Tr<Out=T> {} |
7 | impl<T: 'static> Clone for S<T> where S<T>: Tr<Out=T> { | |
8 | fn clone(&self) -> Self { *self } | |
9 | } | |
10 | fn main() { | |
11 | let t = S::<()>(None); | |
12 | drop(t); | |
13 | drop(t); //~ ERROR use of moved value | |
14 | } |