diff options
| author | bohan <bohan-zhang@foxmail.com> | 2023-01-16 15:09:05 +0800 |
|---|---|---|
| committer | bvanjoi <610376039@qq.com> | 2023-01-20 00:36:20 +0800 |
| commit | 97ae79ac9d8090dcbf0242865cda171d00ea116a (patch) | |
| tree | dd4d377c78d4990471e20968d7cb8bd5689f2841 /compiler | |
| parent | 79335f1ac4f6bc72795d4ac84764aa185648b5f2 (diff) | |
| download | rust-97ae79ac9d8090dcbf0242865cda171d00ea116a.tar.gz rust-97ae79ac9d8090dcbf0242865cda171d00ea116a.zip | |
add raw identifier for keyword in suggestion
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)) } } |
