]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-negative-inherent-where-bounds.rs
Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Ki
[rust.git] / src / test / ui / coherence / coherence-negative-inherent-where-bounds.rs
1 // check-pass
2
3 #![feature(negative_impls)]
4 #![feature(rustc_attrs)]
5 #![feature(with_negative_coherence)]
6
7 trait Foo {}
8
9 impl !Foo for u32 {}
10
11 #[rustc_strict_coherence]
12 struct MyStruct<T>(T);
13
14 impl MyStruct<u32> {
15     fn method(&self) {}
16 }
17
18 impl<T> MyStruct<T>
19 where
20     T: Foo,
21 {
22     fn method(&self) {}
23 }
24
25 fn main() {}