]> git.lizzy.rs Git - rust.git/blob - src/test/ui/derives/derive-assoc-type-not-impl.rs
Merge commit 'e214ea82ad0a751563acf67e1cd9279cf302db3a' into clippyup
[rust.git] / src / test / ui / derives / derive-assoc-type-not-impl.rs
1 trait Foo {
2     type X;
3     fn method(&self) {}
4 }
5
6 #[derive(Clone)]
7 struct Bar<T: Foo> {
8     x: T::X,
9 }
10
11 struct NotClone;
12
13 impl Foo for NotClone {
14     type X = i8;
15 }
16
17 fn main() {
18     Bar::<NotClone> { x: 1 }.clone(); //~ ERROR
19 }