@@ -7,7 +7,7 @@ use rustc_data_structures::fx::FxHashMap;
7
7
use rustc_data_structures:: sso:: SsoHashSet ;
8
8
use rustc_hir as hir;
9
9
use 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 } ;
11
11
use rustc_hir:: definitions:: { DefPathData , DefPathDataName , DisambiguatedDefPathData } ;
12
12
use rustc_hir:: ItemKind ;
13
13
use rustc_session:: config:: TrimmedDefPaths ;
@@ -285,7 +285,7 @@ pub trait PrettyPrinter<'tcx>:
285
285
return Ok ( ( self , false ) ) ;
286
286
}
287
287
288
- match self . tcx ( ) . trimmed_def_paths ( LOCAL_CRATE ) . get ( & def_id) {
288
+ match self . tcx ( ) . trimmed_def_paths ( ( ) ) . get ( & def_id) {
289
289
None => Ok ( ( self , false ) ) ,
290
290
Some ( symbol) => {
291
291
self . write_str ( & symbol. as_str ( ) ) ?;
@@ -361,7 +361,7 @@ pub trait PrettyPrinter<'tcx>:
361
361
return Ok ( ( self , false ) ) ;
362
362
}
363
363
364
- let visible_parent_map = self . tcx ( ) . visible_parent_map ( LOCAL_CRATE ) ;
364
+ let visible_parent_map = self . tcx ( ) . visible_parent_map ( ( ) ) ;
365
365
366
366
let mut cur_def_key = self . tcx ( ) . def_key ( def_id) ;
367
367
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
2286
2286
/// `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere.
2287
2287
///
2288
2288
/// 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 > {
2292
2290
let mut map = FxHashMap :: default ( ) ;
2293
2291
2294
2292
if let TrimmedDefPaths :: GoodPath = tcx. sess . opts . trimmed_def_paths {
0 commit comments