about summary refs log tree commit diff
path: root/tests/ui/repeat-expr/copy-check-when-count-inferred-later.stderr
blob: 6b8049e77cc5132d8df6d6e88f99c194f0f21d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0277]: the trait bound `String: Copy` is not satisfied
  --> $DIR/copy-check-when-count-inferred-later.rs:6:14
   |
LL |     let a = [String::new(); _];
   |              ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
   |
   = note: the `Copy` trait is required because this value will be copied for each element of the array
help: create an inline `const` block
   |
LL |     let a = [const { String::new() }; _];
   |              +++++++               +

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.