@@ -37,13 +37,13 @@ use util::nodemap::NodeSet;
37
37
use std:: any:: Any ;
38
38
use std:: collections:: BTreeMap ;
39
39
use std:: path:: { Path , PathBuf } ;
40
- use std:: rc:: Rc ;
41
40
use rustc_data_structures:: owning_ref:: ErasedBoxRef ;
42
41
use syntax:: ast;
43
42
use syntax:: ext:: base:: SyntaxExtension ;
44
43
use syntax:: symbol:: Symbol ;
45
44
use syntax_pos:: Span ;
46
45
use rustc_back:: target:: Target ;
46
+ use rustc_data_structures:: sync:: Lrc ;
47
47
48
48
pub use self :: NativeLibraryKind :: * ;
49
49
@@ -139,7 +139,7 @@ pub struct NativeLibrary {
139
139
140
140
pub enum LoadedMacro {
141
141
MacroDef ( ast:: Item ) ,
142
- ProcMacro ( Rc < SyntaxExtension > ) ,
142
+ ProcMacro ( Lrc < SyntaxExtension > ) ,
143
143
}
144
144
145
145
#[ derive( Copy , Clone , Debug ) ]
@@ -206,7 +206,7 @@ pub struct ExternConstBody<'tcx> {
206
206
207
207
#[ derive( Clone ) ]
208
208
pub struct ExternBodyNestedBodies {
209
- pub nested_bodies : Rc < BTreeMap < hir:: BodyId , hir:: Body > > ,
209
+ pub nested_bodies : Lrc < BTreeMap < hir:: BodyId , hir:: Body > > ,
210
210
211
211
// It would require a lot of infrastructure to enable stable-hashing Bodies
212
212
// from other crates, so we hash on export and just store the fingerprint
@@ -225,7 +225,7 @@ pub struct ExternBodyNestedBodies {
225
225
/// (it'd break incremental compilation) and should only be called pre-HIR (e.g.
226
226
/// during resolve)
227
227
pub 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 > ;
229
229
230
230
// access to the metadata loader
231
231
fn metadata_loader ( & self ) -> & MetadataLoader ;
@@ -234,7 +234,7 @@ pub trait CrateStore {
234
234
fn def_key ( & self , def : DefId ) -> DefKey ;
235
235
fn def_path ( & self , def : DefId ) -> hir_map:: DefPath ;
236
236
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 > ;
238
238
239
239
// "queries" used in resolve that aren't tracked for incremental compilation
240
240
fn visibility_untracked ( & self , def : DefId ) -> ty:: Visibility ;
@@ -297,7 +297,7 @@ pub struct DummyCrateStore;
297
297
298
298
#[ allow( unused_variables) ]
299
299
impl 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 >
301
301
{ bug ! ( "crate_data_as_rc_any" ) }
302
302
// item info
303
303
fn visibility_untracked ( & self , def : DefId ) -> ty:: Visibility { bug ! ( "visibility" ) }
@@ -325,7 +325,7 @@ impl CrateStore for DummyCrateStore {
325
325
fn def_path_hash ( & self , def : DefId ) -> hir_map:: DefPathHash {
326
326
bug ! ( "def_path_hash" )
327
327
}
328
- fn def_path_table ( & self , cnum : CrateNum ) -> Rc < DefPathTable > {
328
+ fn def_path_table ( & self , cnum : CrateNum ) -> Lrc < DefPathTable > {
329
329
bug ! ( "def_path_table" )
330
330
}
331
331
fn struct_field_names_untracked ( & self , def : DefId ) -> Vec < ast:: Name > {
@@ -398,7 +398,7 @@ pub fn used_crates(tcx: TyCtxt, prefer: LinkagePreference)
398
398
} )
399
399
. collect :: < Vec < _ > > ( ) ;
400
400
let mut ordering = tcx. postorder_cnums ( LOCAL_CRATE ) ;
401
- Rc :: make_mut ( & mut ordering) . reverse ( ) ;
401
+ Lrc :: make_mut ( & mut ordering) . reverse ( ) ;
402
402
libs. sort_by_key ( |& ( a, _) | {
403
403
ordering. iter ( ) . position ( |x| * x == a)
404
404
} ) ;
0 commit comments