]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-66387-if-without-else.stderr
Rollup merge of #106971 - oli-obk:tait_error, r=davidtwco
[rust.git] / tests / ui / async-await / issue-66387-if-without-else.stderr
1 error[E0317]: `if` may be missing an `else` clause
2   --> $DIR/issue-66387-if-without-else.rs:3:5
3    |
4 LL | /     if true {
5 LL | |         return 0;
6 LL | |     }
7    | |_____^ expected `i32`, found `()`
8    |
9    = note: `if` expressions without `else` evaluate to `()`
10    = help: consider adding an `else` block that evaluates to the expected type
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0317`.