2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2022-03-17 11:26:45 -03:00
|
|
|
|
|
|
|
#![feature(negative_impls)]
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#![feature(with_negative_coherence)]
|
|
|
|
|
|
|
|
trait Trait1: Trait2 {}
|
|
|
|
trait Trait2 {}
|
|
|
|
|
|
|
|
struct MyType {}
|
|
|
|
impl !Trait2 for MyType {}
|
|
|
|
|
|
|
|
#[rustc_strict_coherence]
|
|
|
|
trait Foo {}
|
|
|
|
impl<T: Trait1> Foo for T {}
|
|
|
|
impl Foo for MyType {}
|
|
|
|
|
|
|
|
fn main() {}
|