Skip to content

Commit e27378c

Browse files
committed
Add a test with a negative impl that used to fail to pass coherence but now does
1 parent 981cf69 commit e27378c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/112588>.
2+
3+
//@ check-pass
4+
5+
#![feature(negative_impls, with_negative_coherence)]
6+
7+
trait Trait {}
8+
impl<T: ?Sized> !Trait for &T {}
9+
10+
trait OtherTrait<T> {}
11+
12+
impl<T: Trait> OtherTrait<T> for T {}
13+
impl<T, U> OtherTrait<&U> for &T {}
14+
15+
fn main() {}

0 commit comments

Comments
 (0)