1 // aux-build: coherence_cross_crate_trait_decl.rs
2 // This test ensures that adding an `impl SomeTrait for i32` within
3 // `coherence_cross_crate_trait_decl` is not a breaking change, by
4 // making sure that even without such an impl this test fails to compile.
6 #![feature(type_alias_impl_trait)]
8 extern crate coherence_cross_crate_trait_decl;
10 use coherence_cross_crate_trait_decl::SomeTrait;
14 type Alias = impl SomeTrait;
16 fn constrain() -> Alias {
20 impl OtherTrait for Alias {}
21 impl OtherTrait for i32 {}
22 //~^ ERROR: conflicting implementations of trait `OtherTrait` for type `Alias`