diff options
| author | lcnr <rust@lcnr.de> | 2021-04-29 20:06:11 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2021-04-29 20:44:19 +0200 |
| commit | da6261e07fa892f995703e4ae26832a633fa5a23 (patch) | |
| tree | a43b11baba471fbbad29d8fe2adbc7ee057806c9 /compiler/rustc_resolve | |
| parent | 814a560072c305d274affc78219e4a7e0558252f (diff) | |
| download | rust-da6261e07fa892f995703e4ae26832a633fa5a23.tar.gz rust-da6261e07fa892f995703e4ae26832a633fa5a23.zip | |
make feature recommendations optional
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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 } |
