Open
Description
Currently, we suggest typo fixes in case of function calls, locals, and field accesses. So, both the marked lines below will suggest the correct fix:
struct A {foo: u8}
fn main() {
let x = A {foo: 1};
x.fob; // here
let aaaaaaa=1;
let z = aaaaaab; // here
}
However, this is not the case for imports, crates, and inline paths. We should fix this.
This is probably not an easy bug, but should be fun. Basically you need to look for the source of the "could not find X" error, and do something similar to
rust/src/librustc_resolve/lib.rs
Line 3625 in 99925fb
@apasel422 @wafflespeanut want to work on this?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Low priorityLow priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.