Skip to content

Commit 24b244d

Browse files
author
Peter
committed
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: rust-lang#66433
1 parent ce36ab2 commit 24b244d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/traits/error_reporting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
21842184
information, see issue \
21852185
https://github.com/rust-lang/rust/issues/49147");
21862186
if tcx.sess.opts.unstable_features.is_nightly_build() {
2187-
err.help("add `#![feature(const_in_array_repeat_expression)]` to the \
2187+
err.help("add `#![feature(const_in_array_repeat_expressions)]` to the \
21882188
crate attributes to enable");
21892189
}
21902190
}

src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | let arr: [Option<String>; 2] = [None::<String>; 2];
88
<std::option::Option<T> as std::marker::Copy>
99
= note: the `Copy` trait is required because the repeated element will be copied
1010
= note: this array initializer can be evaluated at compile-time, for more information, see issue https://github.com/rust-lang/rust/issues/49147
11-
= help: add `#![feature(const_in_array_repeat_expression)]` to the crate attributes to enable
11+
= help: add `#![feature(const_in_array_repeat_expressions)]` to the crate attributes to enable
1212

1313
error[E0277]: the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied
1414
--> $DIR/feature-gate-const_in_array_repeat_expressions.rs:14:36

0 commit comments

Comments
 (0)