rust/tests/ui/traits/reservation-impl/coherence-conflict.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
393 B
Rust
Raw Normal View History

2019-07-13 22:52:57 +03:00
// check that reservation impls are accounted for in negative reasoning.
2023-03-21 16:26:23 +01:00
// revisions: old next
//[next] compile-flags: -Ztrait-solver=next
2019-07-13 22:52:57 +03:00
#![feature(rustc_attrs)]
trait MyTrait {}
2019-07-27 22:18:34 +03:00
#[rustc_reservation_impl="this impl is reserved"]
2019-07-13 22:52:57 +03:00
impl MyTrait for () {}
trait OtherTrait {}
impl OtherTrait for () {}
impl<T: MyTrait> OtherTrait for T {}
//~^ ERROR conflicting implementations
fn main() {}