We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d142ec commit ecae375Copy full SHA for ecae375
src/bin/miri.rs
@@ -42,8 +42,12 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
42
43
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
44
let (entry_def_id, _) = tcx.entry_fn(LOCAL_CRATE).expect("no main function found!");
45
+ let mut config = self.miri_config.clone();
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);
51
});
52
53
compiler.session().abort_if_errors();
0 commit comments