feature(const_generics) -> feature(const_param_types)

This commit is contained in:
lcnr 2021-08-27 18:04:57 +02:00
parent c0e853f274
commit 0c28e028b6
574 changed files with 849 additions and 4305 deletions

View file

@ -2734,8 +2734,7 @@ impl<'a> Resolver<'a> {
ConstantItemRibKind(trivial, _) => {
let features = self.session.features_untracked();
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
if !(trivial || features.const_generics || features.generic_const_exprs)
{
if !(trivial || features.generic_const_exprs) {
// 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.
@ -2807,8 +2806,7 @@ impl<'a> Resolver<'a> {
ConstantItemRibKind(trivial, _) => {
let features = self.session.features_untracked();
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
if !(trivial || features.const_generics || features.generic_const_exprs)
{
if !(trivial || features.generic_const_exprs) {
if record_used {
self.report_error(
span,