rust/tests/ui/coherence/coherence-conflicting-repeated-negative-trait-impl-70849.rs

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

11 lines
300 B
Rust
Raw Normal View History

#![feature(negative_impls)]
//@ edition: 2021
// Test to ensure we are printing the polarity of the impl trait ref
// when printing out conflicting trait impls
struct MyType;
impl !Clone for &mut MyType {}
//~^ ERROR conflicting implementations of trait `Clone` for type `&mut MyType`
fn main() {}