Closed
Description
rust/compiler/rustc_resolve/src/late.rs
Lines 3480 to 3488 in 511364e
When a path is failed to be resolved, rustc will enrich the error with many suggestions like adding missing imports.
For example
fn main() {
HashMap::new();
}
suggests adding the missing import.
But as seen in the code above, it just bails out on paths where there is no call, like
fn main() {
HashMap::new;
}
This is probably a weird hack around some oddity in the suggestion code (maybe the extremely hacky diagnostics merging that happens in there).
Remove the early return above and figure out what happens. If nothing bad happens, great. If something bad happens, figure out why and fix it properly.