2022-05-05 02:37:50 -05:00
|
|
|
// aux-build:extern-crate.rs
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
extern crate extern_crate;
|
|
|
|
|
2022-05-05 07:29:24 -05:00
|
|
|
impl extern_crate::StructWithAttr {
|
|
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
2022-05-05 02:37:50 -05:00
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
impl extern_crate::StructWithAttr {
|
|
|
|
#[rustc_allow_incoherent_impl]
|
|
|
|
fn bar() {}
|
|
|
|
}
|
2022-05-05 07:29:24 -05:00
|
|
|
impl extern_crate::StructNoAttr {
|
|
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
2022-05-05 02:37:50 -05:00
|
|
|
fn foo() {}
|
|
|
|
}
|
2022-05-05 07:29:24 -05:00
|
|
|
impl extern_crate::StructNoAttr {
|
|
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
2022-05-05 02:37:50 -05:00
|
|
|
#[rustc_allow_incoherent_impl]
|
|
|
|
fn bar() {}
|
|
|
|
}
|
2022-05-05 07:29:24 -05:00
|
|
|
impl extern_crate::EnumWithAttr {
|
|
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
2022-05-05 02:37:50 -05:00
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
impl extern_crate::EnumWithAttr {
|
|
|
|
#[rustc_allow_incoherent_impl]
|
|
|
|
fn bar() {}
|
|
|
|
}
|
2022-05-05 07:29:24 -05:00
|
|
|
impl extern_crate::EnumNoAttr {
|
|
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
2022-05-05 02:37:50 -05:00
|
|
|
fn foo() {}
|
|
|
|
}
|
2022-05-05 07:29:24 -05:00
|
|
|
impl extern_crate::EnumNoAttr {
|
|
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
2022-05-05 02:37:50 -05:00
|
|
|
#[rustc_allow_incoherent_impl]
|
|
|
|
fn bar() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|