Skip to content

Commit db4b00f

Browse files
committed
Auto merge of #136471 - safinaskar:parallel, r=SparrowLii
tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` This is continuation of rust-lang/rust#132282 . I'm pretty sure I did everything right. In particular, I searched all occurrences of `Lrc` in submodules and made sure that they don't need replacement. There are other possibilities, through. We can define `enum Lrc<T> { Rc(Rc<T>), Arc(Arc<T>) }`. Or we can make `Lrc` a union and on every clone we can read from special thread-local variable. Or we can add a generic parameter to `Lrc` and, yes, this parameter will be everywhere across all codebase. So, if you think we should take some alternative approach, then don't merge this PR. But if it is decided to stick with `Arc`, then, please, merge. cc "Parallel Rustc Front-end" ( rust-lang/rust#113349 ) r? SparrowLii `@rustbot` label WG-compiler-parallel
2 parents 819ab9b + e0d8fb9 commit db4b00f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/debuginfo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::ops::Range;
2+
use std::sync::Arc;
23

34
use gccjit::{Location, RValue};
45
use rustc_abi::Size;
56
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
67
use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoCodegenMethods};
7-
use rustc_data_structures::sync::Lrc;
88
use rustc_index::bit_set::DenseBitSet;
99
use rustc_index::{Idx, IndexVec};
1010
use rustc_middle::mir::{self, Body, SourceScope};
@@ -172,7 +172,7 @@ fn make_mir_scope<'gcc, 'tcx>(
172172
// `lookup_char_pos` return the right information instead.
173173
pub struct DebugLoc {
174174
/// Information about the original source file.
175-
pub file: Lrc<SourceFile>,
175+
pub file: Arc<SourceFile>,
176176
/// The (1-based) line number.
177177
pub line: u32,
178178
/// The (1-based) column number.

0 commit comments

Comments
 (0)