-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E0109 is out of date #116876
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-error-codes
Area: Explanation of an error code (--explain)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
QuineDot
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Oct 18, 2023
rustbot
added
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
A-error-codes
Area: Explanation of an error code (--explain)
labels
Oct 18, 2023
fmease
added
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
and removed
A-diagnostics
Area: Messages for errors, warnings, and lints
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
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` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-error-codes
Area: Explanation of an error code (--explain)
C-bug
Category: This is a bug.
T-compiler
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
enum
now. Moreover, for type aliases ofenum
s, generic arguments must go after theenum
and not after the variant.See this stabilization report for details. In brief,
Option::<T>::None
has worked since Rust 1.33Alias::<T>::None
has 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
The text was updated successfully, but these errors were encountered: