rust/src/test/ui/liveness
bors ad9068f874 Auto merge of #57230 - estebank:return-mismatch, r=varkor
Modify mismatched type error for functions with no return

Fix #50009.

```
error[E0308]: mismatched types
  --> $DIR/coercion-missing-tail-expected-type.rs:3:24
   |
LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types
   |    --------            ^^^ expected i32, found ()
   |    |
   |    this function's body doesn't return
LL |     x + 1;
   |          - help: consider removing this semicolon
   |
   = note: expected type `i32`
              found type `()`
```

instead of

```
error[E0308]: mismatched types
  --> $DIR/coercion-missing-tail-expected-type.rs:3:28
   |
LL |   fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types
   |  ____________________________^
LL | |     x + 1;
   | |          - help: consider removing this semicolon
LL | | }
   | |_^ expected i32, found ()
   |
   = note: expected type `i32`
              found type `()`
```
2019-01-05 22:25:47 +00:00
..
liveness-assign Remove licenses 2018-12-25 21:08:33 -07:00
liveness-closure-require-ret.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-closure-require-ret.stderr Tweak E0308 error for clarity 2018-12-30 21:59:27 -08:00
liveness-dead.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-dead.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-forgot-ret.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-forgot-ret.stderr Tweak E0308 error for clarity 2018-12-30 21:59:27 -08:00
liveness-issue-2163.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-issue-2163.stderr Tweak E0308 error for clarity 2018-12-30 21:59:27 -08:00
liveness-missing-ret2.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-missing-ret2.stderr Tweak E0308 error for clarity 2018-12-30 21:59:27 -08:00
liveness-move-call-arg.nll.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-call-arg.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-call-arg.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-in-loop.nll.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-in-loop.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-in-loop.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-in-while.nll.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-in-while.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-move-in-while.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-return-last-stmt-semi.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-return-last-stmt-semi.stderr Tweak E0308 error for clarity 2018-12-30 21:59:27 -08:00
liveness-unused.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-unused.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-use-after-move.nll.stderr add non-copy note to stderr 2018-12-29 10:36:23 +08:00
liveness-use-after-move.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-use-after-move.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-use-after-send.nll.stderr Remove licenses 2018-12-25 21:08:33 -07:00
liveness-use-after-send.rs Remove licenses 2018-12-25 21:08:33 -07:00
liveness-use-after-send.stderr Remove licenses 2018-12-25 21:08:33 -07:00