).

аюсь передать массив в функцию:

fn my_func(xs: [usize]) -> usize {
    0
}

fn main() {
    let arr = [329, 457, 657];
    let res = my_func(inp);
}

Я получаю ошибку:

error[E0277]: the trait bound `[usize]: std::marker::Sized` is not satisfied
 --> src/main.rs:1:12
  |
1 | fn my_func(xs: [usize]) -> usize {
  |            ^^ `[usize]` does not have a constant size known at compile-time
  |
  = help: the trait `std::marker::Sized` is not implemented for `[usize]`
  = note: all local variables must have a statically known size

Я знаю оэти Другие вопросов но они, кажется, не относятся к моей простой ситуации.

Как я могу исправить ошибку?

Ответы на вопрос(2)

Ваш ответ на вопрос