about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-01 01:53:10 +0000
committerbors <bors@rust-lang.org>2023-07-01 01:53:10 +0000
commit7383ab7378b17605c197d320c087c6d91f856e60 (patch)
treeb8bc5cf711c7f75b88e927232f3545be76ce3f46 /compiler/rustc_trait_selection/src/traits/mod.rs
parente013d8f8b3984ed2409e489f5d5183a0e3d091cf (diff)
parentd04775d73967db9734e1184f527f4885a552d512 (diff)
downloadrust-7383ab7378b17605c197d320c087c6d91f856e60.tar.gz
rust-7383ab7378b17605c197d320c087c6d91f856e60.zip
Auto merge of #113154 - lcnr:better-probe-check, r=compiler-errors
change snapshot tracking in fulfillment contexts

use the exact snapshot number to prevent misuse even when created inside of a snapshot
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/mod.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs
index ae76651c336..5dc5ddbddbd 100644
--- a/compiler/rustc_trait_selection/src/traits/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/mod.rs
@@ -161,7 +161,7 @@ fn pred_known_to_hold_modulo_regions<'tcx>(
         // the we do no inference in the process of checking this obligation.
         let goal = infcx.resolve_vars_if_possible((obligation.predicate, obligation.param_env));
         infcx.probe(|_| {
-            let ocx = ObligationCtxt::new_in_snapshot(infcx);
+            let ocx = ObligationCtxt::new(infcx);
             ocx.register_obligation(obligation);
 
             let errors = ocx.select_all_or_error();