diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-03-06 17:54:35 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-03-07 13:17:50 -0800 |
| commit | 369058eacde8ffdfeed9b362b10720799729a835 (patch) | |
| tree | e5c9b2b287ffd8005fb5e876aabb660e1911d95f /src/libstd/sys/unix/stack_overflow.rs | |
| parent | f22dca0a1bef4141e75326caacc3cd59f3d5be8e (diff) | |
| download | rust-369058eacde8ffdfeed9b362b10720799729a835.tar.gz rust-369058eacde8ffdfeed9b362b10720799729a835.zip | |
Point at coercion reason for if exprs without else clause
```
error[E0317]: if may be missing an else clause
--> $DIR/if-without-else-as-fn-expr.rs:2:5
|
LL | fn foo(bar: usize) -> usize {
| ----- found `usize` because of this return type
LL | / if bar % 5 == 0 {
LL | | return 3;
LL | | }
| |_____^ expected (), found usize
|
= note: expected type `()`
found type `usize`
= note: `if` expressions without `else` must evaluate to `()`
```
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
