Skip to content

Commit 6f388bb

Browse files
committed
Auto merge of rust-lang#88369 - lcnr:cec-rename, r=oli-obk
update const generics feature gates **tl;dr: split const generics into three features: `adt_const_params`, `const_generics_defaults` and `generic_const_exprs`** continuing the work of `@BoxyUwU` in rust-lang#88324, this PR - renames `feature(const_evaluatable_checked)` to `feature(generic_const_exprs)` which now doesn't need any other feature gate to work. Previously `feature(const_evaluatable_checked)` was only useful in combination with `feature(const_generics)`. - completely removes `feature(lazy_normalization_consts)`. This feature only supplied the parents generics to anonymous constants, which is pretty useless as generic anon consts are only allowed with `feature(generic_const_exprs)` anyways. - moves the ability to use additional const param types from `feature(const_generics)` into `feature(adt_const_params)`. As `feature(const_generics)` is now mostly useless without `feature(generic_const_exprs)` we also remove that feature flag. - updates tests, removing duplicates and unnecessary revisions in some cases and also deletes all unused `*.stderr` files. I not also remove the ordering restriction for const and type parameters if any of the three const generics features is active. This ordering restriction feels like the only "real" use of the current `feature(const_generics)` right now so this change isn't a perfect solution, but as I intend to stabilize the ordering - and `feature(const_generics_defaults)` - in the very near future, I think this is acceptable for now. --- cc `@rust-lang/project-const-generics` about the new feature names and this change in general. I don't think we need any external approval for this change but I do intend to publish an update to the const generics tracking issue the day this PR lands, so I don't want this merged yet. Apologies to whoever ends up reviewing this PR 😅 ❤️ r? rust-lang/project-const-generics
2 parents 5d68044 + 87e7817 commit 6f388bb

File tree

613 files changed

+917
-4514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

613 files changed

+917
-4514
lines changed

Diff for: compiler/rustc_ast/src/ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ pub type GenericBounds = Vec<GenericBound>;
332332
pub enum ParamKindOrd {
333333
Lifetime,
334334
Type,
335-
// `unordered` is only `true` if `sess.has_features().const_generics`
336-
// is active. Specifically, if it's only `min_const_generics`, it will still require
335+
// `unordered` is only `true` if `sess.unordered_const_ty_params()`
336+
// returns true. Specifically, if it's only `min_const_generics`, it will still require
337337
// ordering consts after types.
338338
Const { unordered: bool },
339339
// `Infer` is not actually constructed directly from the AST, but is implicitly constructed

Diff for: compiler/rustc_ast_passes/src/ast_validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
13511351
}
13521352

