Permit impls referencing errors to overlap

This commit is contained in:
Mark Rousskov 2019-09-14 19:26:49 -04:00
parent ca3766e2e5
commit 959c710e85
3 changed files with 38 additions and 0 deletions

View file

@ -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() {}

View file

@ -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`.