about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-03-21 23:42:41 +0000
committerbors <bors@rust-lang.org>2019-03-21 23:42:41 +0000
commit86466a397a4e43115231b66cf7935c7390f1aed2 (patch)
tree3716d9582b7fb543cef75e9b6be79cde5574425f /src/libstd/sys/unix/stack_overflow.rs
parent94fd0458951a4ff91c03366445f0e2e93b86bd2f (diff)
parentdcaec88a57cd0f388af1678f8db155b2add8b175 (diff)
downloadrust-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