1
Fork 0

Rollup merge of #124510 - linyihai:raw-ident-in-typo-suggestion, r=fmease

Add raw identifier in a typo suggestion

Fixes #68962
This commit is contained in:
Matthias Krüger 2024-05-03 20:33:45 +02:00 committed by GitHub
commit bd305e10c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 1 deletions

View file

@ -1617,7 +1617,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
let post = format!(", consider renaming `{}` into `{snippet}`", suggestion.candidate);
(span, snippet, post)
} else {
(span, suggestion.candidate.to_string(), String::new())
(span, suggestion.candidate.to_ident_string(), String::new())
};
let msg = match suggestion.target {
SuggestionTarget::SimilarlyNamed => format!(