summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/diagnostics.rs
diff options
context:
space:
mode:
authorLin Yihai <linyihai@huawei.com>2024-04-29 14:59:39 +0800
committerLin Yihai <linyihai@huawei.com>2024-04-29 15:02:12 +0800
commit589c2fe24d1f9e7bde8a50b07bb53eb4fbee6d8e (patch)
tree386b5cb6543403da60aa8a881a1f91468b0cf2a1 /compiler/rustc_resolve/src/diagnostics.rs
parentaed2187d53b8789e3a37f50ae36f894a2a679077 (diff)
downloadrust-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.rs2
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!(