rust/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs

17 lines
320 B
Rust
Raw Normal View History

2019-07-13 14:52:57 -05:00
// compile-fail
// check that reservation impls are accounted for in negative reasoning.
#![feature(rustc_attrs)]
trait MyTrait {}
#[rustc_reservation_impl]
impl MyTrait for () {}
trait OtherTrait {}
impl OtherTrait for () {}
impl<T: MyTrait> OtherTrait for T {}
//~^ ERROR conflicting implementations
fn main() {}