Skip to content

Commit e40601e

Browse files
authored
Rollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPC
Add a regression test for issue-68830 Closes #68830
2 parents 9e30e57 + ce66588 commit e40601e

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// A regression test for #68830. This checks we don't emit
2+
// a verbose `conflicting implementations` error.
3+
4+
#![feature(specialization)]
5+
#![allow(incomplete_features)]
6+
7+
struct BadStruct {
8+
err: MissingType //~ ERROR: cannot find type `MissingType` in this scope
9+
}
10+
11+
trait MyTrait<T> {
12+
fn foo();
13+
}
14+
15+
impl<T, D> MyTrait<T> for D {
16+
default fn foo() {}
17+
}
18+
19+
impl<T> MyTrait<T> for BadStruct {
20+
fn foo() {}
21+
}
22+
23+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0412]: cannot find type `MissingType` in this scope
2+
--> $DIR/issue-68830-spurious-diagnostics.rs:8:10
3+
|
4+
LL | err: MissingType
5+
| ^^^^^^^^^^^ not found in this scope
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0412`.

0 commit comments

Comments
 (0)