rust-clippy/tests/ui/is_unit_expr.stderr
2017-11-30 19:50:31 -05:00

71 lines
1.6 KiB
Text

error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:8:13
|
8 | let x = {
| _____________^
9 | | "foo";
10 | | "baz";
11 | | };
| |_____^
|
= note: `-D unit-expr` implied by `-D warnings`
note: Consider removing the trailing semicolon
--> $DIR/is_unit_expr.rs:10:9
|
10 | "baz";
| ^^^^^^
error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:22:13
|
22 | let z = if true {
| _____________^
23 | | "foo";
24 | | } else {
25 | | "bar";
26 | | };
| |_____^
|
note: Consider removing the trailing semicolon
--> $DIR/is_unit_expr.rs:25:9
|
25 | "bar";
| ^^^^^^
error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:40:14
|
40 | let a3 = match a1 {
| ______________^
41 | | Some(x) => {
42 | | x;
43 | | },
... |
46 | | },
47 | | };
| |_____^
|
note: Consider removing the trailing semicolon
--> $DIR/is_unit_expr.rs:42:13
|
42 | x;
| ^^
error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:76:14
|
76 | let x1 = {};
| ^^
error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:77:14
|
77 | let x2 = if true {} else {};
| ^^^^^^^^^^^^^^^^^^
error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:78:14
|
78 | let x3 = match None { Some(_) => {}, None => {}, };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^