blob: d6490d5b4f9789f0b1f802fc95d572a0d2849db7 [file]
//@ compile-flags: --crate-type=lib
//@ revisions: with_gate without_gate
#![cfg_attr(with_gate, feature(impl_restriction))]
//[with_gate]~^ WARN the feature `impl_restriction` is incomplete and may not be safe to use and/or cause compiler crashes
#![feature(auto_traits, const_trait_impl)]
mod foo {
pub impl(crate::foo) trait Baz {} //~ ERROR incorrect `impl` restriction
//[without_gate]~^ ERROR `impl` restrictions are experimental
pub unsafe impl(crate::foo) trait BazUnsafe {} //~ ERROR incorrect `impl` restriction
//[without_gate]~^ ERROR `impl` restrictions are experimental
pub auto impl(crate::foo) trait BazAuto {} //~ ERROR incorrect `impl` restriction
//[without_gate]~^ ERROR `impl` restrictions are experimental
pub const impl(crate::foo) trait BazConst {} //~ ERROR incorrect `impl` restriction
//[without_gate]~^ ERROR `impl` restrictions are experimental
pub const unsafe impl(crate::foo) trait BazConstUnsafe {} //~ ERROR incorrect `impl` restriction
//[without_gate]~^ ERROR `impl` restrictions are experimental
pub unsafe auto impl(crate::foo) trait BazUnsafeAuto {} //~ ERROR incorrect `impl` restriction
//[without_gate]~^ ERROR `impl` restrictions are experimental
}