Rollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPC
Add a regression test for issue-68830 Closes #68830
This commit is contained in:
commit
e40601e952
2 changed files with 32 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
// A regression test for #68830. This checks we don't emit
|
||||
// a verbose `conflicting implementations` error.
|
||||
|
||||
#![feature(specialization)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
struct BadStruct {
|
||||
err: MissingType //~ ERROR: cannot find type `MissingType` in this scope
|
||||
}
|
||||
|
||||
trait MyTrait<T> {
|
||||
fn foo();
|
||||
}
|
||||
|
||||
impl<T, D> MyTrait<T> for D {
|
||||
default fn foo() {}
|
||||
}
|
||||
|
||||
impl<T> MyTrait<T> for BadStruct {
|
||||
fn foo() {}
|
||||
}
|
||||
|
||||
fn main() {}
|
|
@ -0,0 +1,9 @@
|
|||
error[E0412]: cannot find type `MissingType` in this scope
|
||||
--> $DIR/issue-68830-spurious-diagnostics.rs:8:10
|
||||
|
|
||||
LL | err: MissingType
|
||||
| ^^^^^^^^^^^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
Loading…
Add table
Add a link
Reference in a new issue