2024-06-17 08:34:26 +00:00
|
|
|
error[E0284]: type annotations needed for `[usize; _]`
|
2022-02-14 12:25:26 +00:00
|
|
|
--> $DIR/issue-83606.rs:8:9
|
2021-03-29 18:00:25 +00:00
|
|
|
|
|
2022-05-09 14:14:43 +00:00
|
|
|
LL | let _ = foo("foo");
|
2024-06-17 08:34:26 +00:00
|
|
|
| ^ ---------- type must be known at this point
|
2022-02-14 12:25:26 +00:00
|
|
|
|
|
2024-06-19 08:25:58 +00:00
|
|
|
note: required by a const generic parameter in `foo`
|
2024-06-17 08:34:26 +00:00
|
|
|
--> $DIR/issue-83606.rs:3:8
|
|
|
|
|
|
|
|
|
LL | fn foo<const N: usize>(_: impl std::fmt::Display) -> [usize; N] {
|
2024-06-19 08:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^ required by this const generic parameter in `foo`
|
2023-04-07 08:07:11 +00:00
|
|
|
help: consider giving this pattern a type, where the value of const parameter `N` is specified
|
2022-02-14 12:25:26 +00:00
|
|
|
|
|
2023-01-14 18:32:17 +00:00
|
|
|
LL | let _: [usize; N] = foo("foo");
|
2022-02-14 12:25:26 +00:00
|
|
|
| ++++++++++++
|
2021-03-29 18:00:25 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2021-03-29 18:00:25 +00:00
|
|
|
|
2024-06-17 08:34:26 +00:00
|
|
|
For more information about this error, try `rustc --explain E0284`.
|