diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-01-20 07:25:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-20 07:25:29 +0100 |
| commit | da7a0c0b306f84b707c4821a21c71ba35e2d5338 (patch) | |
| tree | 1cdd698cee8b3f935eecf5e1a65700a994ff5d14 /compiler | |
| parent | 5f2ad80e183a629eac81f543cee9a1c054aae3fb (diff) | |
| parent | 97ae79ac9d8090dcbf0242865cda171d00ea116a (diff) | |
Rollup merge of #106928 - bvanjoi:print-keyword-raw-identifier, r=petrochenkov
add raw identifier for keyword in suggestion fix https://github.com/rust-lang/rust/issues/106841
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 5576e53e6a7..ae7c20fff0c 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -393,7 +393,7 @@ pub trait PrettyPrinter<'tcx>: match self.tcx().trimmed_def_paths(()).get(&def_id) { None => Ok((self, false)), Some(symbol) => { - self.write_str(symbol.as_str())?; + write!(self, "{}", Ident::with_dummy_span(*symbol))?; Ok((self, true)) } } |
