-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improve error message for E0659
if the source is not available
#91298
Conversation
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
Could you add a ui test demonstrating this behaviour? |
Unfortunately not, because this behavior can only be reproduced if the library source code is not available, which is not the case after building rustc locally. Some more complex mechanism would be needed (see e.g. #87088 (comment)), and I don't know how to write that. |
@bors r+ |
📌 Commit 6dfed31 has been approved by |
…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.
…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.
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#87160 (When recovering from a `:` in a pattern, use adequate AST pattern) - rust-lang#90985 (Use `get_diagnostic_name` more) - rust-lang#91087 (Remove all migrate.nll.stderr files) - rust-lang#91207 (Add support for LLVM coverage mapping format versions 5 and 6) - rust-lang#91298 (Improve error message for `E0659` if the source is not available) - rust-lang#91346 (Add `Option::inspect` and `Result::{inspect, inspect_err}`) - rust-lang#91404 (Fix bad `NodeId` limit checking.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #91028. The fix is similar to those in #89233 and #87088. With this change, instead of the dangling
I get
If the standard library source code is available, the output does not change.