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#118649 - compiler-errors:coherence-ambig, r…
…=lcnr Make inductive cycles in coherence ambiguous always Logical conclusion of rust-lang#114040 One step after rust-lang#116493 cc rust-lang/trait-system-refactor-initiative#20 r? lcnr to kick off the FCP after review... maybe we should wait until 1.75 is landed? In that case, I'd still like to get the FCP boxes checked sooner since that'll be near the holidays which means everyone's away.
- Loading branch information
Showing
6 changed files
with
27 additions
and
155 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
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
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
46 changes: 6 additions & 40 deletions
46
tests/ui/coherence/warn-when-cycle-is-error-in-coherence.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 |
---|---|---|
@@ -1,51 +1,17 @@ | ||
error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future | ||
--> $DIR/warn-when-cycle-is-error-in-coherence.rs:13:1 | ||
error[E0119]: conflicting implementations of trait `PartialEq<Interval<_>>` for type `Interval<_>` | ||
--> $DIR/warn-when-cycle-is-error-in-coherence.rs:5:10 | ||
| | ||
LL | #[derive(PartialEq, Default)] | ||
| --------- the second impl is here | ||
| ^^^^^^^^^ conflicting implementation for `Interval<_>` | ||
... | ||
LL | / impl<T, Q> PartialEq<Q> for Interval<T> | ||
LL | | | ||
LL | | | ||
LL | | where | ||
LL | | T: Borrow<Q>, | ||
LL | | Q: ?Sized + PartialOrd, | ||
| |___________________________^ the first impl is here | ||
| |___________________________- first implementation here | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #114040 <https://github.com/rust-lang/rust/issues/114040> | ||
= note: impls that are not considered to overlap may be considered to overlap in the future | ||
= note: `Interval<_>: PartialOrd` may be considered to hold in future releases, causing the impls to overlap | ||
note: the lint level is defined here | ||
--> $DIR/warn-when-cycle-is-error-in-coherence.rs:1:9 | ||
| | ||
LL | #![deny(coinductive_overlap_in_coherence)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 1 previous error | ||
|
||
Future incompatibility report: Future breakage diagnostic: | ||
error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future | ||
--> $DIR/warn-when-cycle-is-error-in-coherence.rs:13:1 | ||
| | ||
LL | #[derive(PartialEq, Default)] | ||
| --------- the second impl is here | ||
... | ||
LL | / impl<T, Q> PartialEq<Q> for Interval<T> | ||
LL | | | ||
LL | | | ||
LL | | where | ||
LL | | T: Borrow<Q>, | ||
LL | | Q: ?Sized + PartialOrd, | ||
| |___________________________^ the first impl is here | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #114040 <https://github.com/rust-lang/rust/issues/114040> | ||
= note: impls that are not considered to overlap may be considered to overlap in the future | ||
= note: `Interval<_>: PartialOrd` may be considered to hold in future releases, causing the impls to overlap | ||
note: the lint level is defined here | ||
--> $DIR/warn-when-cycle-is-error-in-coherence.rs:1:9 | ||
| | ||
LL | #![deny(coinductive_overlap_in_coherence)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
For more information about this error, try `rustc --explain E0119`. |