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