Skip to content

Commit 28f5ec1

Browse files
committed
test: fix the usage of rustc_internal::internal
1 parent 32da7b3 commit 28f5ec1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/ui-fulldeps/stable-mir/smir_internal.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@ extern crate rustc_interface;
1717
extern crate rustc_middle;
1818
extern crate stable_mir;
1919

20-
use rustc_middle::ty::TyCtxt;
2120
use rustc_smir::rustc_internal;
2221
use std::io::Write;
2322
use std::ops::ControlFlow;
2423

2524
const CRATE_NAME: &str = "input";
2625

27-
fn test_translation(tcx: TyCtxt<'_>) -> ControlFlow<()> {
26+
fn test_translation() -> ControlFlow<()> {
2827
let main_fn = stable_mir::entry_fn().unwrap();
2928
let body = main_fn.expect_body();
3029
let orig_ty = body.locals()[0].ty;
31-
let rustc_ty = rustc_internal::internal(tcx, &orig_ty);
30+
let rustc_ty = rustc_internal::internal(&orig_ty);
3231
assert!(rustc_ty.is_unit());
3332
ControlFlow::Continue(())
3433
}
@@ -46,7 +45,7 @@ fn main() {
4645
CRATE_NAME.to_string(),
4746
path.to_string(),
4847
];
49-
run_with_tcx!(args, test_translation).unwrap();
48+
run!(args, test_translation).unwrap();
5049
}
5150

5251
fn generate_input(path: &str) -> std::io::Result<()> {

0 commit comments

Comments
 (0)