E0599 doesn't show enough context for misformatted code #108603
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.
Code
Current output
Desired output
Compiling playground v0.0.1 (/playground) error[E0599]: no associated item named `Ok` found for struct `HashMap` in the current scope --> src/main.rs:5:5 | + 4 | HashMap:: 5 | Ok(()) | ^^ associated item not found in `HashMap<_, _, _>` For more information about this error, try `rustc --explain E0599`. error: could not compile `playground` due to previous error
Rationale and extra context
The error is correct when the code is properly formatted, otherwise it doesn't show enough code-context.
This happened to me today as I was making changes to a file, literally typed
SomeType::
.. thenRun
(cargo run), and was greeted by this error.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: