about summary refs log tree commit diff
path: root/tests/ui/associated-types/issue-25700-1.rs
blob: 7ab82438d07b9fba4355a3e3022155a5e599f76f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-pass
struct S<T: 'static>(#[allow(dead_code)] 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);
}