Add raw identifier in a typo suggestion#124510
Conversation
fmease
left a comment
There was a problem hiding this comment.
Thanks for working on this. I have a couple of suggestions.
| (span, snippet, post) | ||
| } else { | ||
| (span, suggestion.candidate.to_string(), String::new()) | ||
| (span, suggestion.candidate.to_ident_string(), String::new()) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Actually, nvm. I don't know what I wrote there 🤦 It was early.
fmease
left a comment
There was a problem hiding this comment.
Looks good, thanks! However, could you check if the other occurrences of suggestion.candidate in this crate should be updated to use to_ident_string(), too? And add regression tests if applicable?
I can't find anything that needs to be fixed, and the other two places that show error messages don't seem to need fixing. https://github.com/rust-lang/rust/blob/master/compiler/rustc_resolve/src/diagnostics.rs#L1597-L1606 (btw, I didn't find the way they called https://github.com/rust-lang/rust/blob/master/compiler/rustc_resolve/src/diagnostics.rs#L1609-L1618 |
|
@bors r+ rollup |
I had to look myself because I didn't know this either until a moment ago: The reason why the |
…ion, r=fmease Add raw identifier in a typo suggestion Fixes rust-lang#68962
…ion, r=fmease Add raw identifier in a typo suggestion Fixes rust-lang#68962
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#122492 (Implement ptr_as_ref_unchecked) - rust-lang#123815 (Fix cannot usage in time.rs) - rust-lang#124059 (default_alloc_error_hook: explain difference to default __rdl_oom in alloc) - rust-lang#124510 (Add raw identifier in a typo suggestion) - rust-lang#124555 (coverage: Clean up creation of MC/DC condition bitmaps) - rust-lang#124593 (Describe and use CStr literals in CStr and CString docs) - rust-lang#124630 (CI: remove `env-x86_64-apple-tests` YAML anchor) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124510 - linyihai:raw-ident-in-typo-suggestion, r=fmease Add raw identifier in a typo suggestion Fixes rust-lang#68962
Fixes #68962