1
Fork 0

remove lazy_normalization_consts

This commit is contained in:
Ellen 2021-08-25 13:31:18 +01:00 committed by lcnr
parent fcc2badf9b
commit c0e853f274
16 changed files with 10 additions and 114 deletions

View file

@ -545,9 +545,6 @@ declare_features! (
/// Allows capturing variables in scope using format_args!
(active, format_args_capture, "1.46.0", Some(67984), None),
/// Lazily evaluate constants. This allows constants to depend on type parameters.
(incomplete, lazy_normalization_consts, "1.46.0", Some(72219), None),
/// Allows `if let` guard in match arms.
(active, if_let_guard, "1.47.0", Some(51114), None),

View file

@ -307,7 +307,7 @@ pub enum Res<Id = hir::HirId> {
/// We do however allow `Self` in repeat expression even if it is generic to not break code
/// which already works on stable while causing the `const_evaluatable_unchecked` future compat lint.
///
/// FIXME(lazy_normalization_consts): Remove this bodge once that feature is stable.
/// FIXME(generic_const_exprs): Remove this bodge once that feature is stable.
SelfTy(
/// Optionally, the trait associated with this `Self` type.
Option<DefId>,

View file

@ -678,7 +678,7 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for QueryTypeRelatingDelegate<'_, 'tcx> {
fn const_equate(&mut self, _a: &'tcx Const<'tcx>, _b: &'tcx Const<'tcx>) {
span_bug!(
self.cause.span(self.infcx.tcx),
"lazy_normalization_consts: unreachable `const_equate`"
"generic_const_exprs: unreachable `const_equate`"
);
}

View file

@ -1421,7 +1421,7 @@ impl<'tcx> TyCtxt<'tcx> {
pub fn lazy_normalization(self) -> bool {
let features = self.features();
// Note: We do not enable lazy normalization for `min_const_generics`.
features.const_generics || features.lazy_normalization_consts
features.const_generics || features.generic_const_exprs
}
#[inline]