2017-02-07 14:05:30 -06:00
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:34:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
34 | 0;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/no_effect.rs:4:9
|
|
|
|
|
|
|
|
|
4 | #![deny(no_effect, unnecessary_operation)]
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:35:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
35 | s2;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:36:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
36 | Unit;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:37:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
37 | Tuple(0);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:38:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
38 | Struct { field: 0 };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:39:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
39 | Struct { ..s };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:40:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
40 | Union { a: 0 };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:41:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
41 | Enum::Tuple(0);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:42:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
42 | Enum::Struct { field: 0 };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:43:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
43 | 5 + 6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:44:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
44 | *&42;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:45:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
45 | &6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:46:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
46 | (5, 6, 7);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:47:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
47 | box 42;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:48:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
48 | ..;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:49:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
49 | 5..;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:50:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
50 | ..5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:51:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
51 | 5..6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:52:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
52 | 5...6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:53:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
53 | [42, 55];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:54:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
54 | [42, 55][1];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:55:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
55 | (42, 55).1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:56:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
56 | [42; 55];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:57:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
57 | [42; 55][13];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement with no effect
|
|
|
|
--> $DIR/no_effect.rs:59:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
59 | || x += 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:65:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
65 | Tuple(get_number());
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/no_effect.rs:4:20
|
|
|
|
|
|
|
|
|
4 | #![deny(no_effect, unnecessary_operation)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:68:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
68 | Struct { field: get_number() };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:71:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
71 | Struct { ..get_struct() };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_struct();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:74:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
74 | Enum::Tuple(get_number());
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:77:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
77 | Enum::Struct { field: get_number() };
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:80:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
80 | 5 + get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| 5;get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:83:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
83 | *&get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:86:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
86 | &get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:89:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
89 | (5, 6, get_number());
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| 5;6;get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:92:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
92 | box get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:95:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
95 | get_number()..;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:98:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
98 | ..get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:101:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
101 | 5..get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| 5;get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:104:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
104 | [42, get_number()];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| 42;get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:107:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
107 | [42, 55][get_number() as usize];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| [42, 55];get_number() as usize;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:110:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
110 | (42, get_number()).1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| 42;get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:113:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
113 | [get_number(); 55];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:116:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
116 | [42; 55][get_number() as usize];
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| [42; 55];get_number() as usize;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: statement can be reduced
|
|
|
|
--> $DIR/no_effect.rs:119:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
119 | {get_number()};
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| get_number();
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: aborting due to 44 previous errors
|
|
|
|
|