diff options
| author | Lin Yihai <linyihai@huawei.com> | 2024-04-29 14:59:39 +0800 |
|---|---|---|
| committer | Lin Yihai <linyihai@huawei.com> | 2024-04-29 15:02:12 +0800 |
| commit | 589c2fe24d1f9e7bde8a50b07bb53eb4fbee6d8e (patch) | |
| tree | 386b5cb6543403da60aa8a881a1f91468b0cf2a1 /compiler/rustc_resolve/src/diagnostics.rs | |
| parent | aed2187d53b8789e3a37f50ae36f894a2a679077 (diff) | |
| download | rust-589c2fe24d1f9e7bde8a50b07bb53eb4fbee6d8e.tar.gz rust-589c2fe24d1f9e7bde8a50b07bb53eb4fbee6d8e.zip | |
Add raw identifier in a typo suggestion
Diffstat (limited to 'compiler/rustc_resolve/src/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 12484462f82..01e279b6d04 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -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!( |
