bless coherence test · rust-lang/rust@aabdeed (original) (raw)
3 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 1 | +error[E0119]: conflicting implementations of trait `Overlap` for type `u32` | |
| 2 | + --> $DIR/specialization-default-items-drop-coherence.rs:29:1 | |
| 3 | + | | |
| 4 | +LL | impl Overlap for u32 { | |
| 5 | + | -------------------- first implementation here | |
| 6 | +... | |
| 7 | +LL | impl Overlap for ::Id { | |
| 8 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32` | |
| 9 | + | |
| 10 | +error: aborting due to previous error | |
| 11 | + | |
| 12 | +For more information about this error, try `rustc --explain E0119`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 1 | +error[E0119]: conflicting implementations of trait `Overlap` for type `u32` | |
| 2 | + --> $DIR/specialization-default-items-drop-coherence.rs:29:1 | |
| 3 | + | | |
| 4 | +LL | impl Overlap for u32 { | |
| 5 | + | -------------------- first implementation here | |
| 6 | +... | |
| 7 | +LL | impl Overlap for ::Id { | |
| 8 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32` | |
| 9 | + | |
| 10 | +error: aborting due to previous error | |
| 11 | + | |
| 12 | +For more information about this error, try `rustc --explain E0119`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| 1 | -// check-pass | |
| 2 | -// known-bug: #105782 | |
| 1 | +// revisions: classic coherence next | |
| 2 | +//[next] compile-flags: -Ztrait-solver=next | |
| 3 | +//[coherence] compile-flags: -Ztrait-solver=next-coherence | |
| 4 | +//[classic] check-pass | |
| 5 | +//[classic] known-bug: #105782 | |
| 3 | 6 | |
| 4 | 7 | // Should fail. Default items completely drop candidates instead of ambiguity, |
| 5 | 8 | // which is unsound during coherence, since coherence requires completeness. |
| @@ -24,6 +27,8 @@ impl Overlap for u32 { | ||
| 24 | 27 | } |
| 25 | 28 | |
| 26 | 29 | impl Overlap for <u32 as Default>::Id { |
| 30 | +//[coherence]~^ ERROR conflicting implementations of trait `Overlap` for type `u32` | |
| 31 | +//[next]~^^ ERROR conflicting implementations of trait `Overlap` for type `u32` | |
| 27 | 32 | type Assoc = Box<usize>; |
| 28 | 33 | } |
| 29 | 34 |