Rollup merge of #99342 - TaKO8Ki:avoid-symbol-to-string-conversions, r=compiler-errors
Avoid some `Symbol` to `String` conversions This patch removes some Symbol to String conversions.
This commit is contained in:
commit
6277ac2fb8
18 changed files with 50 additions and 59 deletions
|
@ -138,7 +138,7 @@ fn fmt_printer<'a, 'tcx>(infcx: &'a InferCtxt<'_, 'tcx>, ns: Namespace) -> FmtPr
|
|||
if let TypeVariableOriginKind::TypeParameterDefinition(name, _) =
|
||||
infcx.inner.borrow_mut().type_variables().var_origin(ty_vid).kind
|
||||
{
|
||||
Some(name.to_string())
|
||||
Some(name)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ fn fmt_printer<'a, 'tcx>(infcx: &'a InferCtxt<'_, 'tcx>, ns: Namespace) -> FmtPr
|
|||
if let ConstVariableOriginKind::ConstParameterDefinition(name, _) =
|
||||
infcx.inner.borrow_mut().const_unification_table().probe_value(ct_vid).origin.kind
|
||||
{
|
||||
return Some(name.to_string());
|
||||
return Some(name);
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue