Skip to content

Commit 1e6d631

Browse files
committed
rustup: update to nightly-2025-02-16 (~1.86).
1 parent ff54cd7 commit 1e6d631

26 files changed

+106
-77
lines changed

crates/rustc_codegen_spirv/build.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ use std::{env, fs, mem};
1818
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
1919
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
2020
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
21-
channel = "nightly-2025-01-03"
21+
channel = "nightly-2025-02-16"
2222
components = ["rust-src", "rustc-dev", "llvm-tools"]
23-
# commit_hash = 4363f9b6f6d3656d94adbcabba6348a485ef9a56"#;
23+
# commit_hash = 9cd60bd2ccc41bc898d2ad86728f14035d2df72d"#;
2424

2525
fn rustc_output(arg: &str) -> Result<String, Box<dyn Error>> {
2626
let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into());
@@ -276,6 +276,9 @@ mod maybe_pqp_cg_ssa;
276276

277277
println!("cargo::rustc-check-cfg=cfg(rustc_codegen_spirv_disable_pqp_cg_ssa)");
278278

279+
// HACK(eddyb) `if cfg!(llvm_enzyme)` added upstream for autodiff support.
280+
println!("cargo::rustc-check-cfg=cfg(llvm_enzyme)");
281+
279282
Ok(())
280283
}
281284

crates/rustc_codegen_spirv/src/abi.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ use crate::codegen_cx::CodegenCx;
66
use crate::spirv_type::SpirvType;
77
use itertools::Itertools;
88
use rspirv::spirv::{Dim, ImageFormat, StorageClass, Word};
9+
use rustc_abi::ExternAbi as Abi;
10+
use rustc_abi::{
11+
Align, BackendRepr, FieldsShape, LayoutData, Primitive, ReprFlags, ReprOptions, Scalar, Size,
12+
TagEncoding, VariantIdx, Variants,
13+
};
914
use rustc_data_structures::fx::FxHashMap;
1015
use rustc_errors::ErrorGuaranteed;
1116
use rustc_index::Idx;
@@ -20,12 +25,7 @@ use rustc_middle::{bug, span_bug};
2025
use rustc_span::DUMMY_SP;
2126
use rustc_span::def_id::DefId;
2227
use rustc_span::{Span, Symbol};
23-
use rustc_target::abi::call::{ArgAbi, ArgAttributes, FnAbi, PassMode};
24-
use rustc_target::abi::{
25-
Align, BackendRepr, FieldsShape, LayoutData, Primitive, ReprFlags, ReprOptions, Scalar, Size,
26-
TagEncoding, VariantIdx, Variants,
27-
};
28-
use rustc_target::spec::abi::Abi;
28+
use rustc_target::callconv::{ArgAbi, ArgAttributes, FnAbi, PassMode};
2929
use std::cell::RefCell;
3030
use std::collections::hash_map::Entry;
3131
use std::fmt;
@@ -110,6 +110,7 @@ pub(crate) fn provide(providers: &mut Providers) {
110110
size,
111111
max_repr_align,
112112
unadjusted_abi_align,
113+
randomization_seed,
113114
} = *layout;
114115
LayoutData {
115116
fields: match *fields {
@@ -156,6 +157,7 @@ pub(crate) fn provide(providers: &mut Providers) {
156157
size,
157158
max_repr_align,
158159
unadjusted_abi_align,
160+
randomization_seed,
159161
}
160162
}
161163

@@ -986,9 +988,10 @@ fn trans_intrinsic_type<'tcx>(
986988
cx: &CodegenCx<'tcx>,
987989
const_: Const<'tcx>,
988990
) -> Result<P, ErrorGuaranteed> {
989-
let (const_val, const_ty) = const_
990-
.try_to_valtree()
991-
.expect("expected monomorphic const in codegen");
991+
let ty::Value {
992+
ty: const_ty,
993+
valtree: const_val,
994+
} = const_.to_value();
992995
assert!(const_ty.is_integral());
993996
const_val
994997
.try_to_scalar_int()

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use crate::spirv_type::SpirvType;
1010
use itertools::Itertools;
1111
use rspirv::dr::{InsertPoint, Instruction, Operand};
1212
use rspirv::spirv::{Capability, MemoryModel, MemorySemantics, Op, Scope, StorageClass, Word};
13+
use rustc_abi::{Align, BackendRepr, Scalar, Size, WrappingRange};
1314
use rustc_apfloat::{Float, Round, Status, ieee};
1415
use rustc_codegen_ssa::MemFlags;
1516
use rustc_codegen_ssa::common::{
@@ -27,8 +28,7 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
2728
use rustc_middle::ty::layout::LayoutOf;
2829
use rustc_middle::ty::{self, Ty};
2930
use rustc_span::Span;
30-
use rustc_target::abi::call::FnAbi;
31-
use rustc_target::abi::{Align, BackendRepr, Scalar, Size, WrappingRange};
31+
use rustc_target::callconv::FnAbi;
3232
use smallvec::SmallVec;
3333
use std::borrow::Cow;
3434
use std::cell::Cell;
@@ -2355,9 +2355,19 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
23552355
}
23562356
}
23572357

