summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/copy-requires-self-wf.rs
blob: 9abfdfab9d06da63ae4a30a43b48b13fc445b7a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// check-pass

#[derive(Clone)]
struct A<'a, T>(&'a T);

impl<'a, T: Copy + 'a> Copy for A<'a, T> {}

#[derive(Clone)]
struct B<'a, T>(A<'a, T>);

// `T: '_` should be implied by `WF(B<'_, T>)`.
impl<T: Copy> Copy for B<'_, T> {}

fn main() {}