-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0395fa3
commit 994d551
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//@ compile-flags: -Znext-solver=coherence | ||
|
||
#![recursion_limit = "10"] | ||
|
||
trait Trait {} | ||
|
||
struct W<T: ?Sized>(*const T); | ||
trait TwoW {} | ||
impl<T: ?Sized + TwoW> TwoW for W<W<T>> {} | ||
|
||
impl<T: ?Sized + TwoW> Trait for W<T> {} | ||
impl<T: ?Sized + TwoW> Trait for T {} | ||
//~^ ERROR conflicting implementations of trait `Trait` for type `W | ||
|
||
fn main() {} |
11 changes: 11 additions & 0 deletions
11
tests/ui/traits/next-solver/coherence-fulfill-overflow.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0119]: conflicting implementations of trait `Trait` for type `W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<_>>>>>>>>>>>>>>>>>>>>>` | ||
--> $DIR/coherence-fulfill-overflow.rs:12:1 | ||
| | ||
LL | impl<T: ?Sized + TwoW> Trait for W<T> {} | ||
| ------------------------------------- first implementation here | ||
LL | impl<T: ?Sized + TwoW> Trait for T {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<_>>>>>>>>>>>>>>>>>>>>>` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |