change snapshot tracking in fulfillment contexts
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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}"))
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user