-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Bad diagnostics when using associated const on type without turbofish #82566
Labels
A-const-generics
Area: const generics (parameters and arguments)
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.
Comments
BoxyUwU
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
Feb 26, 2021
the help message seems to only be missing if there are 2 const arguments: struct Foo<const N: usize, const M: usize>;
impl Foo<3, 4> {
const SUM: () = ();
}
fn main() {
Foo<3, 4>::SUM
} using type parameters or just one const param causes a useful help message struct Foo<const N: usize>;
impl Foo<3> {
const SUM: () = ();
}
fn main() {
Foo<3>::SUM
} |
@rustbot claim |
All fixed. |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Mar 2, 2021
Fix turbofish recovery with multiple generic args This consists of two commits, each can be individually reviewed. - First commit fixes the issue in [this comment](rust-lang#82566 (comment)). - Second commit fixes rust-lang#82566 --- r? ````@estebank````
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
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.
Given the following code: here
The current output is:
Ideally the output should mention that the user needs to use a turbofish here:
Add::<10, 12>::SUM
cc @lcnr
The text was updated successfully, but these errors were encountered: