error[E0308]: mismatched types --> f57.rs:13:9 | 10 | foo.push(i); | - this is of type `&i32`, which makes `foo` to be inferred as `Vec<&i32>` ... 13 | bar(foo); | --- ^^^ expected `i32`, found `&i32` | | | arguments to this function are incorrect | = note: expected struct `Vec<i32>` found struct `Vec<&i32>` note: function defined here --> f57.rs:1:4 | 1 | fn bar(_: Vec<i32>) {} | ^^^ ----------- help: consider dereferencing the borrow | 10 | foo.push(*i); | +
https://media.hachyderm.io/media_attachments/files/109/628/825/613/598/979/original/a9a55ca4b89325b2.png