use crate::infer::InferCtxt;
use crate::traits::query::NoSolution;
use crate::traits::{
- ChalkEnvironmentAndGoal, FulfillmentError, FulfillmentErrorCode, ObligationCause,
- PredicateObligation, SelectionError, TraitEngine,
+ ChalkEnvironmentAndGoal, FulfillmentError, FulfillmentErrorCode, PredicateObligation,
+ SelectionError, TraitEngine,
};
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
-use rustc_middle::ty::{self, Ty, TypeVisitable};
+use rustc_middle::ty::{self, TypeVisitable};
pub struct FulfillmentContext<'tcx> {
obligations: FxIndexSet<PredicateObligation<'tcx>>,
}
impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
- fn normalize_projection_type(
- &mut self,
- infcx: &InferCtxt<'tcx>,
- _param_env: ty::ParamEnv<'tcx>,
- projection_ty: ty::ProjectionTy<'tcx>,
- _cause: ObligationCause<'tcx>,
- ) -> Ty<'tcx> {
- infcx.tcx.mk_ty(ty::Projection(projection_ty))
- }
-
fn register_predicate_obligation(
&mut self,
infcx: &InferCtxt<'tcx>,