stabilize min_const_generics
This commit is contained in:
@@ -2624,8 +2624,12 @@ impl<'a> Resolver<'a> {
|
||||
continue;
|
||||
}
|
||||
ConstantItemRibKind(trivial) => {
|
||||
let features = self.session.features_untracked();
|
||||
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
|
||||
if !trivial && self.session.features_untracked().min_const_generics {
|
||||
if !(trivial
|
||||
|| features.const_generics
|
||||
|| features.lazy_normalization_consts)
|
||||
{
|
||||
// HACK(min_const_generics): If we encounter `Self` in an anonymous constant
|
||||
// we can't easily tell if it's generic at this stage, so we instead remember
|
||||
// this and then enforce the self type to be concrete later on.
|
||||
@@ -2713,8 +2717,12 @@ impl<'a> Resolver<'a> {
|
||||
continue;
|
||||
}
|
||||
ConstantItemRibKind(trivial) => {
|
||||
let features = self.session.features_untracked();
|
||||
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
|
||||
if !trivial && self.session.features_untracked().min_const_generics {
|
||||
if !(trivial
|
||||
|| features.const_generics
|
||||
|| features.lazy_normalization_consts)
|
||||
{
|
||||
if record_used {
|
||||
self.report_error(
|
||||
span,
|
||||
|
||||
Reference in New Issue
Block a user