@@ -20,13 +20,13 @@ extern crate rustc_session;
20
20
21
21
use rustc_borrowck:: consumers:: BodyWithBorrowckFacts ;
22
22
use rustc_driver:: Compilation ;
23
- use rustc_hir:: def_id:: LocalDefId ;
24
23
use rustc_hir:: def:: DefKind ;
24
+ use rustc_hir:: def_id:: LocalDefId ;
25
25
use rustc_interface:: interface:: Compiler ;
26
26
use rustc_interface:: { Config , Queries } ;
27
27
use rustc_middle:: ty:: query:: query_values:: mir_borrowck;
28
28
use rustc_middle:: ty:: query:: { ExternProviders , Providers } ;
29
- use rustc_middle:: ty:: { self , TyCtxt } ;
29
+ use rustc_middle:: ty:: TyCtxt ;
30
30
use rustc_session:: Session ;
31
31
use std:: cell:: RefCell ;
32
32
use std:: collections:: HashMap ;
@@ -127,10 +127,7 @@ thread_local! {
127
127
}
128
128
129
129
fn mir_borrowck < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : LocalDefId ) -> mir_borrowck < ' tcx > {
130
- let body_with_facts = rustc_borrowck:: consumers:: get_body_with_borrowck_facts (
131
- tcx,
132
- ty:: WithOptConstParam :: unknown ( def_id) ,
133
- ) ;
130
+ let body_with_facts = rustc_borrowck:: consumers:: get_body_with_borrowck_facts ( tcx, def_id) ;
134
131
// SAFETY: The reader casts the 'static lifetime to 'tcx before using it.
135
132
let body_with_facts: BodyWithBorrowckFacts < ' static > =
136
133
unsafe { std:: mem:: transmute ( body_with_facts) } ;
0 commit comments