// revisions: any_lt static_lt //[static_lt] check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] trait Foo {} impl !Foo for &'static T {} trait Bar {} impl Bar for T where T: Foo {} #[cfg(any_lt)] impl Bar for &T {} //[any_lt]~^ ERROR conflicting implementations of trait `Bar` for type `&_` #[cfg(static_lt)] impl Bar for &'static T {} fn main() {}