diff options
Diffstat (limited to 'compiler/rustc_trait_selection')
5 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 5c0bd1d8962..ddabe5967d7 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -34,7 +34,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>( span: Span, ) -> Result<(), NotConstEvaluatable> { debug!("is_const_evaluatable({:?})", uv); - if infcx.tcx.features().const_evaluatable_checked { + if infcx.tcx.features().generic_const_exprs { let tcx = infcx.tcx; match AbstractConst::new(tcx, uv)? { // We are looking at a generic abstract constant. @@ -537,9 +537,9 @@ pub(super) fn mir_abstract_const<'tcx>( tcx: TyCtxt<'tcx>, def: ty::WithOptConstParam<LocalDefId>, ) -> Result<Option<&'tcx [mir::abstract_const::Node<'tcx>]>, ErrorReported> { - if tcx.features().const_evaluatable_checked { + if tcx.features().generic_const_exprs { match tcx.def_kind(def.did) { - // FIXME(const_evaluatable_checked): We currently only do this for anonymous constants, + // FIXME(generic_const_exprs): We currently only do this for anonymous constants, // meaning that we do not look into associated constants. I(@lcnr) am not yet sure whether // we want to look into them or treat them as opaque projections. // @@ -568,7 +568,7 @@ pub(super) fn try_unify_abstract_consts<'tcx>( Ok(false) })() .unwrap_or_else(|ErrorReported| true) - // FIXME(const_evaluatable_checked): We should instead have this + // FIXME(generic_const_exprs): We should instead have this // method return the resulting `ty::Const` and return `ConstKind::Error` // on `ErrorReported`. } @@ -656,13 +656,13 @@ pub(super) fn try_unify<'tcx>( // branch should only be taking when dealing with associated constants, at // which point directly comparing them seems like the desired behavior. // - // FIXME(const_evaluatable_checked): This isn't actually the case. + // FIXME(generic_const_exprs): This isn't actually the case. // We also take this branch for concrete anonymous constants and // expand generic anonymous constants with concrete substs. (ty::ConstKind::Unevaluated(a_uv), ty::ConstKind::Unevaluated(b_uv)) => { a_uv == b_uv } - // FIXME(const_evaluatable_checked): We may want to either actually try + // FIXME(generic_const_exprs): We may want to either actually try // to evaluate `a_ct` and `b_ct` if they are are fully concrete or something like // this, for now we just return false here. _ => false, diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 6a7aafc334b..9fd5cb2a0b3 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -794,7 +794,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { ) } SelectionError::NotConstEvaluatable(NotConstEvaluatable::MentionsParam) => { - if !self.tcx.features().const_evaluatable_checked { + if !self.tcx.features().generic_const_exprs { let mut err = self.tcx.sess.struct_span_err( span, "constant expression depends on a generic parameter", @@ -803,7 +803,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { // issue. However, this is currently not actually possible // (see https://github.com/rust-lang/rust/issues/66962#issuecomment-575907083). // - // Note that with `feature(const_evaluatable_checked)` this case should not + // Note that with `feature(generic_const_exprs)` this case should not // be reachable. err.note("this may fail depending on what value the parameter takes"); err.emit(); diff --git a/compiler/rustc_trait_selection/src/traits/fulfill.rs b/compiler/rustc_trait_selection/src/traits/fulfill.rs index f214930c57f..18abcc72bce 100644 --- a/compiler/rustc_trait_selection/src/traits/fulfill.rs +++ b/compiler/rustc_trait_selection/src/traits/fulfill.rs @@ -572,7 +572,7 @@ impl<'a, 'b, 'tcx> FulfillProcessor<'a, 'b, 'tcx> { ty::PredicateKind::ConstEquate(c1, c2) => { debug!(?c1, ?c2, "equating consts"); let tcx = self.selcx.tcx(); - if tcx.features().const_evaluatable_checked { + if tcx.features().generic_const_exprs { // FIXME: we probably should only try to unify abstract constants // if the constants depend on generic parameters. // diff --git a/compiler/rustc_trait_selection/src/traits/object_safety.rs b/compiler/rustc_trait_selection/src/traits/object_safety.rs index dd974e6fd4f..041fd65e8fa 100644 --- a/compiler/rustc_trait_selection/src/traits/object_safety.rs +++ b/compiler/rustc_trait_selection/src/traits/object_safety.rs @@ -855,7 +855,7 @@ fn contains_illegal_self_type_reference<'tcx, T: TypeFoldable<'tcx>>( fn visit_predicate(&mut self, pred: ty::Predicate<'tcx>) -> ControlFlow<Self::BreakTy> { if let ty::PredicateKind::ConstEvaluatable(ct) = pred.kind().skip_binder() { - // FIXME(const_evaluatable_checked): We should probably deduplicate the logic for + // FIXME(generic_const_exprs): We should probably deduplicate the logic for // `AbstractConst`s here, it might make sense to change `ConstEvaluatable` to // take a `ty::Const` instead. use rustc_middle::mir::abstract_const::Node; diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 6cf1dabad85..5214277a37d 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -619,7 +619,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { ty::PredicateKind::ConstEquate(c1, c2) => { debug!(?c1, ?c2, "evaluate_predicate_recursively: equating consts"); - if self.tcx().features().const_evaluatable_checked { + if self.tcx().features().generic_const_exprs { // FIXME: we probably should only try to unify abstract constants // if the constants depend on generic parameters. // |
