Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk
Remove `SymbolStr` This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
This commit is contained in:
commit
a41a6925ba
140 changed files with 354 additions and 415 deletions
|
@ -173,7 +173,7 @@ impl DisambiguatedDefPathData {
|
|||
if verbose && self.disambiguator != 0 {
|
||||
write!(writer, "{}#{}", name, self.disambiguator)
|
||||
} else {
|
||||
writer.write_str(&name.as_str())
|
||||
writer.write_str(name.as_str())
|
||||
}
|
||||
}
|
||||
DefPathDataName::Anon { namespace } => {
|
||||
|
@ -499,7 +499,7 @@ impl DefPathData {
|
|||
impl fmt::Display for DefPathData {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self.name() {
|
||||
DefPathDataName::Named(name) => f.write_str(&name.as_str()),
|
||||
DefPathDataName::Named(name) => f.write_str(name.as_str()),
|
||||
// FIXME(#70334): this will generate legacy {{closure}}, {{impl}}, etc
|
||||
DefPathDataName::Anon { namespace } => write!(f, "{{{{{}}}}}", namespace),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue