|
1 | 1 | error[E0308]: mismatched types
|
2 |
| - --> $DIR/liveness-return-last-stmt-semi.rs:7:19 |
| 2 | + --> $DIR/liveness-return-last-stmt-semi.rs:6:19 |
3 | 3 | |
|
4 | 4 | LL | fn no_return() -> i32 {}
|
5 | 5 | | --------- ^^^ expected `i32`, found `()`
|
6 | 6 | | |
|
7 | 7 | | implicitly returns `()` as its body has no tail or `return` expression
|
8 | 8 |
|
9 | 9 | error[E0308]: mismatched types
|
10 |
| - --> $DIR/liveness-return-last-stmt-semi.rs:9:19 |
| 10 | + --> $DIR/liveness-return-last-stmt-semi.rs:8:19 |
11 | 11 | |
|
12 | 12 | LL | fn bar(x: u32) -> u32 {
|
13 | 13 | | --- ^^^ expected `u32`, found `()`
|
14 | 14 | | |
|
15 | 15 | | implicitly returns `()` as its body has no tail or `return` expression
|
16 | 16 | LL | x * 2;
|
17 |
| - | - help: remove this semicolon |
| 17 | + | - help: remove this semicolon to return this value |
18 | 18 |
|
19 | 19 | error[E0308]: mismatched types
|
20 |
| - --> $DIR/liveness-return-last-stmt-semi.rs:13:19 |
| 20 | + --> $DIR/liveness-return-last-stmt-semi.rs:12:19 |
21 | 21 | |
|
22 | 22 | LL | fn baz(x: u64) -> u32 {
|
23 | 23 | | --- ^^^ expected `u32`, found `()`
|
24 | 24 | | |
|
25 | 25 | | implicitly returns `()` as its body has no tail or `return` expression
|
26 | 26 |
|
27 | 27 | error[E0308]: mismatched types
|
28 |
| - --> $DIR/liveness-return-last-stmt-semi.rs:4:41 |
| 28 | + --> $DIR/liveness-return-last-stmt-semi.rs:3:41 |
29 | 29 | |
|
30 | 30 | LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
|
31 | 31 | | --- ^^^ expected `i32`, found `()`
|
|
0 commit comments