Files
rust/tests/ui/traits/negative-impls/ambiguity-cause.rs

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

14 lines
307 B
Rust
Raw Normal View History

//@ revisions: simple negative_coherence
#![feature(negative_impls)]
#![cfg_attr(negative_coherence, feature(with_negative_coherence))]
trait MyTrait {}
impl<T: Copy> MyTrait for T { }
impl MyTrait for String { }
//~^ ERROR conflicting implementations of trait `MyTrait` for type `String`
fn main() {}