]> git.lizzy.rs Git - rust.git/blob - src/test/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs
Auto merge of #92461 - rust-lang:const_tls_local_panic_count, r=Mark-Simulacrum
[rust.git] / src / test / ui / incoherent-inherent-impls / needs-has-incoherent-impls.rs
1 // aux-build:extern-crate.rs
2 #![feature(rustc_attrs)]
3 extern crate extern_crate;
4
5 impl extern_crate::StructWithAttr {
6     //~^ ERROR cannot define inherent `impl` for a type outside of the crate
7     fn foo() {}
8 }
9 impl extern_crate::StructWithAttr {
10     #[rustc_allow_incoherent_impl]
11     fn bar() {}
12 }
13 impl extern_crate::StructNoAttr {
14     //~^ ERROR cannot define inherent `impl` for a type outside of the crate
15     fn foo() {}
16 }
17 impl extern_crate::StructNoAttr {
18     //~^ ERROR cannot define inherent `impl` for a type outside of the crate
19     #[rustc_allow_incoherent_impl]
20     fn bar() {}
21 }
22 impl extern_crate::EnumWithAttr {
23     //~^ ERROR cannot define inherent `impl` for a type outside of the crate
24     fn foo() {}
25 }
26 impl extern_crate::EnumWithAttr {
27     #[rustc_allow_incoherent_impl]
28     fn bar() {}
29 }
30 impl extern_crate::EnumNoAttr {
31     //~^ ERROR cannot define inherent `impl` for a type outside of the crate
32     fn foo() {}
33 }
34 impl extern_crate::EnumNoAttr {
35     //~^ ERROR cannot define inherent `impl` for a type outside of the crate
36     #[rustc_allow_incoherent_impl]
37     fn bar() {}
38 }
39
40 fn main() {}