@@ -41,7 +41,6 @@ use rustc::middle::trans::{Linkage, Visibility, Stats};
4141use rustc:: middle:: cstore:: { EncodedMetadata , EncodedMetadataHashes } ;
4242use rustc:: ty:: { self , Ty , TyCtxt } ;
4343use rustc:: ty:: maps:: Providers ;
44- use rustc:: dep_graph:: AssertDepGraphSafe ;
4544use rustc:: middle:: cstore:: { self , LinkMeta , LinkagePreference } ;
4645use rustc:: hir:: map as hir_map;
4746use rustc:: util:: common:: { time, print_time_passes_entry} ;
@@ -894,7 +893,7 @@ fn iter_globals(llmod: llvm::ModuleRef) -> ValueIter {
894893/// This list is later used by linkers to determine the set of symbols needed to
895894/// be exposed from a dynamic library and it's also encoded into the metadata.
896895pub fn find_exported_symbols ( tcx : TyCtxt ) -> NodeSet {
897- tcx. reachable_set ( LOCAL_CRATE ) . iter ( ) . cloned ( ) . filter ( |& id| {
896+ tcx. reachable_set ( LOCAL_CRATE ) . 0 . iter ( ) . cloned ( ) . filter ( |& id| {
898897 // Next, we want to ignore some FFI functions that are not exposed from
899898 // this crate. Reachable FFI functions can be lumped into two
900899 // categories:
@@ -1370,8 +1369,8 @@ fn compile_codegen_unit<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
13701369 let dep_node = cgu. work_product_dep_node ( ) ;
13711370 let ( ( stats, module) , _) =
13721371 tcx. dep_graph . with_task ( dep_node,
1373- AssertDepGraphSafe ( tcx) ,
1374- AssertDepGraphSafe ( cgu) ,
1372+ tcx,
1373+ cgu,
13751374 module_translation) ;
13761375 let time_to_translate = start_time. elapsed ( ) ;
13771376
@@ -1392,14 +1391,10 @@ fn compile_codegen_unit<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
13921391 return stats;
13931392
13941393 fn module_translation < ' a , ' tcx > (
1395- tcx : AssertDepGraphSafe < TyCtxt < ' a , ' tcx , ' tcx > > ,
1396- args : AssertDepGraphSafe < Arc < CodegenUnit < ' tcx > > > )
1394+ tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
1395+ cgu : Arc < CodegenUnit < ' tcx > > )
13971396 -> ( Stats , ModuleTranslation )
13981397 {
1399- // FIXME(#40304): We ought to be using the id as a key and some queries, I think.
1400- let AssertDepGraphSafe ( tcx) = tcx;
1401- let AssertDepGraphSafe ( cgu) = args;
1402-
14031398 let cgu_name = cgu. name ( ) . to_string ( ) ;
14041399 let cgu_id = cgu. work_product_id ( ) ;
14051400 let symbol_name_hash = cgu. compute_symbol_name_hash ( tcx) ;
@@ -1564,6 +1559,7 @@ pub fn visibility_to_llvm(linkage: Visibility) -> llvm::Visibility {
15641559 Visibility :: Default => llvm:: Visibility :: Default ,
15651560 Visibility :: Hidden => llvm:: Visibility :: Hidden ,
15661561 Visibility :: Protected => llvm:: Visibility :: Protected ,
1562+ }
15671563}
15681564
15691565// FIXME(mw): Anything that is produced via DepGraph::with_task() must implement
@@ -1577,17 +1573,8 @@ pub fn visibility_to_llvm(linkage: Visibility) -> llvm::Visibility {
15771573mod temp_stable_hash_impls {
15781574 use rustc_data_structures:: stable_hasher:: { StableHasherResult , StableHasher ,
15791575 HashStable } ;
1580- use context:: Stats ;
15811576 use ModuleTranslation ;
15821577
1583- impl < HCX > HashStable < HCX > for Stats {
1584- fn hash_stable < W : StableHasherResult > ( & self ,
1585- _: & mut HCX ,
1586- _: & mut StableHasher < W > ) {
1587- // do nothing
1588- }
1589- }
1590-
15911578 impl < HCX > HashStable < HCX > for ModuleTranslation {
15921579 fn hash_stable < W : StableHasherResult > ( & self ,
15931580 _: & mut HCX ,
0 commit comments