mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
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
@ -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…
Reference in New Issue
Block a user