File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
tests/ui-fulldeps/stable-mir Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,18 @@ extern crate rustc_interface;
17
17
extern crate rustc_middle;
18
18
extern crate stable_mir;
19
19
20
+ use rustc_middle:: ty:: TyCtxt ;
20
21
use rustc_smir:: rustc_internal;
21
22
use std:: io:: Write ;
22
23
use std:: ops:: ControlFlow ;
23
24
24
25
const CRATE_NAME : & str = "input" ;
25
26
26
- fn test_translation ( ) -> ControlFlow < ( ) > {
27
+ fn test_translation ( tcx : TyCtxt < ' _ > ) -> ControlFlow < ( ) > {
27
28
let main_fn = stable_mir:: entry_fn ( ) . unwrap ( ) ;
28
29
let body = main_fn. expect_body ( ) ;
29
30
let orig_ty = body. locals ( ) [ 0 ] . ty ;
30
- let rustc_ty = rustc_internal:: internal ( & orig_ty) ;
31
+ let rustc_ty = rustc_internal:: internal ( tcx , & orig_ty) ;
31
32
assert ! ( rustc_ty. is_unit( ) ) ;
32
33
ControlFlow :: Continue ( ( ) )
33
34
}
@@ -45,7 +46,7 @@ fn main() {
45
46
CRATE_NAME . to_string ( ) ,
46
47
path. to_string ( ) ,
47
48
] ;
48
- run ! ( args, test_translation) . unwrap ( ) ;
49
+ run_with_tcx ! ( args, test_translation) . unwrap ( ) ;
49
50
}
50
51
51
52
fn generate_input ( path : & str ) -> std:: io:: Result < ( ) > {
You can’t perform that action at this time.
0 commit comments