-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Spelling suggestions should consider trailing exclamation points #5780
Comments
The search should be first if the spelling mistake is a part of the macros or some other keyword in the language and try and match it with that. If that fails only then suggest other local variables as the correction. |
@sawrubh: I think edit distance takes care of this fine. I don't think |
I think it should suggest a macro if the identifier is identical, but it shouldn't suggest it otherwise |
Still an issue: fn main() {
let result = 1i;
assert(true);
}
|
Still an issue (same input/output as @huonw's comment above) |
This can be done by holding on to the SyntaxEnv (or just a vec of strings built from the syntaxenv) after |
Opened #29968 |
… resolve errors fixes rust-lang#5780
Fix out of bounds access by checking length equality BEFORE accessing by index. Fixes rust-lang#5780 changelog: fix out of bounds access in unnested_or_patterns lint. Edit: I did not bother reducing a testcase from `librustc_typeck` crate but I can confirm that with the change the crash no longer occurs.
As an aside,
assert
->result
is still a hilariously large edit distance.The text was updated successfully, but these errors were encountered: