error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:12:23 | 12 | fn foo(v: Vec, w: Vec, mut x: Vec, y: Vec) -> Vec { | ^^^^^^ help: consider changing the type to: `&[T]` | = note: `-D needless-pass-by-value` implied by `-D warnings` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:26:11 | 26 | fn bar(x: String, y: Wrapper) { | ^^^^^^ help: consider changing the type to: `&str` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:26:22 | 26 | fn bar(x: String, y: Wrapper) { | ^^^^^^^ help: consider taking a reference instead: `&Wrapper` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:32:71 | 32 | fn test_borrow_trait, U: AsRef, V>(t: T, u: U, v: V) { | ^ help: consider taking a reference instead: `&V` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:44:18 | 44 | fn test_match(x: Option>, y: Option>) { | ^^^^^^^^^^^^^^^^^^^^^^ | help: consider taking a reference instead | 44 | fn test_match(x: &Option>, y: Option>) { 45 | match *x { | error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:57:24 | 57 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) { | ^^^^^^^ help: consider taking a reference instead: `&Wrapper` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:57:36 | 57 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) { | ^^^^^^^ | help: consider taking a reference instead | 57 | fn test_destructure(x: Wrapper, y: &Wrapper, z: Wrapper) { 58 | let Wrapper(s) = z; // moved 59 | let Wrapper(ref t) = *y; // not moved 60 | let Wrapper(_) = *y; // still not moved | error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:73:49 | 73 | fn test_blanket_ref(_foo: T, _serializable: S) {} | ^ help: consider taking a reference instead: `&T` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:75:18 | 75 | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { | ^^^^^^ help: consider taking a reference instead: `&String` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:75:29 | 75 | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { | ^^^^^^ | help: consider changing the type to | 75 | fn issue_2114(s: String, t: &str, u: Vec, v: Vec) { | ^^^^ help: change `t.clone()` to | 77 | let _ = t.to_string(); | ^^^^^^^^^^^^^ error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:75:40 | 75 | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { | ^^^^^^^^ help: consider taking a reference instead: `&Vec` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:75:53 | 75 | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { | ^^^^^^^^ | help: consider changing the type to | 75 | fn issue_2114(s: String, t: String, u: Vec, v: &[i32]) { | ^^^^^^ help: change `v.clone()` to | 79 | let _ = v.to_owned(); | ^^^^^^^^^^^^ error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:87:12 | 87 | s: String, | ^^^^^^ help: consider changing the type to: `&str` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:88:12 | 88 | t: String, | ^^^^^^ help: consider taking a reference instead: `&String` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:100:13 | 100 | _u: U, | ^ help: consider taking a reference instead: `&U` error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:101:13 | 101 | _s: Self, | ^^^^ help: consider taking a reference instead: `&Self`