Repository navigation
E0109 is out of date #116876
Copy link
Copy link
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-error-codesArea: Explanation of an error code (--explain)Area: Explanation of an error code (--explain)C-bugCategory: This is a bug.Category: This is a bug.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
- addedA-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 Oct 18, 2023 - addedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingA-error-codesArea: Explanation of an error code (--explain)Area: Explanation of an error code (--explain)
on Oct 18, 2023 - addedA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.and removedA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Oct 19, 2023 Can I work on this ?
Yes, why not? Just claim the issue as explained here and start working on it.
I forgot I filed this but just ran into it again while checking something else out, heh.
pub enum Foo<'a, T = String> { Bar(&'a T), Baz, } fn main() { // These two work let foo = Foo::Baz::<'_, String>; let foo = Foo::<'_, String>::Baz; // This fails let foo = Foo::<'_>::Baz::<String>; }
Playground. The inline error is actually incorrect too.
error[E0109]: type arguments are not allowed on unit variant `Baz` --> src/main.rs:11:32 | 11 | let foo = Foo::<'_>::Baz::<String>; | --- ^^^^^^ type argument not allowed | | | not allowed on unit variant `Baz`
@rustbot claim
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-error-codesArea: Explanation of an error code (--explain)Area: Explanation of an error code (--explain)C-bugCategory: This is a bug.Category: This is a bug.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.
Code
Current output
Desired output
Rationale and extra context
Generic arguments can go after the
enumnow. Moreover, for type aliases ofenums, generic arguments must go after theenumand not after the variant.See this stabilization report for details. In brief,
Option::<T>::Nonehas worked since Rust 1.33Alias::<T>::Nonehas worked since Rust 1.37, butAlias::None::<T>doesn't work so far (Rust 1.73)Other cases
No response
Anything else?
@rustbot labels +A-error-codes