File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use rustc_data_structures::sync::Lrc;
44use rustc_errors:: { ColorConfig , ErrorReported } ;
55use rustc_hir as hir;
66use rustc_hir:: intravisit;
7+ use rustc_hir:: def_id:: LOCAL_CRATE ;
78use rustc_hir:: { HirId , CRATE_HIR_ID } ;
89use rustc_interface:: interface;
910use rustc_middle:: hir:: map:: Map ;
@@ -111,8 +112,6 @@ crate fn run(options: Options) -> Result<(), ErrorReported> {
111112 let res = interface:: run_compiler ( config, |compiler| {
112113 compiler. enter ( |queries| {
113114 let _lower_to_hir = queries. lower_to_hir ( ) ?;
114-
115- let crate_name = queries. crate_name ( ) ?. peek ( ) . to_string ( ) ;
116115 let mut global_ctxt = queries. global_ctxt ( ) ?. take ( ) ;
117116
118117 let collector = global_ctxt. enter ( |tcx| {
@@ -123,7 +122,7 @@ crate fn run(options: Options) -> Result<(), ErrorReported> {
123122 opts. display_warnings |= options. display_warnings ;
124123 let enable_per_target_ignores = options. enable_per_target_ignores ;
125124 let mut collector = Collector :: new (
126- crate_name,
125+ tcx . crate_name ( LOCAL_CRATE ) . to_string ( ) ,
127126 options,
128127 false ,
129128 opts,
You can’t perform that action at this time.
0 commit comments