Files
rust/tests/ui/coherence/negative-coherence-ref-negative-impl.rs
T

16 lines
307 B
Rust

//! Regression test for <https://github.com/rust-lang/rust/issues/112588>.
//@ check-pass
#![feature(negative_impls, with_negative_coherence)]
trait Trait {}
impl<T: ?Sized> !Trait for &T {}
trait OtherTrait<T> {}
impl<T: Trait> OtherTrait<T> for T {}
impl<T, U> OtherTrait<&U> for &T {}
fn main() {}