Skip to content

Commit eae3094

Browse files
committed
Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov
Various cleanups around pre-TyCtxt queries and functions part of #105462 based on rust-lang/rust#106776 (everything starting at [0e2b39f](rust-lang/rust@0e2b39f) is new in this PR) r? `@petrochenkov` I think this should be most of the uncontroversial part of #105462.
2 parents d92bae1 + 21f003a commit eae3094

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/bin/miri.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
5656

5757
fn after_analysis<'tcx>(
5858
&mut self,
59-
compiler: &rustc_interface::interface::Compiler,
59+
_: &rustc_interface::interface::Compiler,
6060
queries: &'tcx rustc_interface::Queries<'tcx>,
6161
) -> Compilation {
62-
compiler.session().abort_if_errors();
63-
6462
queries.global_ctxt().unwrap().enter(|tcx| {
63+
tcx.sess.abort_if_errors();
64+
6565
init_late_loggers(tcx);
6666
if !tcx.sess.crate_types().contains(&CrateType::Executable) {
6767
tcx.sess.fatal("miri only makes sense on bin crates");
@@ -75,7 +75,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
7575
let mut config = self.miri_config.clone();
7676

7777
// Add filename to `miri` arguments.
78-
config.args.insert(0, compiler.input().filestem().to_string());
78+
config.args.insert(0, tcx.sess.io.input.filestem().to_string());
7979

8080
// Adjust working directory for interpretation.
8181
if let Some(cwd) = env::var_os("MIRI_CWD") {
@@ -87,10 +87,9 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
8787
i32::try_from(return_code).expect("Return value was too large!"),
8888
);
8989
}
90+
tcx.sess.abort_if_errors();
9091
});
9192

92-
compiler.session().abort_if_errors();
93-
9493
Compilation::Stop
9594
}
9695
}

0 commit comments

Comments
 (0)