forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#116689 - lcnr:auto-trait-hidden-ty-leak, r=…
…compiler-errors explicitly handle auto trait leakage in coherence does not impact behavior but may avoid weird bugs in the future, cc rust-lang/trait-system-refactor-initiative#65 r? ``@compiler-errors``
- Loading branch information
Showing
5 changed files
with
38 additions
and
17 deletions.
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
2 changes: 1 addition & 1 deletion
2
tests/ui/impl-trait/auto-trait.stderr → ...pl-trait/auto-trait-coherence.next.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
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,12 @@ | ||
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>` | ||
--> $DIR/auto-trait-coherence.rs:24:1 | ||
| | ||
LL | impl<T: Send> AnotherTrait for T {} | ||
| -------------------------------- first implementation here | ||
... | ||
LL | impl AnotherTrait for D<OpaqueType> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
3 changes: 3 additions & 0 deletions
3
tests/ui/impl-trait/auto-trait.rs → tests/ui/impl-trait/auto-trait-coherence.rs
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