diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-03-08 09:41:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-08 09:41:38 +0100 |
| commit | 479756802aadcb0b3cad87291c306d9423751617 (patch) | |
| tree | 810ab17bd229b05b5394a466f8d849f053e3e0b2 /src/rustllvm/RustWrapper.cpp | |
| parent | 19e39cb9cb2e040f71bffd8a9e07890579ceeae6 (diff) | |
| parent | e6387b6a75ce37cb5ef8582b8b011737337caf9a (diff) | |
| download | rust-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
