Permit impls referencing errors to overlap
This commit is contained in:
parent
ca3766e2e5
commit
959c710e85
3 changed files with 38 additions and 0 deletions
16
src/test/ui/coherence/conflicting-impl-with-err.rs
Normal file
16
src/test/ui/coherence/conflicting-impl-with-err.rs
Normal 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() {}
|
||||
15
src/test/ui/coherence/conflicting-impl-with-err.stderr
Normal file
15
src/test/ui/coherence/conflicting-impl-with-err.stderr
Normal 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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue