diff options
| author | bors <bors@rust-lang.org> | 2023-01-12 13:59:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-12 13:59:30 +0000 |
| commit | 222d1ff68d5bfe1dc2d7f3f0c42811fe12964af9 (patch) | |
| tree | 1a75241d0b3c0600dcb76bd03d07d9fad8f31062 /src/tools | |
| parent | 606c3907251397a42e23d3e60de31be9d32525d5 (diff) | |
| parent | 58782a8842bdd74e3304092251a1d06e5b6b550b (diff) | |
Auto merge of #105603 - oli-obk:non_repeatable_queries, r=petrochenkov
Harden the pre-tyctxt query system against accidental recomputation While the current compiler has no issues where we `take` and then compute the query again, in https://github.com/rust-lang/rust/pull/105462 I accidentally introduced such a case. I also took the opportunity to remove `peek_mut`, which is only ever used for `global_tcx` to then invoke `enter`. I added an `enter` method directly on the query.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/miri/src/bin/miri.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 8c01748613c..6a147de3be2 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -61,7 +61,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls { ) -> Compilation { compiler.session().abort_if_errors(); - queries.global_ctxt().unwrap().peek_mut().enter(|tcx| { + queries.global_ctxt().unwrap().enter(|tcx| { init_late_loggers(tcx); if !tcx.sess.crate_types().contains(&CrateType::Executable) { tcx.sess.fatal("miri only makes sense on bin crates"); |
