Repository navigation
E0223 should not be given in contexts where ::Thing cannot be an associated type #49566
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Activity
- addedC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
on Jun 29, 2018 Current output:
error: no variant `Baz` in enum `Foo` --> src/main.rs:6:18 | 1 | enum Foo { | -------- variant `Baz` not found here ... 6 | let x = Foo::Baz { id: 1 }; | ^^^ help: there is a variant with a similar name: `Bar`error[E0599]: no variant or associated item named `Baz` found for type `Foo` in the current scope --> src/main.rs:6:18 | 1 | enum Foo { | -------- variant or associated item `Baz` not found here ... 6 | let x = Foo::Baz(()); | ^^^ | | | variant or associated item not found in `Foo` | help: there is a variant with a similar name: `Bar`error[E0599]: no variant or associated item named `Baz` found for type `Foo` in the current scope --> src/main.rs:6:18 | 1 | enum Foo { | -------- variant or associated item `Baz` not found here ... 6 | let x = Foo::Baz; | ^^^ | | | variant or associated item not found in `Foo` | help: there is a variant with a similar name: `Bar`It is close enough, but it needs to be turned into a E0599 instead of a codeless error.
- addedD-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.
on Jan 8, 2020 - added a commit that references this issue
on Jan 9, 2020 - added a commit that references this issue
on Jan 10, 2020
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Specifically, when there is code in the form of
SomeEnum::MissingVariant { field: () }, we should be receiving E0599, behaving the same as if we had writtenSomeEnum::MissingVariant(()).Example to reproduce: https://play.rust-lang.org/?gist=5fd6bb1d589b9e27b7b9ba0cd8d6cb50&version=stable