mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
41 lines
1.1 KiB
Rust
41 lines
1.1 KiB
Rust
// aux-build:extern-crate.rs
|
|
#![feature(rustc_attrs)]
|
|
extern crate extern_crate;
|
|
|
|
impl extern_crate::StructWithAttr {
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
|
fn foo() {}
|
|
}
|
|
impl extern_crate::StructWithAttr {
|
|
#[rustc_allow_incoherent_impl]
|
|
fn bar() {}
|
|
}
|
|
impl extern_crate::StructNoAttr {
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
|
fn foo() {}
|
|
}
|
|
impl extern_crate::StructNoAttr {
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
|
#[rustc_allow_incoherent_impl]
|
|
fn bar() {}
|
|
}
|
|
impl extern_crate::EnumWithAttr {
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
|
fn foo() {}
|
|
}
|
|
impl extern_crate::EnumWithAttr {
|
|
#[rustc_allow_incoherent_impl]
|
|
fn bar() {}
|
|
}
|
|
impl extern_crate::EnumNoAttr {
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
|
fn foo() {}
|
|
}
|
|
impl extern_crate::EnumNoAttr {
|
|
//~^ ERROR cannot define inherent `impl` for a type outside of the crate
|
|
#[rustc_allow_incoherent_impl]
|
|
fn bar() {}
|
|
}
|
|
|
|
fn main() {}
|