]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/copy-impl-cannot-normalize.rs
better ObligationCause for normalization errors in can_type_implement_copy
[rust.git] / src / test / ui / traits / copy-impl-cannot-normalize.rs
1 trait TraitFoo {
2     type Bar;
3 }
4
5 struct Foo<T>
6 where
7     T: TraitFoo,
8 {
9     inner: T::Bar,
10 }
11
12 impl<T> Clone for Foo<T>
13 where
14     T: TraitFoo,
15     T::Bar: Clone,
16 {
17     fn clone(&self) -> Self {
18         Self { inner: self.inner.clone() }
19     }
20 }
21
22 impl<T> Copy for Foo<T> {}
23 //~^ ERROR the trait bound `T: TraitFoo` is not satisfied
24
25 fn main() {}