-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
"X is ambiguous" error is missing a span when the standard library source is not available #91028
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
Comments
I’d guess it has something to do with the number of crates and their types available by default. For example, just typing
|
I think the standard library is not always distributed with sources, which sometimes causes weird diagnostics. That could be what's happening here. |
shepmaster
added
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
labels
Nov 19, 2021
Yes, the playground uses the As an example:
|
shepmaster
changed the title
"X is ambiguous" error looks odd when one of the spans is missing
"X is ambiguous" error is missing a span when the standard library source is not available
Nov 19, 2021
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 1, 2021
…l, r=cjgillot Improve error message for `E0659` if the source is not available Fixes rust-lang#91028. The fix is similar to those in rust-lang#89233 and rust-lang#87088. With this change, instead of the dangling ``` note: `Option` could also refer to the enum defined here ``` I get ``` note: `Option` could also refer to an enum from prelude ``` If the standard library source code _is_ available, the output does not change.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 1, 2021
…l, r=cjgillot Improve error message for `E0659` if the source is not available Fixes rust-lang#91028. The fix is similar to those in rust-lang#89233 and rust-lang#87088. With this change, instead of the dangling ``` note: `Option` could also refer to the enum defined here ``` I get ``` note: `Option` could also refer to an enum from prelude ``` If the standard library source code _is_ available, the output does not change.
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
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
This code on the playground
produces the following error
Note how the 2nd note is dangling: no span is shown after it says 'could also refer to the enum defined here'.
I was not able to reproduce this locally, so this might also have to do with something special the playground is doing -- Cc @shepmaster
The text was updated successfully, but these errors were encountered: