]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/issue-25700-1.rs
Rollup merge of #107709 - tialaramex:master, r=compiler-errors
[rust.git] / tests / ui / associated-types / issue-25700-1.rs
1 // run-pass
2 struct S<T: 'static>(#[allow(unused_tuple_struct_fields)] 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 }