@@ -37,13 +37,13 @@ use util::nodemap::NodeSet;
3737use std:: any:: Any ;
3838use std:: collections:: BTreeMap ;
3939use std:: path:: { Path , PathBuf } ;
40- use std:: rc:: Rc ;
4140use rustc_data_structures:: owning_ref:: ErasedBoxRef ;
4241use syntax:: ast;
4342use syntax:: ext:: base:: SyntaxExtension ;
4443use syntax:: symbol:: Symbol ;
4544use syntax_pos:: Span ;
4645use rustc_back:: target:: Target ;
46+ use rustc_data_structures:: sync:: Lrc ;
4747
4848pub use self :: NativeLibraryKind :: * ;
4949
@@ -139,7 +139,7 @@ pub struct NativeLibrary {
139139
140140pub enum LoadedMacro {
141141 MacroDef ( ast:: Item ) ,
142- ProcMacro ( Rc < SyntaxExtension > ) ,
142+ ProcMacro ( Lrc < SyntaxExtension > ) ,
143143}
144144
145145#[ derive( Copy , Clone , Debug ) ]
@@ -206,7 +206,7 @@ pub struct ExternConstBody<'tcx> {
206206
207207#[ derive( Clone ) ]
208208pub struct ExternBodyNestedBodies {
209- pub nested_bodies : Rc < BTreeMap < hir:: BodyId , hir:: Body > > ,
209+ pub nested_bodies : Lrc < BTreeMap < hir:: BodyId , hir:: Body > > ,
210210
211211 // It would require a lot of infrastructure to enable stable-hashing Bodies
212212 // from other crates, so we hash on export and just store the fingerprint
@@ -225,7 +225,7 @@ pub struct ExternBodyNestedBodies {
225225/// (it'd break incremental compilation) and should only be called pre-HIR (e.g.
226226/// during resolve)
227227pub trait CrateStore {
228- fn crate_data_as_rc_any ( & self , krate : CrateNum ) -> Rc < Any > ;
228+ fn crate_data_as_rc_any ( & self , krate : CrateNum ) -> Lrc < Any > ;
229229
230230 // access to the metadata loader
231231 fn metadata_loader ( & self ) -> & MetadataLoader ;
@@ -234,7 +234,7 @@ pub trait CrateStore {
234234 fn def_key ( & self , def : DefId ) -> DefKey ;
235235 fn def_path ( & self , def : DefId ) -> hir_map:: DefPath ;
236236 fn def_path_hash ( & self , def : DefId ) -> hir_map:: DefPathHash ;
237- fn def_path_table ( & self , cnum : CrateNum ) -> Rc < DefPathTable > ;
237+ fn def_path_table ( & self , cnum : CrateNum ) -> Lrc < DefPathTable > ;
238238
239239 // "queries" used in resolve that aren't tracked for incremental compilation
240240 fn visibility_untracked ( & self , def : DefId ) -> ty:: Visibility ;
@@ -297,7 +297,7 @@ pub struct DummyCrateStore;
297297
298298#[ allow( unused_variables) ]
299299impl CrateStore for DummyCrateStore {
300- fn crate_data_as_rc_any ( & self , krate : CrateNum ) -> Rc < Any >
300+ fn crate_data_as_rc_any ( & self , krate : CrateNum ) -> Lrc < Any >
301301 { bug ! ( "crate_data_as_rc_any" ) }
302302 // item info
303303 fn visibility_untracked ( & self , def : DefId ) -> ty:: Visibility { bug ! ( "visibility" ) }
@@ -325,7 +325,7 @@ impl CrateStore for DummyCrateStore {
325325 fn def_path_hash ( & self , def : DefId ) -> hir_map:: DefPathHash {
326326 bug ! ( "def_path_hash" )
327327 }
328- fn def_path_table ( & self , cnum : CrateNum ) -> Rc < DefPathTable > {
328+ fn def_path_table ( & self , cnum : CrateNum ) -> Lrc < DefPathTable > {
329329 bug ! ( "def_path_table" )
330330 }
331331 fn struct_field_names_untracked ( & self , def : DefId ) -> Vec < ast:: Name > {
@@ -398,7 +398,7 @@ pub fn used_crates(tcx: TyCtxt, prefer: LinkagePreference)
398398 } )
399399 . collect :: < Vec < _ > > ( ) ;
400400 let mut ordering = tcx. postorder_cnums ( LOCAL_CRATE ) ;
401- Rc :: make_mut ( & mut ordering) . reverse ( ) ;
401+ Lrc :: make_mut ( & mut ordering) . reverse ( ) ;
402402 libs. sort_by_key ( |& ( a, _) | {
403403 ordering. iter ( ) . position ( |x| * x == a)
404404 } ) ;
0 commit comments