mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 05:25:38 +00:00
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
error[E0282]: type annotations needed for `[String; _]`
|
|
--> $DIR/copy-check-const-element-uninferred-count.rs:22:9
|
|
|
|
|
LL | let a = [const { String::new() }; _];
|
|
| ^ ----------------------- type must be known at this point
|
|
|
|
|
help: consider giving `a` an explicit type, where the value of const parameter `N` is specified
|
|
|
|
|
LL | let a: [_; N] = [const { String::new() }; _];
|
|
| ++++++++
|
|
|
|
error[E0282]: type annotations needed for `[String; _]`
|
|
--> $DIR/copy-check-const-element-uninferred-count.rs:38:9
|
|
|
|
|
LL | let a = [MY_CONST; _];
|
|
| ^ -------- type must be known at this point
|
|
|
|
|
help: consider giving `a` an explicit type, where the value of const parameter `N` is specified
|
|
|
|
|
LL | let a: [_; N] = [MY_CONST; _];
|
|
| ++++++++
|
|
|
|
error[E0282]: type annotations needed for `[String; _]`
|
|
--> $DIR/copy-check-const-element-uninferred-count.rs:56:9
|
|
|
|
|
LL | let a = [<() as Dummy>::ASSOC; _];
|
|
| ^ -------------------- type must be known at this point
|
|
|
|
|
help: consider giving `a` an explicit type, where the value of const parameter `N` is specified
|
|
|
|
|
LL | let a: [_; N] = [<() as Dummy>::ASSOC; _];
|
|
| ++++++++
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0282`.
|