@@ -12,23 +12,23 @@ use rspirv::spirv::{
1212 AddressingModel , Capability , MemoryModel , Op , SourceLanguage , StorageClass , Word ,
1313} ;
1414use rspirv:: { binary:: Assemble , binary:: Disassemble } ;
15+ use rustc_abi:: Size ;
1516use rustc_arena:: DroplessArena ;
1617use rustc_codegen_ssa:: traits:: ConstCodegenMethods as _;
1718use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
18- use rustc_data_structures:: sync:: Lrc ;
1919use rustc_middle:: bug;
2020use rustc_middle:: mir:: interpret:: ConstAllocation ;
2121use rustc_middle:: ty:: TyCtxt ;
2222use rustc_span:: source_map:: SourceMap ;
2323use rustc_span:: symbol:: Symbol ;
2424use rustc_span:: { DUMMY_SP , FileName , FileNameDisplayPreference , SourceFile , Span } ;
25- use rustc_target:: abi:: Size ;
2625use std:: assert_matches:: assert_matches;
2726use std:: cell:: { RefCell , RefMut } ;
2827use std:: hash:: { Hash , Hasher } ;
2928use std:: iter;
3029use std:: ops:: Range ;
3130use std:: str;
31+ use std:: sync:: Arc ;
3232use 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
355355impl 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}
361361impl 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) => {
0 commit comments