13531353
fn visit_generics(&mut self, generics: &'a Generics) {
1354-
let cg_defaults = self.session.features_untracked().const_generics_defaults;
1354+
let cg_defaults = self.session.features_untracked().unordered_const_ty_params();
13551355

13561356
let mut prev_param_default = None;
13571357
for param in &generics.params {

Diff for: compiler/rustc_ast_passes/src/feature_gate.rs

-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) {
687687
gate_all!(trait_alias, "trait aliases are experimental");
688688
gate_all!(associated_type_bounds, "associated type bounds are unstable");
689689
gate_all!(crate_visibility_modifier, "`crate` visibility modifier is experimental");
690-
gate_all!(const_generics, "const generics are unstable");
691690
gate_all!(decl_macro, "`macro` is experimental");
692691
gate_all!(box_patterns, "box pattern syntax is experimental");
693692
gate_all!(exclusive_range_pattern, "exclusive range pattern syntax is experimental");

Diff for: compiler/rustc_error_codes/src/error_codes/E0671.md

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Const parameters cannot depend on type parameters.
44
The following is therefore invalid:
55

66
```compile_fail,E0770
7-
#![feature(const_generics)]
8-
97
fn const_id<T, const N: T>() -> T { // error
108
N
119
}

Diff for: compiler/rustc_error_codes/src/error_codes/E0741.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A non-structural-match type was used as the type of a const generic parameter.
33
Erroneous code example:
44

55
```compile_fail,E0741
6-
#![feature(const_generics)]
6+
#![feature(adt_const_params)]
77
88
struct A;
99
@@ -16,7 +16,7 @@ may be used as the types of const generic parameters.
1616
To fix the previous code example, we derive `PartialEq` and `Eq`:
1717

1818
```
19-
#![feature(const_generics)]
19+
#![feature(adt_const_params)]
2020
2121
#[derive(PartialEq, Eq)] // We derive both traits here.
2222
struct A;

Diff for: compiler/rustc_error_codes/src/error_codes/E0770.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ The type of a const parameter references other generic parameters.
33
Erroneous code example:
44

55
```compile_fail,E0770
6-
#![feature(const_generics)]
76
fn foo<T, const N: T>() {} // error!
87
```
98

Diff for: compiler/rustc_error_codes/src/error_codes/E0771.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ allowed.
44
Erroneous code example:
55

66
```compile_fail,E0771
7-
#![feature(const_generics)]
7+
#![feature(adt_const_params)]
88
99
fn function_with_str<'a, const STRING: &'a str>() {} // error!
1010
```
@@ -13,7 +13,7 @@ To fix this issue, the lifetime in the const generic need to be changed to
1313
`'static`:
1414

1515
```
16-
#![feature(const_generics)]
16+
#![feature(adt_const_params)]
1717
1818
fn function_with_str<const STRING: &'static str>() {} // ok!
1919
```

Diff for: compiler/rustc_feature/src/accepted.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ declare_features! (
273273
/// Allows patterns with concurrent by-move and by-ref bindings.
274274
/// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref.
275275
(accepted, move_ref_pattern, "1.49.0", Some(68354), None),
276-
/// The smallest useful subset of `const_generics`.
276+
/// The smallest useful subset of const generics.
277277
(accepted, min_const_generics, "1.51.0", Some(74878), None),
278278
/// The `unsafe_op_in_unsafe_fn` lint (allowed by default): no longer treat an unsafe function as an unsafe block.
279279
(accepted, unsafe_block_in_unsafe_fn, "1.52.0", Some(71668), None),

Diff for: compiler/rustc_feature/src/active.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ macro_rules! declare_features {
7171
}
7272

7373
pub fn unordered_const_ty_params(&self) -> bool {
74-
self.const_generics || self.const_generics_defaults
74+
self.const_generics_defaults || self.generic_const_exprs || self.adt_const_params
7575
}
7676

7777
/// Some features are known to be incomplete and using them is likely to have
@@ -453,9 +453,6 @@ declare_features! (
453453
/// Allows using `#[ffi_returns_twice]` on foreign functions.
454454
(active, ffi_returns_twice, "1.34.0", Some(58314), None),
455455

456-
/// Allows const generic types (e.g. `struct Foo<const N: usize>(...);`).
457-
(incomplete, const_generics, "1.34.0", Some(44580), None),
458-
459456
/// Allows using `#[optimize(X)]`.
460457
(active, optimize_attribute, "1.34.0", Some(54882), None),
461458

@@ -545,15 +542,9 @@ declare_features! (
545542
/// Allows capturing variables in scope using format_args!
546543
(active, format_args_capture, "1.46.0", Some(67984), None),
547544

548-
/// Lazily evaluate constants. This allows constants to depend on type parameters.
549-
(incomplete, lazy_normalization_consts, "1.46.0", Some(72219), None),
550-
551545
/// Allows `if let` guard in match arms.
552546
(active, if_let_guard, "1.47.0", Some(51114), None),
553547

554-
/// Allows non-trivial generic constants which have to be manually propagated upwards.
555-
(incomplete, const_evaluatable_checked, "1.48.0", Some(76560), None),
556-
557548
/// Allows basic arithmetic on floating point types in a `const fn`.
558549
(active, const_fn_floating_point_arithmetic, "1.48.0", Some(57241), None),
559550

@@ -679,6 +670,12 @@ declare_features! (
679670
/// Allows using doc(primitive) without a future-incompat warning
680671
(active, doc_primitive, "1.56.0", Some(88070), None),
681672

673+
/// Allows non-trivial generic constants which have to have wfness manually propagated to callers
674+
(incomplete, generic_const_exprs, "1.56.0", Some(76560), None),
675+
676+
/// Allows additional const parameter types, such as `&'static str` or user defined types
677+
(incomplete, adt_const_params, "1.56.0", Some(44580), None),
678+
682679
// -------------------------------------------------------------------------
683680
// feature-group-end: actual feature gates
684681
// -------------------------------------------------------------------------

Diff for: compiler/rustc_feature/src/removed.rs

+7
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ declare_features! (
102102
(removed, extern_in_paths, "1.33.0", Some(55600), None,
103103
Some("subsumed by `::foo::bar` paths")),
104104
(removed, quote, "1.33.0", Some(29601), None, None),
105+
/// Allows const generic types (e.g. `struct Foo<const N: usize>(...);`).
106+
(removed, const_generics, "1.34.0", Some(44580), None,
107+
Some("removed in favor of `#![feature(adt_const_params]` and `#![feature(generic_const_exprs)]`")),
105108
/// Allows `[x; N]` where `x` is a constant (RFC 2203).
106109
(removed, const_in_array_repeat_expressions, "1.37.0", Some(49147), None,
107110
Some("removed due to causing promotable bugs")),
@@ -128,9 +131,13 @@ declare_features! (
128131
Some("Removed in favor of `~const` bound in #![feature(const_trait_impl)]")),
129132
/// Allows `#[no_debug]`.
130133
(removed, no_debug, "1.43.0", Some(29721), None, Some("removed due to lack of demand")),
134+
/// Lazily evaluate constants. This allows constants to depend on type parameters.
135+
(removed, lazy_normalization_consts, "1.46.0", Some(72219), None, Some("superseded by `generic_const_exprs`")),
131136
/// Allows comparing raw pointers during const eval.
132137
(removed, const_compare_raw_pointers, "1.46.0", Some(53020), None,
133138
Some("cannot be allowed in const eval in any meaningful way")),
139+
/// Allows non-trivial generic constants which have to be manually propagated upwards.
140+
(removed, const_evaluatable_checked, "1.48.0", Some(76560), None, Some("renamed to `generic_const_exprs`")),
134141
/// Allows using the `#[link_args]` attribute.
135142
(removed, link_args, "1.53.0", Some(29596), None,
136143
Some("removed in favor of using `-C link-arg=ARG` on command line, \

Diff for: compiler/rustc_hir/src/def.rs

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

Diff for: compiler/rustc_infer/src/infer/canonical/query_response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for QueryTypeRelatingDelegate<'_, 'tcx> {
678678
fn const_equate(&mut self, _a: &'tcx Const<'tcx>, _b: &'tcx Const<'tcx>) {
679679
span_bug!(
680680
self.cause.span(self.infcx.tcx),
681-
"lazy_normalization_consts: unreachable `const_equate`"
681+
"generic_const_exprs: unreachable `const_equate`"
682682
);
683683
}
684684

Diff for: compiler/rustc_infer/src/infer/combine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
202202
/// A good example of this is the following:
203203
///
204204
/// ```rust
205-
/// #![feature(const_generics)]
205+
/// #![feature(generic_const_exprs)]
206206
///
207207
/// fn bind<const N: usize>(value: [u8; N]) -> [u8; 3 + 4] {
208208
/// todo!()

Diff for: compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2340,7 +2340,7 @@ declare_lint! {
23402340
/// ### Example
23412341
///
23422342
/// ```rust
2343-
/// #![feature(const_generics)]
2343+
/// #![feature(generic_const_exprs)]
23442344
/// ```
23452345
///
23462346
/// {{produces}}

Diff for: compiler/rustc_middle/src/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1420,8 +1420,8 @@ impl<'tcx> TyCtxt<'tcx> {
14201420
#[inline]
14211421
pub fn lazy_normalization(self) -> bool {
14221422
let features = self.features();
1423-
// Note: We do not enable lazy normalization for `min_const_generics`.
1424-
features.const_generics || features.lazy_normalization_consts
1423+
// Note: We only use lazy normalization for generic const expressions.
1424+
features.generic_const_exprs
14251425
}
14261426

14271427
#[inline]

Diff for: compiler/rustc_middle/src/ty/relate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,13 @@ pub fn super_relate_consts<R: TypeRelation<'tcx>>(
577577
}
578578

579579
(ty::ConstKind::Unevaluated(au), ty::ConstKind::Unevaluated(bu))
580-
if tcx.features().const_evaluatable_checked =>
580+
if tcx.features().generic_const_exprs =>
581581
{
582582
tcx.try_unify_abstract_consts((au.shrink(), bu.shrink()))
583583
}
584584

585585
// While this is slightly incorrect, it shouldn't matter for `min_const_generics`
586-
// and is the better alternative to waiting until `const_evaluatable_checked` can
586+
// and is the better alternative to waiting until `generic_const_exprs` can
587587
// be stabilized.
588588
(ty::ConstKind::Unevaluated(au), ty::ConstKind::Unevaluated(bu))
589589
if au.def == bu.def && au.promoted == bu.promoted =>

Diff for: compiler/rustc_privacy/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ where
136136
}
137137
ty::PredicateKind::RegionOutlives(..) => ControlFlow::CONTINUE,
138138
ty::PredicateKind::ConstEvaluatable(uv)
139-
if self.def_id_visitor.tcx().features().const_evaluatable_checked =>
139+
if self.def_id_visitor.tcx().features().generic_const_exprs =>
140140
{
141141
let tcx = self.def_id_visitor.tcx();
142142
if let Ok(Some(ct)) = AbstractConst::new(tcx, uv) {
@@ -1809,7 +1809,7 @@ impl SearchInterfaceForPrivateItemsVisitor<'tcx> {
18091809
self.visit(self.tcx.type_of(param.def_id));
18101810
}
18111811
}
1812-
// FIXME(const_evaluatable_checked): May want to look inside const here
1812+
// FIXME(generic_const_exprs): May want to look inside const here
18131813
GenericParamDefKind::Const { .. } => {
18141814
self.visit(self.tcx.type_of(param.def_id));
18151815
}

Diff for: compiler/rustc_resolve/src/diagnostics.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ impl<'a> Resolver<'a> {
506506

507507
if self.session.is_nightly_build() {
508508
err.help(
509-
"use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` \
510-
to allow generic const expressions"
509+
"use `#![feature(generic_const_exprs)]` to allow generic const expressions",
511510
);
512511
}
513512

Diff for: compiler/rustc_resolve/src/late/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
22452245
}
22462246

22472247
/// Non-static lifetimes are prohibited in anonymous constants under `min_const_generics`.
2248-
/// This function will emit an error if `const_generics` is not enabled, the body identified by
2248+
/// This function will emit an error if `generic_const_exprs` is not enabled, the body identified by
22492249
/// `body_id` is an anonymous constant and `lifetime_ref` is non-static.
22502250
crate fn maybe_emit_forbidden_non_static_lifetime_error(
22512251
&self,
@@ -2264,7 +2264,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
22642264
if !self.tcx.lazy_normalization() && is_anon_const && !is_allowed_lifetime {
22652265
feature_err(
22662266
&self.tcx.sess.parse_sess,
2267-
sym::const_generics,
2267+
sym::generic_const_exprs,
22682268
lifetime_ref.span,
22692269
"a non-static lifetime is not allowed in a `const`",
22702270
)

Diff for: compiler/rustc_resolve/src/late/lifetimes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
23012301
match *scope {
23022302
Scope::Body { id, s } => {
23032303
// Non-static lifetimes are prohibited in anonymous constants without
2304-
// `const_generics`.
2304+
// `generic_const_exprs`.
23052305
self.maybe_emit_forbidden_non_static_lifetime_error(id, lifetime_ref);
23062306

23072307
outermost_body = Some(id);

Diff for: compiler/rustc_resolve/src/lib.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -2734,10 +2734,7 @@ impl<'a> Resolver<'a> {
27342734
ConstantItemRibKind(trivial, _) => {
27352735
let features = self.session.features_untracked();
27362736
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
2737-
if !(trivial
2738-
|| features.const_generics
2739-
|| features.lazy_normalization_consts)
2740-
{
2737+
if !(trivial || features.generic_const_exprs) {
27412738
// HACK(min_const_generics): If we encounter `Self` in an anonymous constant
27422739
// we can't easily tell if it's generic at this stage, so we instead remember
27432740
// this and then enforce the self type to be concrete later on.
@@ -2809,10 +2806,7 @@ impl<'a> Resolver<'a> {
28092806
ConstantItemRibKind(trivial, _) => {
28102807
let features = self.session.features_untracked();
28112808
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
2812-
if !(trivial
2813-
|| features.const_generics
2814-
|| features.lazy_normalization_consts)
2815-
{
2809+
if !(trivial || features.generic_const_exprs) {
28162810
if record_used {
28172811
self.report_error(
28182812
span,

Diff for: compiler/rustc_span/src/symbol.rs

+2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ symbols! {
284284
add_assign,
285285
add_with_overflow,
286286
address,
287+
adt_const_params,
287288
advanced_slice_patterns,
288289
adx_target_feature,
289290
alias,
@@ -662,6 +663,7 @@ symbols! {
662663
generators,
663664
generic_arg_infer,
664665
generic_associated_types,
666+
generic_const_exprs,
665667
generic_param_attrs,
666668
get_context,
667669
global_allocator,

Diff for: compiler/rustc_trait_selection/src/traits/const_evaluatable.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
3434
span: Span,
3535
) -> Result<(), NotConstEvaluatable> {
3636
debug!("is_const_evaluatable({:?})", uv);
37-
if infcx.tcx.features().const_evaluatable_checked {
37+
if infcx.tcx.features().generic_const_exprs {
3838
let tcx = infcx.tcx;
3939
match AbstractConst::new(tcx, uv)? {
4040
// We are looking at a generic abstract constant.
@@ -537,9 +537,9 @@ pub(super) fn mir_abstract_const<'tcx>(
537537
tcx: TyCtxt<'tcx>,
538538
def: ty::WithOptConstParam<LocalDefId>,
539539
) -> Result<Option<&'tcx [mir::abstract_const::Node<'tcx>]>, ErrorReported> {
540-
if tcx.features().const_evaluatable_checked {
540+
if tcx.features().generic_const_exprs {
541541
match tcx.def_kind(def.did) {
542-
// FIXME(const_evaluatable_checked): We currently only do this for anonymous constants,
542+
// FIXME(generic_const_exprs): We currently only do this for anonymous constants,
543543
// meaning that we do not look into associated constants. I(@lcnr) am not yet sure whether
544544
// we want to look into them or treat them as opaque projections.
545545
//
@@ -568,7 +568,7 @@ pub(super) fn try_unify_abstract_consts<'tcx>(
568568
Ok(false)
569569
})()
570570
.unwrap_or_else(|ErrorReported| true)
571-
// FIXME(const_evaluatable_checked): We should instead have this
571+
// FIXME(generic_const_exprs): We should instead have this
572572
// method return the resulting `ty::Const` and return `ConstKind::Error`
573573
// on `ErrorReported`.
574574
}
@@ -656,13 +656,13 @@ pub(super) fn try_unify<'tcx>(
656656
// branch should only be taking when dealing with associated constants, at
657657
// which point directly comparing them seems like the desired behavior.
658658
//
659-
// FIXME(const_evaluatable_checked): This isn't actually the case.
659+
// FIXME(generic_const_exprs): This isn't actually the case.
660660
// We also take this branch for concrete anonymous constants and
661661
// expand generic anonymous constants with concrete substs.
662662
(ty::ConstKind::Unevaluated(a_uv), ty::ConstKind::Unevaluated(b_uv)) => {
663663
a_uv == b_uv
664664
}
665-
// FIXME(const_evaluatable_checked): We may want to either actually try
665+
// FIXME(generic_const_exprs): We may want to either actually try
666666
// to evaluate `a_ct` and `b_ct` if they are are fully concrete or something like
667667
// this, for now we just return false here.
668668
_ => false,

Diff for: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
794794
)
795795
}
796796
SelectionError::NotConstEvaluatable(NotConstEvaluatable::MentionsParam) => {
797-
if !self.tcx.features().const_evaluatable_checked {
797+
if !self.tcx.features().generic_const_exprs {
798798
let mut err = self.tcx.sess.struct_span_err(
799799
span,
800800
"constant expression depends on a generic parameter",
@@ -803,7 +803,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
803803
// issue. However, this is currently not actually possible
804804
// (see https://github.com/rust-lang/rust/issues/66962#issuecomment-575907083).
805805
//
806-
// Note that with `feature(const_evaluatable_checked)` this case should not
806+
// Note that with `feature(generic_const_exprs)` this case should not
807807
// be reachable.
808808
err.note("this may fail depending on what value the parameter takes");
809809
err.emit();

Diff for: compiler/rustc_trait_selection/src/traits/fulfill.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ impl<'a, 'b, 'tcx> FulfillProcessor<'a, 'b, 'tcx> {
572572
ty::PredicateKind::ConstEquate(c1, c2) => {
573573
debug!(?c1, ?c2, "equating consts");
574574
let tcx = self.selcx.tcx();
575-
if tcx.features().const_evaluatable_checked {
575+
if tcx.features().generic_const_exprs {
576576
// FIXME: we probably should only try to unify abstract constants
577577
// if the constants depend on generic parameters.
578578
//

0 commit comments

Comments
 (0)