-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Unhelpful error message when missing the final path segment for a function call #120892
Comments
Oh, wow, it didn't even occur to me until now that the expression Edit: Wow, even |
This should pretty easy to fix, basically if we fail to parse a type here rust/compiler/rustc_parse/src/parser/path.rs Line 375 in 7954c28
we should first of all attach a label to the Furthermore, if the I will gladly mentor & review any PR for this. |
@rustbot claim |
Hello @fmease , is this issue still open for mentoring? I can see that @SummerGram already claimed the issue, but there seems to be no progress. |
I read the code but no time to finish it at the moment. You can do it. |
Improve diagnostics for parenthesized type arguments Fixes rust-lang#120892 r? fmease
Improve diagnostics for parenthesized type arguments Fixes rust-lang#120892 r? fmease
Rollup merge of rust-lang#122152 - wutchzone:120892, r=fmease Improve diagnostics for parenthesized type arguments Fixes rust-lang#120892 r? fmease
Given an invalid call such as:
The following diagnostic is issued:
This gets much worse on multiline calls:
Which just prints out a diagnostic nowhere near the error:
Ideally this should mention something about either missing a missing turbofish (e.g.
foo::<..>("foo")
), or a missing identifier (e.g.foo::bar("foo")
). This would at least get the error pointing to the correct spot.Latest playground nightly (2024-02-09)
The text was updated successfully, but these errors were encountered: