about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/query
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/query
parent46973c9c8a775faa92eb10c478490c9b69f2eab6 (diff)
downloadrust-d04775d73967db9734e1184f527f4885a552d512.tar.gz
rust-d04775d73967db9734e1184f527f4885a552d512.zip
change snapshot tracking in fulfillment contexts
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/query')
-rw-r--r--compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs2
-rw-r--r--compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs b/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs
index f8ceee50054..72576299118 100644
--- a/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs
+++ b/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs
@@ -80,7 +80,7 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
 
         if self.next_trait_solver() {
             self.probe(|snapshot| {
-                let mut fulfill_cx = crate::solve::FulfillmentCtxt::new();
+                let mut fulfill_cx = crate::solve::FulfillmentCtxt::new(self);
                 fulfill_cx.register_predicate_obligation(self, obligation.clone());
                 // True errors
                 // FIXME(-Ztrait-solver=next): Overflows are reported as ambig here, is that OK?
diff --git a/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs b/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs
index 8b0973021bc..5420caee329 100644
--- a/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs
+++ b/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs
@@ -82,7 +82,7 @@ where
     );
 
     let value = infcx.commit_if_ok(|_| {
-        let ocx = ObligationCtxt::new_in_snapshot(infcx);
+        let ocx = ObligationCtxt::new(infcx);
         let value = op(&ocx).map_err(|_| {
             infcx.tcx.sess.delay_span_bug(span, format!("error performing operation: {name}"))
         })?;