rust-clippy/clippy_tests/examples/needless_pass_by_value.stderr
Georg Brandl 6b6253016f Update stderr files for change in error reporting
rustc now (https://github.com/rust-lang/rust/issues/33525) does not
report an error count anymore, because it was not correct in many cases.
2017-05-26 16:54:07 +02:00

69 lines
2.7 KiB
Text

error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:9:23
|
9 | fn foo<T: Default>(v: Vec<T>, w: Vec<T>, mut x: Vec<T>, y: Vec<T>) -> Vec<T> {
| ^^^^^^ 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
--> needless_pass_by_value.rs:23:11
|
23 | fn bar(x: String, y: Wrapper) {
| ^^^^^^ help: consider changing the type to `&str`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:23:22
|
23 | fn bar(x: String, y: Wrapper) {
| ^^^^^^^ help: consider taking a reference instead `&Wrapper`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:29:63
|
29 | fn test_borrow_trait<T: std::borrow::Borrow<str>, U>(t: T, u: U) {
| ^ help: consider taking a reference instead `&U`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:40:18
|
40 | fn test_match(x: Option<Option<String>>, y: Option<Option<String>>) {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
help: consider taking a reference instead
| fn test_match(x: &Option<Option<String>>, y: Option<Option<String>>) {
| match *x {
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:53:24
|
53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
| ^^^^^^^ help: consider taking a reference instead `&Wrapper`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:53:36
|
53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
| ^^^^^^^
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
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 previous error(s)
error: Could not compile `clippy_tests`.
To learn more, run the command again with --verbose.