1 error: this argument is passed by value, but not consumed in the function body
2 --> $DIR/needless_pass_by_value.rs:9:23
4 9 | fn foo<T: Default>(v: Vec<T>, w: Vec<T>, mut x: Vec<T>, y: Vec<T>) -> Vec<T> {
5 | ^^^^^^ help: consider changing the type to: `&[T]`
7 = note: `-D needless-pass-by-value` implied by `-D warnings`
9 error: this argument is passed by value, but not consumed in the function body
10 --> $DIR/needless_pass_by_value.rs:23:11
12 23 | fn bar(x: String, y: Wrapper) {
13 | ^^^^^^ help: consider changing the type to: `&str`
15 error: this argument is passed by value, but not consumed in the function body
16 --> $DIR/needless_pass_by_value.rs:23:22
18 23 | fn bar(x: String, y: Wrapper) {
19 | ^^^^^^^ help: consider taking a reference instead: `&Wrapper`
21 error: this argument is passed by value, but not consumed in the function body
22 --> $DIR/needless_pass_by_value.rs:29:63
24 29 | fn test_borrow_trait<T: std::borrow::Borrow<str>, U>(t: T, u: U) {
25 | ^ help: consider taking a reference instead: `&U`
27 error: this argument is passed by value, but not consumed in the function body
28 --> $DIR/needless_pass_by_value.rs:40:18
30 40 | fn test_match(x: Option<Option<String>>, y: Option<Option<String>>) {
31 | ^^^^^^^^^^^^^^^^^^^^^^
33 help: consider taking a reference instead
35 40 | fn test_match(x: &Option<Option<String>>, y: Option<Option<String>>) {
39 error: this argument is passed by value, but not consumed in the function body
40 --> $DIR/needless_pass_by_value.rs:53:24
42 53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
43 | ^^^^^^^ help: consider taking a reference instead: `&Wrapper`
45 error: this argument is passed by value, but not consumed in the function body
46 --> $DIR/needless_pass_by_value.rs:53:36
48 53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
51 help: consider taking a reference instead
53 53 | fn test_destructure(x: Wrapper, y: &Wrapper, z: Wrapper) {
54 54 | let Wrapper(s) = z; // moved
55 55 | let Wrapper(ref t) = *y; // not moved
56 56 | let Wrapper(_) = *y; // still not moved