Skip to content

Commit

Permalink
fix typo in const_in_array_repeat_expressions suggestion
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Peter committed Nov 15, 2019
1 parent ce36ab2 commit 24b244d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LL | let arr: [Option<String>; 2] = [None::<String>; 2];
<std::option::Option<T> 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::string::String>: std::marker::Copy` is not satisfied
--> $DIR/feature-gate-const_in_array_repeat_expressions.rs:14:36
Expand Down

0 comments on commit 24b244d

Please sign in to comment.