about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-04 20:49:23 +0000
committerbors <bors@rust-lang.org>2023-05-04 20:49:23 +0000
commit74c4821045c68d42bb8b8a7c998bdb5c2a72bd0d (patch)
treeba442cf2a77a47739ffe3278df8f55dbd681d6dd /compiler/rustc_span/src
parenteb7a7434215dd9d4b7cc18746ad1d0e531c25325 (diff)
parent07266362c6b29139dc09ecd4b963722690eaa31f (diff)
downloadrust-74c4821045c68d42bb8b8a7c998bdb5c2a72bd0d.tar.gz
rust-74c4821045c68d42bb8b8a7c998bdb5c2a72bd0d.zip
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).
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
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 }
     }
 }