mirror of https://github.com/rust-lang/rust.git
16 lines
597 B
Plaintext
16 lines
597 B
Plaintext
error[E0284]: type annotations needed for `[String; _]`
|
|
--> $DIR/copy-check-const-element-uninferred-count.rs:64:9
|
|
|
|
|
LL | let a = [const { String::new() }; _];
|
|
| ^ ---------------------------- type must be known at this point
|
|
|
|
|
= note: the length of array `[String; _]` must be type `usize`
|
|
help: consider giving `a` an explicit type, where the placeholders `_` are specified
|
|
|
|
|
LL | let a: [_; _] = [const { String::new() }; _];
|
|
| ++++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0284`.
|