]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/copy-impl-cannot-normalize.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / traits / copy-impl-cannot-normalize.rs
CommitLineData
5e7ed085
FG
1trait TraitFoo {
2 type Bar;
3}
4
5struct Foo<T>
6where
7 T: TraitFoo,
8{
9 inner: T::Bar,
10}
11
12impl<T> Clone for Foo<T>
13where
14 T: TraitFoo,
15 T::Bar: Clone,
16{
17 fn clone(&self) -> Self {
18 Self { inner: self.inner.clone() }
19 }
20}
21
22impl<T> Copy for Foo<T> {}
23//~^ ERROR the trait bound `T: TraitFoo` is not satisfied
24
25fn main() {}