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
389 B
Rust
Raw Normal View History

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