]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-25700-1.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-25700-1.rs
1 // run-pass
2 struct S<T: 'static>(Option<&'static T>);
3
4 trait Tr { type Out; }
5 impl<T> Tr for T { type Out = T; }
6
7 impl<T: 'static> Copy for S<T> where S<T>: Tr<Out=T> {}
8 impl<T: 'static> Clone for S<T> where S<T>: Tr<Out=T> {
9     fn clone(&self) -> Self { *self }
10 }
11 fn main() {
12     S::<()>(None);
13 }