about summary refs log tree commit diff
path: root/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.stderr
blob: 9c9cfefd66383adb7f48127cc04ad48f976f1b86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0284]: type annotations needed for `[String; _]`
  --> $DIR/copy-check-const-element-uninferred-count.rs:62: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`.