]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-25700.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-25700.rs
CommitLineData
62682a34 1struct S<T: 'static>(Option<&'static T>);
85aaf69f 2
62682a34
SL
3trait Tr { type Out; }
4impl<T> Tr for T { type Out = T; }
223e47cc 5
62682a34
SL
6impl<T: 'static> Copy for S<T> where S<T>: Tr<Out=T> {}
7impl<T: 'static> Clone for S<T> where S<T>: Tr<Out=T> {
8 fn clone(&self) -> Self { *self }
9}
10fn main() {
11 let t = S::<()>(None);
12 drop(t);
13 drop(t); //~ ERROR use of moved value
14}