]> git.lizzy.rs Git - rust.git/blob - src/test/ui/liveness/liveness-forgot-ret.stderr
201f90c6412e1ca5d3787ce69e5c638e53b174fc
[rust.git] / src / test / ui / liveness / liveness-forgot-ret.stderr
1 error[E0308]: mismatched types
2   --> $DIR/liveness-forgot-ret.rs:3:19
3    |
4 LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; }
5    |    -              ^^^^^ expected isize, found ()
6    |    |
7    |    implicitly returns `()` as its body has no tail or `return` expression
8    |
9    = note:   expected type `isize`
10            found unit type `()`
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0308`.