2017-02-07 14:05:30 -06:00
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:58:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
58 | 0;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^
|
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D no-effect` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:59:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
59 | s2;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:60:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
60 | Unit;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:61:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
61 | Tuple(0);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:62:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
62 | Struct { field: 0 };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:63:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
63 | Struct { ..s };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:64:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
64 | Union { a: 0 };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:65:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
65 | Enum::Tuple(0);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:66:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
66 | Enum::Struct { field: 0 };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:67:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
67 | 5 + 6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:68:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
68 | *&42;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:69:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
69 | &6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:70:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
70 | (5, 6, 7);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:71:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
71 | box 42;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:72:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
72 | ..;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:73:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
73 | 5..;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:74:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
74 | ..5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:75:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
75 | 5..6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:76:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
76 | 5..=6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:77:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
77 | [42, 55];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:78:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
78 | [42, 55][1];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:79:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
79 | (42, 55).1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:80:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
80 | [42; 55];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:81:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
81 | [42; 55][13];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:83:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
83 | || x += 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:85:5
|
|
|
|
|
|
|
|
|
85 | FooString { s: s };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2017-02-07 14:05:30 -06:00
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:96:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
96 | Tuple(get_number());
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D unnecessary-operation` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:97:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
97 | Struct { field: get_number() };
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:98:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
98 | Struct { ..get_struct() };
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_struct();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:99:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
99 | Enum::Tuple(get_number());
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:100:5
|
|
|
|
|
|
|
|
|
100 | Enum::Struct { field: get_number() };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:101:5
|
|
|
|
|
|
|
|
|
101 | 5 + get_number();
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: replace it with: `5;get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:102:5
|
|
|
|
|
|
|
|
|
102 | *&get_number();
|
|
|
|
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:103:5
|
|
|
|
|
|
|
|
|
103 | &get_number();
|
|
|
|
| ^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:104:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
104 | (5, 6, get_number());
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `5;6;get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:105:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
105 | box get_number();
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:106:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
106 | get_number()..;
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:107:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
107 | ..get_number();
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:108:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
108 | 5..get_number();
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: replace it with: `5;get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:109:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
109 | [42, get_number()];
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: replace it with: `42;get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:110:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
110 | [42, 55][get_number() as usize];
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `[42, 55];get_number() as usize;`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:111:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
111 | (42, get_number()).1;
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `42;get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:112:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
112 | [get_number(); 55];
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:113:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
113 | [42; 55][get_number() as usize];
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `[42; 55];get_number() as usize;`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
2017-10-07 17:32:09 -05:00
|
|
|
--> $DIR/no_effect.rs:114:5
|
2017-09-18 14:07:33 -05:00
|
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
114 | {get_number()};
|
2017-09-18 14:07:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ help: replace it with: `get_number();`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2017-10-07 17:32:09 -05:00
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:115:5
|
|
|
|
|
|
|
|
|
115 | FooString { s: String::from("blah"), };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `String::from("blah");`
|
|
|
|
|