2358-
fn icmp(&mut self, op: IntPredicate, lhs: Self::Value, rhs: Self::Value) -> Self::Value {
2358+
fn icmp(&mut self, op: IntPredicate, lhs: Self::Value, mut rhs: Self::Value) -> Self::Value {
23592359
// Note: the signedness of the opcode doesn't have to match the signedness of the operands.
23602360
use IntPredicate::*;
2361+
2362+
if lhs.ty != rhs.ty
2363+
&& [lhs, rhs].map(|v| matches!(self.lookup_type(v.ty), SpirvType::Pointer { .. }))
2364+
== [true, true]
2365+
{
2366+
// HACK(eddyb) temporary workaround for untyped pointers upstream.
2367+
// FIXME(eddyb) replace with untyped memory SPIR-V + `qptr` or similar.
2368+
rhs = self.pointercast(rhs, lhs.ty);
2369+
}
2370+
23612371
assert_ty_eq!(self, lhs.ty, rhs.ty);
23622372
let b = SpirvType::Bool.def(self.span(), self);
23632373
match self.lookup_type(lhs.ty) {
@@ -3566,9 +3576,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
35663576
.map(|s| Cow::Owned(s.replace('%', "%%")))
35673577
.interleave(ref_arg_ids_with_ty_and_spec.iter().map(
35683578
|&(ref_id, ty, spec)| {
3569-
use rustc_target::abi::{
3570-
Float::*, Integer::*, Primitive::*,
3571-
};
3579+
use rustc_abi::{Float::*, Integer::*, Primitive::*};
35723580

35733581
let layout = self.layout_of(ty);
35743582

crates/rustc_codegen_spirv/src/builder/byte_addressable_buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use super::Builder;
55
use crate::builder_spirv::{SpirvValue, SpirvValueExt, SpirvValueKind};
66
use crate::spirv_type::SpirvType;
77
use rspirv::spirv::Word;
8+
use rustc_abi::{Align, Size};
89
use rustc_codegen_ssa::traits::BuilderMethods;
910
use rustc_errors::ErrorGuaranteed;
1011
use rustc_span::DUMMY_SP;
11-
use rustc_target::abi::call::PassMode;
12-
use rustc_target::abi::{Align, Size};
12+
use rustc_target::callconv::PassMode;
1313

1414
impl<'a, 'tcx> Builder<'a, 'tcx> {
1515
fn load_err(&mut self, original_type: Word, invalid_type: Word) -> SpirvValue {

crates/rustc_codegen_spirv/src/builder/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_middle::ty::{FnDef, Instance, Ty, TyKind, TypingEnv};
1717
use rustc_middle::{bug, ty};
1818
use rustc_span::Span;
1919
use rustc_span::sym;
20-
use rustc_target::abi::call::{FnAbi, PassMode};
20+
use rustc_target::callconv::{FnAbi, PassMode};
2121
use std::assert_matches::assert_matches;
2222

2323
fn int_type_width_signed(ty: Ty<'_>, cx: &CodegenCx<'_>) -> Option<(u64, bool)> {

crates/rustc_codegen_spirv/src/builder/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use crate::builder_spirv::{BuilderCursor, SpirvValue, SpirvValueExt};
1717
use crate::codegen_cx::CodegenCx;
1818
use crate::spirv_type::SpirvType;
1919
use rspirv::spirv::Word;
20+
use rustc_abi::{HasDataLayout, Size, TargetDataLayout};
2021
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
2122
use rustc_codegen_ssa::mir::place::PlaceRef;
2223
use rustc_codegen_ssa::traits::{
@@ -34,8 +35,7 @@ use rustc_middle::ty::layout::{
3435
use rustc_middle::ty::{Instance, Ty, TyCtxt, TypingEnv};
3536
use rustc_span::Span;
3637
use rustc_span::def_id::DefId;
37-
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
38-
use rustc_target::abi::{HasDataLayout, Size, TargetDataLayout};
38+
use rustc_target::callconv::{ArgAbi, FnAbi, PassMode};
3939
use rustc_target::spec::{HasTargetSpec, Target};
4040
use std::ops::{Deref, Range};
4141

crates/rustc_codegen_spirv/src/builder_spirv.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ use rspirv::spirv::{
1212
AddressingModel, Capability, MemoryModel, Op, SourceLanguage, StorageClass, Word,
1313
};
1414
use rspirv::{binary::Assemble, binary::Disassemble};
15+
use rustc_abi::Size;
1516
use rustc_arena::DroplessArena;
1617
use rustc_codegen_ssa::traits::ConstCodegenMethods as _;
1718
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
18-
use rustc_data_structures::sync::Lrc;
1919
use rustc_middle::bug;
2020
use rustc_middle::mir::interpret::ConstAllocation;
2121
use rustc_middle::ty::TyCtxt;
2222
use rustc_span::source_map::SourceMap;
2323
use rustc_span::symbol::Symbol;
2424
use rustc_span::{DUMMY_SP, FileName, FileNameDisplayPreference, SourceFile, Span};
25-
use rustc_target::abi::Size;
2625
use std::assert_matches::assert_matches;
2726
use std::cell::{RefCell, RefMut};
2827
use std::hash::{Hash, Hasher};
2928
use std::iter;
3029
use std::ops::Range;
3130
use std::str;
31+
use std::sync::Arc;
3232
use std::{fs::File, io::Write, path::Path};
3333

3434
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
@@ -346,16 +346,16 @@ struct WithConstLegality<V> {
346346
/// equivalent to a whole `rustc` `SourceFile`, but has O(1) `Eq` and `Hash`
347347
/// implementations (i.e. not involving the path or the contents of the file).
348348
///
349-
/// This is possible because we can compare `Lrc<SourceFile>`s by equality, as
349+
/// This is possible because we can compare `Arc<SourceFile>`s by equality, as
350350
/// `rustc`'s `SourceMap` already ensures that only one `SourceFile` will be
351351
/// allocated for some given file. For hashing, we could hash the address, or
352352
///
353-
struct DebugFileKey(Lrc<SourceFile>);
353+
struct DebugFileKey(Arc<SourceFile>);
354354

355355
impl PartialEq for DebugFileKey {
356356
fn eq(&self, other: &Self) -> bool {
357357
let (Self(self_sf), Self(other_sf)) = (self, other);
358-
Lrc::ptr_eq(self_sf, other_sf)
358+
Arc::ptr_eq(self_sf, other_sf)
359359
}
360360
}
361361
impl Eq for DebugFileKey {}
@@ -829,7 +829,7 @@ impl<'tcx> BuilderSpirv<'tcx> {
829829
(self.def_debug_file(lo_loc.file), lo_line_col..hi_line_col)
830830
}
831831

832-
fn def_debug_file(&self, sf: Lrc<SourceFile>) -> DebugFileSpirv<'tcx> {
832+
fn def_debug_file(&self, sf: Arc<SourceFile>) -> DebugFileSpirv<'tcx> {
833833
*self
834834
.debug_file_cache
835835
.borrow_mut()
@@ -839,7 +839,7 @@ impl<'tcx> BuilderSpirv<'tcx> {
839839

840840
// FIXME(eddyb) it would be nicer if we could just rely on
841841
// `RealFileName::to_string_lossy` returning `Cow<'_, str>`,
842-
// but sadly that `'_` is the lifetime of the temporary `Lrc`,
842+
// but sadly that `'_` is the lifetime of the temporary `Arc`,
843843
// not `'tcx`, so we have to arena-allocate to get `&'tcx str`.
844844
let file_name = match &sf.name {
845845
FileName::Real(name) => {

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use crate::abi::ConvSpirvType;
66
use crate::builder_spirv::{SpirvConst, SpirvValue, SpirvValueExt, SpirvValueKind};
77
use crate::spirv_type::SpirvType;
88
use rspirv::spirv::Word;
9+
use rustc_abi::{self as abi, AddressSpace, Float, HasDataLayout, Integer, Primitive, Size};
910
use rustc_codegen_ssa::traits::{ConstCodegenMethods, MiscCodegenMethods, StaticCodegenMethods};
1011
use rustc_middle::bug;
1112
use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar, alloc_range};
1213
use rustc_middle::ty::layout::LayoutOf;
1314
use rustc_span::{DUMMY_SP, Span};
14-
use rustc_target::abi::{self, AddressSpace, Float, HasDataLayout, Integer, Primitive, Size};
1515

1616
impl<'tcx> CodegenCx<'tcx> {
1717
pub fn def_constant(&self, ty: Word, val: SpirvConst<'_, 'tcx>) -> SpirvValue {
@@ -116,6 +116,9 @@ impl<'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'tcx> {
116116
fn const_undef(&self, ty: Self::Type) -> Self::Value {
117117
self.undef(ty)
118118
}
119+
fn is_undef(&self, v: Self::Value) -> bool {
120+
matches!(self.builder.lookup_const(v), Some(SpirvConst::Undef))
121+
}
119122
fn const_poison(&self, ty: Self::Type) -> Self::Value {
120123
// No distinction between undef and poison.
121124
self.const_undef(ty)
@@ -266,7 +269,12 @@ impl<'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'tcx> {
266269
GlobalAlloc::VTable(vty, dyn_ty) => {
267270
let alloc = self
268271
.tcx
269-
.global_alloc(self.tcx.vtable_allocation((vty, dyn_ty.principal())))
272+
.global_alloc(self.tcx.vtable_allocation((
273+
vty,
274+
dyn_ty.principal().map(|principal| {
275+
self.tcx.instantiate_bound_regions_with_erased(principal)
276+
}),
277+
)))
270278
.unwrap_memory();
271279
let pointee = match self.lookup_type(ty) {
272280
SpirvType::Pointer { pointee } => pointee,

crates/rustc_codegen_spirv/src/codegen_cx/declare.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::custom_decorations::{CustomDecoration, SrcLocDecoration};
99
use crate::spirv_type::SpirvType;
1010
use itertools::Itertools;
1111
use rspirv::spirv::{FunctionControl, LinkageType, StorageClass, Word};
12+
use rustc_abi::Align;
1213
use rustc_attr_parsing::InlineAttr;
1314
use rustc_codegen_ssa::traits::{PreDefineCodegenMethods, StaticCodegenMethods};
1415
use rustc_hir::def::DefKind;
@@ -19,13 +20,14 @@ use rustc_middle::ty::layout::{FnAbiOf, LayoutOf};
1920
use rustc_middle::ty::{self, Instance, TypeVisitableExt, TypingEnv};
2021
use rustc_span::Span;
2122
use rustc_span::def_id::DefId;
22-
use rustc_target::abi::Align;
2323

2424
fn attrs_to_spirv(attrs: &CodegenFnAttrs) -> FunctionControl {
2525
let mut control = FunctionControl::NONE;
2626
match attrs.inline {
2727
InlineAttr::None => (),
28-
InlineAttr::Hint | InlineAttr::Always => control.insert(FunctionControl::INLINE),
28+
InlineAttr::Hint | InlineAttr::Always | InlineAttr::Force { .. } => {
29+
control.insert(FunctionControl::INLINE)
30+
}
2931
InlineAttr::Never => control.insert(FunctionControl::DONT_INLINE),
3032
}
3133
if attrs.flags.contains(CodegenFnAttrFlags::FFI_PURE) {

crates/rustc_codegen_spirv/src/codegen_cx/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc_middle::span_bug;
1919
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
2020
use rustc_middle::ty::{self, Instance, Ty};
2121
use rustc_span::Span;
22-
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
22+
use rustc_target::callconv::{ArgAbi, FnAbi, PassMode};
2323
use std::assert_matches::assert_matches;
2424

2525
/// Various information about an entry-point parameter, which can only be deduced

crates/rustc_codegen_spirv/src/codegen_cx/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::maybe_pqp_cg_ssa as rustc_codegen_ssa;
1616
use itertools::Itertools as _;
1717
use rspirv::dr::{Module, Operand};
1818
use rspirv::spirv::{Decoration, LinkageType, Op, Word};
19+
use rustc_abi::{AddressSpace, HasDataLayout, TargetDataLayout};
1920
use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
2021
use rustc_codegen_ssa::mir::debuginfo::{FunctionDebugContext, VariableKind};
2122
use rustc_codegen_ssa::traits::{
@@ -27,12 +28,11 @@ use rustc_hir::def_id::DefId;
2728
use rustc_middle::mir;
2829
use rustc_middle::mir::mono::CodegenUnit;
2930
use rustc_middle::ty::layout::{HasTyCtxt, HasTypingEnv};
30-
use rustc_middle::ty::{Instance, PolyExistentialTraitRef, Ty, TyCtxt, TypingEnv};
31+
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypingEnv};
3132
use rustc_session::Session;
3233
use rustc_span::symbol::Symbol;
3334
use rustc_span::{DUMMY_SP, SourceFile, Span};
34-
use rustc_target::abi::call::{FnAbi, PassMode};
35-
use rustc_target::abi::{AddressSpace, HasDataLayout, TargetDataLayout};
35+
use rustc_target::callconv::{FnAbi, PassMode};
3636
use rustc_target::spec::{HasTargetSpec, Target, TargetTuple};
3737
use std::cell::RefCell;
3838
use std::collections::BTreeSet;
@@ -52,7 +52,7 @@ pub struct CodegenCx<'tcx> {
5252
pub function_parameter_values: RefCell<FxHashMap<Word, Vec<SpirvValue>>>,
5353
pub type_cache: TypeCache<'tcx>,
5454
/// Cache generated vtables
55-
pub vtables: RefCell<FxHashMap<(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>), SpirvValue>>,
55+
pub vtables: RefCell<FxHashMap<(Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>), SpirvValue>>,
5656
pub ext_inst: RefCell<ExtInst>,
5757
/// Invalid SPIR-V IDs that should be stripped from the final binary,
5858
/// each with its own reason and span that should be used for reporting
@@ -849,7 +849,7 @@ impl<'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'tcx> {
849849
#[allow(clippy::type_complexity)]
850850
fn vtables(
851851
&self,
852-
) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>), Self::Value>> {
852+
) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>), Self::Value>> {
853853
&self.vtables
854854
}
855855

@@ -910,7 +910,7 @@ impl<'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'tcx> {
910910
fn create_vtable_debuginfo(
911911
&self,
912912
_ty: Ty<'tcx>,
913-
_trait_ref: Option<PolyExistentialTraitRef<'tcx>>,
913+
_trait_ref: Option<ty::ExistentialTraitRef<'tcx>>,
914914
_vtable: Self::Value,
915915
) {
916916
// Ignore.

crates/rustc_codegen_spirv/src/codegen_cx/type_.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use super::CodegenCx;
55
use crate::abi::ConvSpirvType;
66
use crate::spirv_type::SpirvType;
77
use rspirv::spirv::Word;
8+
use rustc_abi::{AddressSpace, BackendRepr, Reg};
89
use rustc_codegen_ssa::common::TypeKind;
910
use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, LayoutTypeCodegenMethods};
1011
use rustc_middle::ty::Ty;
@@ -14,8 +15,7 @@ use rustc_middle::ty::layout::{
1415
use rustc_middle::{bug, span_bug};
1516
use rustc_span::source_map::Spanned;
1617
use rustc_span::{DUMMY_SP, Span};
17-
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
18-
use rustc_target::abi::{AddressSpace, BackendRepr};
18+
use rustc_target::callconv::{CastTarget, FnAbi};
1919

2020
impl<'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'tcx> {
2121
type LayoutOfResult = TyAndLayout<'tcx>;

crates/rustc_codegen_spirv/src/custom_decorations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ use either::Either;
77
use rspirv::dr::{Instruction, Module, Operand};
88
use rspirv::spirv::{Decoration, Op, Word};
99
use rustc_data_structures::fx::FxIndexMap;
10-
use rustc_data_structures::sync::Lrc;
1110
use rustc_span::{FileName, SourceFile};
1211
use rustc_span::{Span, source_map::SourceMap};
1312
use smallvec::SmallVec;
1413
use std::borrow::Cow;
1514
use std::marker::PhantomData;
1615
use std::path::PathBuf;
16+
use std::sync::Arc;
1717
use std::{fmt, iter, slice, str};
1818

1919
/// Decorations not native to SPIR-V require some form of encoding into existing
@@ -321,7 +321,7 @@ struct SpvDebugFile<'a> {
321321
/// Source strings from one `OpSource`, and any number of `OpSourceContinued`.
322322
op_source_parts: SmallVec<[&'a str; 1]>,
323323

324-
regenerated_rustc_source_file: Option<Lrc<SourceFile>>,
324+
regenerated_rustc_source_file: Option<Arc<SourceFile>>,
325325
}
326326

327327
impl<'a> SpanRegenerator<'a> {

0 commit comments

Comments
 (0)