diff options
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/late/lifetimes.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 6 |
4 files changed, 6 insertions, 9 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index a4f75494238..0b1687d1bd8 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -506,8 +506,7 @@ impl<'a> Resolver<'a> { if self.session.is_nightly_build() { err.help( - "use `#![feature(const_generics)]` and `#![feature(generic_const_exprs)]` \ - to allow generic const expressions", + "use `#![feature(generic_const_exprs)]` to allow generic const expressions", ); } diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index b3601ecf1d3..45657f2d0f2 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -2245,7 +2245,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> { } /// Non-static lifetimes are prohibited in anonymous constants under `min_const_generics`. - /// This function will emit an error if `const_generics` is not enabled, the body identified by + /// This function will emit an error if `generic_const_exprs` is not enabled, the body identified by /// `body_id` is an anonymous constant and `lifetime_ref` is non-static. crate fn maybe_emit_forbidden_non_static_lifetime_error( &self, @@ -2264,7 +2264,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> { if !self.tcx.lazy_normalization() && is_anon_const && !is_allowed_lifetime { feature_err( &self.tcx.sess.parse_sess, - sym::const_generics, + sym::generic_const_exprs, lifetime_ref.span, "a non-static lifetime is not allowed in a `const`", ) diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs index bc2c46ec0aa..e901d4c00ab 100644 --- a/compiler/rustc_resolve/src/late/lifetimes.rs +++ b/compiler/rustc_resolve/src/late/lifetimes.rs @@ -2301,7 +2301,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> { match *scope { Scope::Body { id, s } => { // Non-static lifetimes are prohibited in anonymous constants without - // `const_generics`. + // `generic_const_exprs`. self.maybe_emit_forbidden_non_static_lifetime_error(id, lifetime_ref); outermost_body = Some(id); diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index fc8fcf759ad..da3beac0819 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -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, |
