Spurious 'conflicting implementations' error when specializing a type with a compilation error #68830
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-specialization
Area: Trait impl specialization
C-bug
Category: This is a bug.
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-specialization
`#![feature(specialization)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code:
gives the following errors:
For some reason, the fact that the definition of
BadStruct
has an error (MissingType
is not defining) causes a 'conflicting implementations' error to be emitted whenBadStruct
has a specialized impl. IfMissingType
is changed to a type which actually exists (e.g.()
), the 'conflicting implementations' error disappears.I found this when working on
rustc
- a missinguse
statement caused 30 spurious specialization-related errors to be emiited, which all disappeared when I added the missing import.The text was updated successfully, but these errors were encountered: