2024-02-16 14:02:50 -06:00
|
|
|
//@ check-pass
|
2022-03-17 20:51:45 -05:00
|
|
|
|
|
|
|
#![feature(negative_impls)]
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#![feature(with_negative_coherence)]
|
|
|
|
|
|
|
|
#[rustc_strict_coherence]
|
|
|
|
trait Foo {}
|
|
|
|
|
|
|
|
impl !Foo for u32 {}
|
|
|
|
|
|
|
|
struct MyStruct<T>(T);
|
|
|
|
|
|
|
|
impl<T: Foo> MyStruct<T> {
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl MyStruct<u32> {
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|