]> git.lizzy.rs Git - rust.git/blob - src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[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    = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
14
15 error[E0308]: mismatched types
16   --> $DIR/liveness-return-last-stmt-semi.rs:7:19
17    |
18 LL | fn no_return() -> i32 {}
19    |    ---------      ^^^ expected `i32`, found `()`
20    |    |
21    |    implicitly returns `()` as its body has no tail or `return` expression
22
23 error[E0308]: mismatched types
24   --> $DIR/liveness-return-last-stmt-semi.rs:9:19
25    |
26 LL | fn bar(x: u32) -> u32 {
27    |    ---            ^^^ expected `u32`, found `()`
28    |    |
29    |    implicitly returns `()` as its body has no tail or `return` expression
30 LL |     x * 2;
31    |          - help: consider removing this semicolon
32
33 error[E0308]: mismatched types
34   --> $DIR/liveness-return-last-stmt-semi.rs:13:19
35    |
36 LL | fn baz(x: u64) -> u32 {
37    |    ---            ^^^ expected `u32`, found `()`
38    |    |
39    |    implicitly returns `()` as its body has no tail or `return` expression
40
41 error: aborting due to 4 previous errors
42
43 For more information about this error, try `rustc --explain E0308`.