From da6261e07fa892f995703e4ae26832a633fa5a23 Mon Sep 17 00:00:00 2001 From: lcnr Date: Thu, 29 Apr 2021 20:06:11 +0200 Subject: make feature recommendations optional --- compiler/rustc_resolve/src/diagnostics.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_resolve/src') diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index c5f12c0c691..6ea46f5c528 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -487,7 +487,13 @@ impl<'a> Resolver<'a> { name )); } - err.help("use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions"); + + if self.session.is_nightly_build() { + err.help( + "use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` \ + to allow generic const expressions" + ); + } err } -- cgit 1.4.1-3-g733a5