-
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
Confusing errors for call_method(arg_name: value)
when value
is not a literal
#105810
Labels
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
asquared31415
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
Dec 17, 2022
No one should attempt to fix this until my PR where I remove type ascription. |
This comment was marked as resolved.
This comment was marked as resolved.
rustbot
added
the
S-blocked
Status: Marked as blocked ❌ on something else such as an RFC or other implementation work.
label
Dec 23, 2022
rustbot
removed
the
S-blocked
Status: Marked as blocked ❌ on something else such as an RFC or other implementation work.
label
May 3, 2023
On beta it seems to be fixed? error: invalid `struct` delimiters or `fn` call arguments
--> test.rs:5:5
|
5 | uwu(val: x);
| ^^^^^^^^^^^
|
help: if `uwu` is a struct, use braces as delimiters
|
5 | uwu { val: x };
| ~ ~
help: if `uwu` is a function, use the arguments directly
|
5 - uwu(val: x);
5 + uwu(x);
|
error: aborting due to previous error
|
Tests:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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:
Playground
The current output is:
Ideally the output should look like it does when
value
is a literal, like an integer, float, or string literalDiagnostics reproduce on all of current stable, beta, and nightly:
Stable 1.66.0
Beta 1.67.0-beta.2
Nightly 1.68.0 2022-12-15
The text was updated successfully, but these errors were encountered: