From 24b244d0dc8f59aa8c97640d153b74a384732a34 Mon Sep 17 00:00:00 2001 From: Peter Date: Fri, 15 Nov 2019 13:30:38 +0000 Subject: [PATCH] fix typo in `const_in_array_repeat_expressions` suggestion update suggestion and ui test `const_in_array_repeat_expression` to `const_in_array_repeat_expressions` (adding 's' at the end) Closes: https://github.com/rust-lang/rust/issues/66433 --- src/librustc/traits/error_reporting.rs | 2 +- .../feature-gate-const_in_array_repeat_expressions.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 82631ce743596..7310a87de9313 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -2184,7 +2184,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { information, see issue \ https://github.com/rust-lang/rust/issues/49147"); if tcx.sess.opts.unstable_features.is_nightly_build() { - err.help("add `#![feature(const_in_array_repeat_expression)]` to the \ + err.help("add `#![feature(const_in_array_repeat_expressions)]` to the \ crate attributes to enable"); } } diff --git a/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr b/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr index cd9242de88f25..08d9ada884a53 100644 --- a/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr @@ -8,7 +8,7 @@ LL | let arr: [Option; 2] = [None::; 2]; as std::marker::Copy> = note: the `Copy` trait is required because the repeated element will be copied = note: this array initializer can be evaluated at compile-time, for more information, see issue https://github.com/rust-lang/rust/issues/49147 - = help: add `#![feature(const_in_array_repeat_expression)]` to the crate attributes to enable + = help: add `#![feature(const_in_array_repeat_expressions)]` to the crate attributes to enable error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:14:36