1
Fork 0

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:
Matthias Krüger 2022-07-16 22:30:56 +02:00 committed by GitHub
commit 6277ac2fb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 50 additions and 59 deletions

View file

@ -23,7 +23,7 @@ use rustc_middle::ty::{
use rustc_mir_dataflow::move_paths::{InitKind, MoveOutIndex, MovePathIndex};
use rustc_span::hygiene::DesugaringKind;
use rustc_span::symbol::sym;
use rustc_span::{BytePos, Span};
use rustc_span::{BytePos, Span, Symbol};
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::TraitEngineExt as _;
@ -1227,8 +1227,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
from_closure: false,
region_name:
RegionName {
source:
RegionNameSource::AnonRegionFromUpvar(upvar_span, ref upvar_name),
source: RegionNameSource::AnonRegionFromUpvar(upvar_span, upvar_name),
..
},
span,
@ -1762,7 +1761,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
borrow_span: Span,
name: &Option<String>,
upvar_span: Span,
upvar_name: &str,
upvar_name: Symbol,
escape_span: Span,
) -> DiagnosticBuilder<'cx, ErrorGuaranteed> {
let tcx = self.infcx.tcx;