]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-negative-impls-copy-bad.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / coherence / coherence-negative-impls-copy-bad.rs
1 #![feature(negative_impls)]
2 #![crate_type = "lib"]
3
4 impl !Copy for str {}
5 //~^ ERROR only traits defined in the current crate can be implemented
6
7 impl !Copy for fn() {}
8 //~^ ERROR only traits defined in the current crate can be implemented
9
10 impl !Copy for () {}
11 //~^ ERROR only traits defined in the current crate can be implemented