1
Fork 0

add raw identifier for keyword in suggestion

This commit is contained in:
bohan 2023-01-16 15:09:05 +08:00 committed by bvanjoi
parent 79335f1ac4
commit 97ae79ac9d
4 changed files with 37 additions and 6 deletions

View file

@ -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))
}
}