rust/src/test/ui/issues/issue-25700-1.rs
2019-07-27 18:56:16 +03:00

14 lines
299 B
Rust

// run-pass
struct S<T: 'static>(Option<&'static T>);
trait Tr { type Out; }
impl<T> Tr for T { type Out = T; }
impl<T: 'static> Copy for S<T> where S<T>: Tr<Out=T> {}
impl<T: 'static> Clone for S<T> where S<T>: Tr<Out=T> {
fn clone(&self) -> Self { *self }
}
fn main() {
S::<()>(None);
}