rust/tests/ui/unnecessary_operation.stderr
2018-12-10 08:22:07 +01:00

129 lines
3.8 KiB
Plaintext

error: statement can be reduced
--> $DIR/unnecessary_operation.rs:54:5
|
54 | Tuple(get_number());
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
= note: `-D clippy::unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:55:5
|
55 | Struct { field: get_number() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:56:5
|
56 | Struct { ..get_struct() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_struct();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:57:5
|
57 | Enum::Tuple(get_number());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:58:5
|
58 | Enum::Struct { field: get_number() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:59:5
|
59 | 5 + get_number();
| ^^^^^^^^^^^^^^^^^ help: replace it with: `5;get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:60:5
|
60 | *&get_number();
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:61:5
|
61 | &get_number();
| ^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:62:5
|
62 | (5, 6, get_number());
| ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `5;6;get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:63:5
|
63 | box get_number();
| ^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:64:5
|
64 | get_number()..;
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:65:5
|
65 | ..get_number();
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:66:5
|
66 | 5..get_number();
| ^^^^^^^^^^^^^^^^ help: replace it with: `5;get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:67:5
|
67 | [42, get_number()];
| ^^^^^^^^^^^^^^^^^^^ help: replace it with: `42;get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:68:5
|
68 | [42, 55][get_number() as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `[42, 55];get_number() as usize;`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:69:5
|
69 | (42, get_number()).1;
| ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `42;get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:70:5
|
70 | [get_number(); 55];
| ^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:71:5
|
71 | [42; 55][get_number() as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `[42; 55];get_number() as usize;`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:72:5
|
72 | / {
73 | | get_number()
74 | | };
| |______^ help: replace it with: `get_number();`
error: statement can be reduced
--> $DIR/unnecessary_operation.rs:75:5
|
75 | / FooString {
76 | | s: String::from("blah"),
77 | | };
| |______^ help: replace it with: `String::from("blah");`
error: aborting due to 20 previous errors