diff options
| author | bors <bors@rust-lang.org> | 2019-03-21 23:42:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-03-21 23:42:41 +0000 |
| commit | 86466a397a4e43115231b66cf7935c7390f1aed2 (patch) | |
| tree | 3716d9582b7fb543cef75e9b6be79cde5574425f /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 94fd0458951a4ff91c03366445f0e2e93b86bd2f (diff) | |
| parent | dcaec88a57cd0f388af1678f8db155b2add8b175 (diff) | |
| download | rust-86466a397a4e43115231b66cf7935c7390f1aed2.tar.gz rust-86466a397a4e43115231b66cf7935c7390f1aed2.zip | |
Auto merge of #58981 - estebank:elseless-if, r=davidtwco
Point at coercion reason for `if` expressions without else clause if caused by return type
```
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 `()`
```
Fix #25228.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
