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;
4
4
use rustc_errors:: { ColorConfig , ErrorReported } ;
5
5
use rustc_hir as hir;
6
6
use rustc_hir:: intravisit;
7
+ use rustc_hir:: def_id:: LOCAL_CRATE ;
7
8
use rustc_hir:: { HirId , CRATE_HIR_ID } ;
8
9
use rustc_interface:: interface;
9
10
use rustc_middle:: hir:: map:: Map ;
@@ -111,8 +112,6 @@ crate fn run(options: Options) -> Result<(), ErrorReported> {
111
112
let res = interface:: run_compiler ( config, |compiler| {
112
113
compiler. enter ( |queries| {
113
114
let _lower_to_hir = queries. lower_to_hir ( ) ?;
114
-
115
- let crate_name = queries. crate_name ( ) ?. peek ( ) . to_string ( ) ;
116
115
let mut global_ctxt = queries. global_ctxt ( ) ?. take ( ) ;
117
116
118
117
let collector = global_ctxt. enter ( |tcx| {
@@ -123,7 +122,7 @@ crate fn run(options: Options) -> Result<(), ErrorReported> {
123
122
opts. display_warnings |= options. display_warnings ;
124
123
let enable_per_target_ignores = options. enable_per_target_ignores ;
125
124
let mut collector = Collector :: new (
126
- crate_name,
125
+ tcx . crate_name ( LOCAL_CRATE ) . to_string ( ) ,
127
126
options,
128
127
false ,
129
128
opts,
You can’t perform that action at this time.
0 commit comments