Files
rust/tests/ui/is_unit_expr.stderr

53 lines
1.1 KiB
Plaintext
Raw Normal View History

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