1
Fork 0

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:
bors 2021-12-19 09:31:37 +00:00
commit a41a6925ba
140 changed files with 354 additions and 415 deletions

View file

@ -516,7 +516,7 @@ fn push_unqualified_item_name(
) {
match disambiguated_data.data {
DefPathData::CrateRoot => {
output.push_str(&tcx.crate_name(def_id.krate).as_str());
output.push_str(tcx.crate_name(def_id.krate).as_str());
}
DefPathData::ClosureExpr if tcx.generator_kind(def_id).is_some() => {
// Generators look like closures, but we want to treat them differently
@ -529,7 +529,7 @@ fn push_unqualified_item_name(
}
_ => match disambiguated_data.data.name() {
DefPathDataName::Named(name) => {
output.push_str(&name.as_str());
output.push_str(name.as_str());
}
DefPathDataName::Anon { namespace } => {
if cpp_like_names(tcx) {