]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/fulfill.rs
Auto merge of #94105 - 5225225:destabilise-entry-insert, r=Mark-Simulacrum
[rust.git] / compiler / rustc_trait_selection / src / traits / fulfill.rs
index 274f8a3ef79fa138d4c84caa74495b87f5d3539c..1989184f48f0e26c434e5edc8d4747dbd302e58f 100644 (file)
@@ -397,9 +397,6 @@ fn progress_changed_obligations(
                 ty::PredicateKind::TypeWellFormedFromEnv(..) => {
                     bug!("TypeWellFormedFromEnv is only used for Chalk")
                 }
-                ty::PredicateKind::OpaqueType(..) => {
-                    todo!("{:#?}", obligation);
-                }
             },
             Some(pred) => match pred {
                 ty::PredicateKind::Trait(data) => {
@@ -565,7 +562,7 @@ fn progress_changed_obligations(
                         //
                         // Let's just see where this breaks :shrug:
                         if let (ty::ConstKind::Unevaluated(a), ty::ConstKind::Unevaluated(b)) =
-                            (c1.val, c2.val)
+                            (c1.val(), c2.val())
                         {
                             if infcx.try_unify_abstract_consts(a.shrink(), b.shrink()) {
                                 return ProcessResult::Changed(vec![]);
@@ -575,14 +572,14 @@ fn progress_changed_obligations(
 
                     let stalled_on = &mut pending_obligation.stalled_on;
 
-                    let mut evaluate = |c: &'tcx Const<'tcx>| {
-                        if let ty::ConstKind::Unevaluated(unevaluated) = c.val {
+                    let mut evaluate = |c: Const<'tcx>| {
+                        if let ty::ConstKind::Unevaluated(unevaluated) = c.val() {
                             match self.selcx.infcx().const_eval_resolve(
                                 obligation.param_env,
                                 unevaluated,
                                 Some(obligation.cause.span),
                             ) {
-                                Ok(val) => Ok(Const::from_value(self.selcx.tcx(), val, c.ty)),
+                                Ok(val) => Ok(Const::from_value(self.selcx.tcx(), val, c.ty())),
                                 Err(ErrorHandled::TooGeneric) => {
                                     stalled_on.extend(
                                         unevaluated
@@ -645,20 +642,6 @@ fn progress_changed_obligations(
                 ty::PredicateKind::TypeWellFormedFromEnv(..) => {
                     bug!("TypeWellFormedFromEnv is only used for Chalk")
                 }
-                ty::PredicateKind::OpaqueType(a, b) => {
-                    match self.selcx.infcx().handle_opaque_type(
-                        a,
-                        b,
-                        &obligation.cause,
-                        obligation.param_env,
-                    ) {
-                        Ok(value) => ProcessResult::Changed(mk_pending(value.obligations)),
-                        Err(err) => ProcessResult::Error(FulfillmentErrorCode::CodeSubtypeError(
-                            ExpectedFound::new(true, a, b),
-                            err,
-                        )),
-                    }
-                }
             },
         }
     }