Skip to content

Commit ecae375

Browse files
committed
Reintroduce prepending the input file name to the miri arguments
1 parent 7d142ec commit ecae375

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/miri.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
4242

4343
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
4444
let (entry_def_id, _) = tcx.entry_fn(LOCAL_CRATE).expect("no main function found!");
45+
let mut config = self.miri_config.clone();
4546

46-
miri::eval_main(tcx, entry_def_id, self.miri_config.clone());
47+
// Add filename to `miri` arguments.
48+
config.args.insert(0, compiler.input().filestem().to_string());
49+
50+
miri::eval_main(tcx, entry_def_id, config);
4751
});
4852

4953
compiler.session().abort_if_errors();

0 commit comments

Comments
 (0)