diff options
| author | klensy <klensy@users.noreply.github.com> | 2023-04-28 13:41:48 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2023-04-30 13:19:25 +0300 |
| commit | 597c6514d142886f807cfcfd04291b464bb43787 (patch) | |
| tree | 1d27cb703756d2d37cd3ef0c91baa73799cf9a62 | |
| parent | a621ec35aef00181be89c65a36bc44d061b99206 (diff) | |
| download | rust-597c6514d142886f807cfcfd04291b464bb43787.tar.gz rust-597c6514d142886f807cfcfd04291b464bb43787.zip | |
Arc -> Lrc
| -rw-r--r-- | compiler/rustc_passes/src/debugger_visualizer.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_passes/src/debugger_visualizer.rs b/compiler/rustc_passes/src/debugger_visualizer.rs index 9dd39a5c9fe..72371b9950b 100644 --- a/compiler/rustc_passes/src/debugger_visualizer.rs +++ b/compiler/rustc_passes/src/debugger_visualizer.rs @@ -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 { diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 8a900ca427e..341cc61fd1c 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -69,7 +69,6 @@ use std::hash::Hash; use std::ops::{Add, Range, Sub}; use std::path::{Path, PathBuf}; use std::str::FromStr; -use std::sync::Arc; use md5::Digest; use md5::Md5; @@ -1269,13 +1268,13 @@ pub enum DebuggerVisualizerType { #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Encodable, Decodable)] pub struct DebuggerVisualizerFile { /// The complete debugger visualizer source. - pub src: Arc<[u8]>, + pub src: Lrc<[u8]>, /// Indicates which visualizer type this targets. pub visualizer_type: DebuggerVisualizerType, } impl DebuggerVisualizerFile { - pub fn new(src: Arc<[u8]>, visualizer_type: DebuggerVisualizerType) -> Self { + pub fn new(src: Lrc<[u8]>, visualizer_type: DebuggerVisualizerType) -> Self { DebuggerVisualizerFile { src, visualizer_type } } } |
