]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-impls-sized.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / coherence / coherence-impls-sized.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Copy;
4
5 enum TestE {
6   A
7 }
8
9 struct MyType;
10
11 struct NotSync;
12 impl !Sync for NotSync {}
13
14 impl Sized for TestE {}
15 //~^ ERROR E0322
16
17 impl Sized for MyType {}
18 //~^ ERROR E0322
19
20 impl Sized for (MyType, MyType) {}
21 //~^ ERROR E0322
22 //~| ERROR E0117
23
24 impl Sized for &'static NotSync {}
25 //~^ ERROR E0322
26
27 impl Sized for [MyType] {}
28 //~^ ERROR E0322
29 //~| ERROR E0117
30
31 impl Sized for &'static [NotSync] {}
32 //~^ ERROR E0322
33 //~| ERROR E0117
34
35 fn main() {
36 }