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