about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2023-06-29 10:02:26 +0200
committerlcnr <rust@lcnr.de>2023-06-29 10:02:26 +0200
commitd04775d73967db9734e1184f527f4885a552d512 (patch)
treebed7bb6dd4de471c9c4cae319eafbd78a5ba7484 /compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
parent46973c9c8a775faa92eb10c478490c9b69f2eab6 (diff)
downloadrust-d04775d73967db9734e1184f527f4885a552d512.tar.gz
rust-d04775d73967db9734e1184f527f4885a552d512.zip
change snapshot tracking in fulfillment contexts
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/const_evaluatable.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/const_evaluatable.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
index f8789b554b1..f47918a0dbb 100644
--- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
+++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
@@ -176,7 +176,7 @@ fn satisfied_from_param_env<'tcx>(
         fn visit_const(&mut self, c: ty::Const<'tcx>) -> ControlFlow<Self::BreakTy> {
             debug!("is_const_evaluatable: candidate={:?}", c);
             if self.infcx.probe(|_| {
-                let ocx = ObligationCtxt::new_in_snapshot(self.infcx);
+                let ocx = ObligationCtxt::new(self.infcx);
                 ocx.eq(&ObligationCause::dummy(), self.param_env, c.ty(), self.ct.ty()).is_ok()
                     && ocx.eq(&ObligationCause::dummy(), self.param_env, c, self.ct).is_ok()
                     && ocx.select_all_or_error().is_empty()
@@ -219,7 +219,7 @@ fn satisfied_from_param_env<'tcx>(
     }
 
     if let Some(Ok(c)) = single_match {
-        let ocx = ObligationCtxt::new_in_snapshot(infcx);
+        let ocx = ObligationCtxt::new(infcx);
         assert!(ocx.eq(&ObligationCause::dummy(), param_env, c.ty(), ct.ty()).is_ok());
         assert!(ocx.eq(&ObligationCause::dummy(), param_env, c, ct).is_ok());
         assert!(ocx.select_all_or_error().is_empty());