2017-09-03 15:39:49 -05:00
|
|
|
error: This expression evaluates to the Unit type ()
|
2017-09-03 16:14:07 -05:00
|
|
|
--> $DIR/is_unit_expr.rs:8:13
|
2017-09-03 12:39:28 -05:00
|
|
|
|
|
2017-09-03 16:14:07 -05:00
|
|
|
8 | let x = {
|
2017-09-03 12:39:28 -05:00
|
|
|
| _____________^
|
2017-09-03 16:14:07 -05:00
|
|
|
9 | | "foo";
|
|
|
|
10 | | "baz";
|
|
|
|
11 | | };
|
2017-09-03 12:39:28 -05:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: `-D unit-expr` implied by `-D warnings`
|
|
|
|
note: Consider removing the trailing semicolon
|
2017-09-03 16:14:07 -05:00
|
|
|
--> $DIR/is_unit_expr.rs:10:9
|
2017-09-03 12:39:28 -05:00
|
|
|
|
|
2017-09-03 16:14:07 -05:00
|
|
|
10 | "baz";
|
2017-09-03 12:39:28 -05:00
|
|
|
| ^^^^^^
|
2017-09-03 11:12:55 -05:00
|
|
|
|
2017-09-03 15:39:49 -05:00
|
|
|
error: This expression evaluates to the Unit type ()
|
2017-09-03 16:14:07 -05:00
|
|
|
--> $DIR/is_unit_expr.rs:22:13
|
2017-09-03 15:39:49 -05:00
|
|
|
|
|
2017-09-03 16:14:07 -05:00
|
|
|
22 | let z = if true {
|
2017-09-03 15:39:49 -05:00
|
|
|
| _____________^
|
2017-09-03 16:14:07 -05:00
|
|
|
23 | | "foo";
|
|
|
|
24 | | } else {
|
|
|
|
25 | | "bar";
|
|
|
|
26 | | };
|
2017-09-03 15:39:49 -05:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: Consider removing the trailing semicolon
|
2017-09-03 16:14:07 -05:00
|
|
|
--> $DIR/is_unit_expr.rs:25:9
|
2017-09-03 15:39:49 -05:00
|
|
|
|
|
2017-09-03 16:14:07 -05:00
|
|
|
25 | "bar";
|
2017-09-03 15:39:49 -05:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: This expression evaluates to the Unit type ()
|
2017-09-03 16:14:07 -05:00
|
|
|
--> $DIR/is_unit_expr.rs:40:14
|
2017-09-03 15:39:49 -05:00
|
|
|
|
|
2017-09-03 16:14:07 -05:00
|
|
|
40 | let a3 = match a1 {
|
2017-09-03 15:39:49 -05:00
|
|
|
| ______________^
|
2017-09-03 16:14:07 -05:00
|
|
|
41 | | Some(x) => {
|
|
|
|
42 | | x;
|
|
|
|
43 | | },
|
|
|
|
... |
|
|
|
|
46 | | },
|
|
|
|
47 | | };
|
2017-09-03 15:39:49 -05:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: Consider removing the trailing semicolon
|
2017-09-03 16:14:07 -05:00
|
|
|
--> $DIR/is_unit_expr.rs:42:13
|
2017-09-03 15:39:49 -05:00
|
|
|
|
|
2017-09-03 16:14:07 -05:00
|
|
|
42 | x;
|
|
|
|
| ^^
|
2017-09-03 15:39:49 -05:00
|
|
|
|