-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #64474 - Mark-Simulacrum:permit-err-overlap, r=matthewj…
…asper Permit impls referencing errors to overlap Fixes #43400; previously this would emit an overlapping impls error, but no longer does.
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
struct ErrorKind; | ||
struct Error(ErrorKind); | ||
|
||
impl From<nope::Thing> for Error { //~ ERROR failed to resolve | ||
fn from(_: nope::Thing) -> Self { //~ ERROR failed to resolve | ||
unimplemented!() | ||
} | ||
} | ||
|
||
impl From<ErrorKind> for Error { | ||
fn from(_: ErrorKind) -> Self { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
fn main() {} |
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 @@ | ||
error[E0433]: failed to resolve: use of undeclared type or module `nope` | ||
--> $DIR/conflicting-impl-with-err.rs:4:11 | ||
| | ||
LL | impl From<nope::Thing> for Error { | ||
| ^^^^ use of undeclared type or module `nope` | ||
|
||
error[E0433]: failed to resolve: use of undeclared type or module `nope` | ||
--> $DIR/conflicting-impl-with-err.rs:5:16 | ||
| | ||
LL | fn from(_: nope::Thing) -> Self { | ||
| ^^^^ use of undeclared type or module `nope` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0433`. |