1
Fork 0

Auto merge of #111014 - klensy:no-rc, r=WaffleLapkin

try to downgrade Arc -> Lrc -> Rc -> no-Rc in few places

Expecting this be not slower on non-parallel compiler and probably faster on parallel (checked that this PR builds on it).
This commit is contained in:
bors 2023-05-04 20:49:23 +00:00
commit 74c4821045
5 changed files with 24 additions and 28 deletions

View file

@ -2,6 +2,7 @@
use hir::CRATE_HIR_ID;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::sync::Lrc;
use rustc_expand::base::resolve_path;
use rustc_hir as hir;
use rustc_hir::HirId;
@ -9,8 +10,6 @@ use rustc_middle::ty::TyCtxt;
use rustc_middle::{query::LocalCrate, ty::query::Providers};
use rustc_span::{sym, DebuggerVisualizerFile, DebuggerVisualizerType};
use std::sync::Arc;
use crate::errors::DebugVisualizerUnreadable;
fn check_for_debugger_visualizer(
@ -52,7 +51,7 @@ fn check_for_debugger_visualizer(
match std::fs::read(&file) {
Ok(contents) => {
debugger_visualizers
.insert(DebuggerVisualizerFile::new(Arc::from(contents), visualizer_type));
.insert(DebuggerVisualizerFile::new(Lrc::from(contents), visualizer_type));
}
Err(error) => {
tcx.sess.emit_err(DebugVisualizerUnreadable {