@@ -7,7 +7,7 @@ use rustc_data_structures::fx::FxHashMap;
77use rustc_data_structures:: sso:: SsoHashSet ;
88use rustc_hir as hir;
99use rustc_hir:: def:: { self , CtorKind , DefKind , Namespace } ;
10- use rustc_hir:: def_id:: { CrateNum , DefId , DefIdSet , CRATE_DEF_INDEX , LOCAL_CRATE } ;
10+ use rustc_hir:: def_id:: { DefId , DefIdSet , CRATE_DEF_INDEX , LOCAL_CRATE } ;
1111use rustc_hir:: definitions:: { DefPathData , DefPathDataName , DisambiguatedDefPathData } ;
1212use rustc_hir:: ItemKind ;
1313use rustc_session:: config:: TrimmedDefPaths ;
@@ -285,7 +285,7 @@ pub trait PrettyPrinter<'tcx>:
285285 return Ok ( ( self , false ) ) ;
286286 }
287287
288- match self . tcx ( ) . trimmed_def_paths ( LOCAL_CRATE ) . get ( & def_id) {
288+ match self . tcx ( ) . trimmed_def_paths ( ( ) ) . get ( & def_id) {
289289 None => Ok ( ( self , false ) ) ,
290290 Some ( symbol) => {
291291 self . write_str ( & symbol. as_str ( ) ) ?;
@@ -361,7 +361,7 @@ pub trait PrettyPrinter<'tcx>:
361361 return Ok ( ( self , false ) ) ;
362362 }
363363
364- let visible_parent_map = self . tcx ( ) . visible_parent_map ( LOCAL_CRATE ) ;
364+ let visible_parent_map = self . tcx ( ) . visible_parent_map ( ( ) ) ;
365365
366366 let mut cur_def_key = self . tcx ( ) . def_key ( def_id) ;
367367 debug ! ( "try_print_visible_def_path: cur_def_key={:?}" , cur_def_key) ;
@@ -2286,9 +2286,7 @@ fn for_each_def(tcx: TyCtxt<'_>, mut collect_fn: impl for<'b> FnMut(&'b Ident, N
22862286/// `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere.
22872287///
22882288/// The implementation uses similar import discovery logic to that of 'use' suggestions.
2289- fn trimmed_def_paths ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) -> FxHashMap < DefId , Symbol > {
2290- assert_eq ! ( crate_num, LOCAL_CRATE ) ;
2291-
2289+ fn trimmed_def_paths ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) -> FxHashMap < DefId , Symbol > {
22922290 let mut map = FxHashMap :: default ( ) ;
22932291
22942292 if let TrimmedDefPaths :: GoodPath = tcx. sess . opts . trimmed_def_paths {
0 commit comments