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;
1717extern crate rustc_middle;
1818extern crate stable_mir;
1919
20+ use rustc_middle:: ty:: TyCtxt ;
2021use rustc_smir:: rustc_internal;
2122use std:: io:: Write ;
2223use std:: ops:: ControlFlow ;
2324
2425const CRATE_NAME : & str = "input" ;
2526
26- fn test_translation ( ) -> ControlFlow < ( ) > {
27+ fn test_translation ( tcx : TyCtxt < ' _ > ) -> ControlFlow < ( ) > {
2728 let main_fn = stable_mir:: entry_fn ( ) . unwrap ( ) ;
2829 let body = main_fn. expect_body ( ) ;
2930 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) ;
3132 assert ! ( rustc_ty. is_unit( ) ) ;
3233 ControlFlow :: Continue ( ( ) )
3334}
@@ -45,7 +46,7 @@ fn main() {
4546 CRATE_NAME . to_string ( ) ,
4647 path. to_string ( ) ,
4748 ] ;
48- run ! ( args, test_translation) . unwrap ( ) ;
49+ run_with_tcx ! ( args, test_translation) . unwrap ( ) ;
4950}
5051
5152fn generate_input ( path : & str ) -> std:: io:: Result < ( ) > {
You can’t perform that action at this time.
0 commit comments