rust/tests/ui/issues/issue-33187.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
330 B
Rust
Raw Normal View History

// run-pass
2022-02-09 10:19:31 +00:00
struct Foo<A: Repr>(<A as Repr>::Data);
2022-02-09 10:19:31 +00:00
impl<A> Copy for Foo<A> where <A as Repr>::Data: Copy {}
impl<A> Clone for Foo<A>
where
<A as Repr>::Data: Clone,
{
fn clone(&self) -> Self {
Foo(self.0.clone())
}
}
trait Repr {
type Data;
}
impl<A> Repr for A {
type Data = u32;
}
2022-02-09 10:19:31 +00:00
fn main() {}