error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:9:23 | 9 | fn foo(v: Vec, w: Vec, mut x: Vec, y: Vec) -> Vec { | ^^^^^^ | note: lint level defined here --> $DIR/needless_pass_by_value.rs:4:9 | 4 | #![deny(needless_pass_by_value)] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type to `&[T]` | fn foo(v: &[T], w: Vec, mut x: Vec, y: Vec) -> Vec { error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:23:11 | 23 | fn bar(x: String, y: Wrapper) { | ^^^^^^ | help: consider changing the type to `&str` | fn bar(x: &str, y: Wrapper) { error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:23:22 | 23 | fn bar(x: String, y: Wrapper) { | ^^^^^^^ | help: consider taking a reference instead | fn bar(x: String, y: &Wrapper) { error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:29:63 | 29 | fn test_borrow_trait, U>(t: T, u: U) { | ^ | help: consider taking a reference instead | fn test_borrow_trait, U>(t: T, u: &U) { error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:40:18 | 40 | fn test_match(x: Option>, y: Option>) { | ^^^^^^^^^^^^^^^^^^^^^^ | help: consider taking a reference instead | fn test_match(x: &Option>, y: Option>) { | match *x { error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:53:24 | 53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) { | ^^^^^^^ | help: consider taking a reference instead | fn test_destructure(x: &Wrapper, y: Wrapper, z: Wrapper) { error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:53:36 | 53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) { | ^^^^^^^ | help: consider taking a reference instead | fn test_destructure(x: Wrapper, y: &Wrapper, z: Wrapper) { | let Wrapper(s) = z; // moved | let Wrapper(ref t) = *y; // not moved | let Wrapper(_) = *y; // still not moved error: aborting due to 7 previous errors