]> git.lizzy.rs Git - rust.git/blob - tests/ui/derives/derive-assoc-type-not-impl.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / 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 }