]> git.lizzy.rs Git - rust.git/blob - src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / liveness / liveness-return-last-stmt-semi.stderr
1 error[E0308]: mismatched types
2   --> $DIR/liveness-return-last-stmt-semi.rs:4:41
3    |
4 LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
5    |                                ---      ^^^    - help: consider removing this semicolon
6    |                                |        |
7    |                                |        expected i32, found ()
8    |                                implicitly returns `()` as its body has no tail or `return` expression
9 ...
10 LL |     test!();
11    |     -------- in this macro invocation
12
13 error[E0308]: mismatched types
14   --> $DIR/liveness-return-last-stmt-semi.rs:7:19
15    |
16 LL | fn no_return() -> i32 {}
17    |    ---------      ^^^ expected i32, found ()
18    |    |
19    |    implicitly returns `()` as its body has no tail or `return` expression
20
21 error[E0308]: mismatched types
22   --> $DIR/liveness-return-last-stmt-semi.rs:9:19
23    |
24 LL | fn bar(x: u32) -> u32 {
25    |    ---            ^^^ expected u32, found ()
26    |    |
27    |    implicitly returns `()` as its body has no tail or `return` expression
28 LL |     x * 2;
29    |          - help: consider removing this semicolon
30
31 error[E0308]: mismatched types
32   --> $DIR/liveness-return-last-stmt-semi.rs:13:19
33    |
34 LL | fn baz(x: u64) -> u32 {
35    |    ---            ^^^ expected u32, found ()
36    |    |
37    |    implicitly returns `()` as its body has no tail or `return` expression
38
39 error: aborting due to 4 previous errors
40
41 For more information about this error, try `rustc --explain E0308`.