about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-03-08 09:41:38 +0100
committerGitHub <noreply@github.com>2019-03-08 09:41:38 +0100
commit479756802aadcb0b3cad87291c306d9423751617 (patch)
tree810ab17bd229b05b5394a466f8d849f053e3e0b2 /src/rustllvm/RustWrapper.cpp
parent19e39cb9cb2e040f71bffd8a9e07890579ceeae6 (diff)
parente6387b6a75ce37cb5ef8582b8b011737337caf9a (diff)
downloadrust-479756802aadcb0b3cad87291c306d9423751617.tar.gz
rust-479756802aadcb0b3cad87291c306d9423751617.zip
Rollup merge of #58204 - estebank:impl-trait-semi, r=zackmdavis
On return type `impl Trait` for block with no expr point at last semi

Partial solution, doesn't actually validate that the last statement in the function body can satisfy the trait bound, but it's a good incremental improvement over the status quo.

```
error[E0277]: the trait bound `(): Bar` is not satisfied
  --> $DIR/impl-trait-return-trailing-semicolon.rs:3:13
   |
LL | fn foo() -> impl Bar {
   |             ^^^^^^^^ the trait `Bar` is not implemented for `()`
LL |     5;
   |      - consider removing this semicolon
   |
   = note: the return type of a function must have a statically known size
```

Partially addresses #54771.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions