Skip to content

Commit

Permalink
Rollup merge of rust-lang#83699 - JohnTitor:issue-68830, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Add a regression test for issue-68830

Closes rust-lang#68830
  • Loading branch information
Dylan-DPC authored Mar 31, 2021
2 parents d79d6b3 + ce66588 commit 0bf6861
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/ui/specialization/issue-68830-spurious-diagnostics.rs
Original file line number Diff line number Diff line change
@@ -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() {}
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit 0bf6861

Please sign in to comment.