rust/tests/ui/is_unit_expr.stderr

56 lines
1.2 KiB
Plaintext
Raw Normal View History

error: This expression evaluates to the Unit type ()
--> $DIR/is_unit_expr.rs:8:13
2017-09-03 19:39:28 +02:00
|
8 | let x = {
2017-09-03 19:39:28 +02:00
| _____________^
9 | | "foo";
10 | | "baz";
11 | | };
2017-09-03 19:39:28 +02:00
| |_____^
|
= note: `-D unit-expr` implied by `-D warnings`
note: Consider removing the trailing semicolon
--> $DIR/is_unit_expr.rs:10:9
2017-09-03 19:39:28 +02:00
|
10 | "baz";
2017-09-03 19:39:28 +02:00
| ^^^^^^
2017-09-03 18:12:55 +02:00
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: aborting due to 3 previous errors
2017-09-03 18:12:55 +02:00