Sign in
fuchsia
/
third_party
/
rust
/
13ef05e2be9862ea7b94d0b42e0b2d044b3c7f6b
/
.
/
tests
/
ui
/
traits
/
copy-requires-self-wf.rs
blob: 3a8bf8c420e152e62e08ac5c929cc890324fe517 [
file
] [
log
] [
blame
]
//@ 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
()
{}