diff options
| author | bors <bors@rust-lang.org> | 2019-07-19 04:04:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-07-19 04:04:17 +0000 |
| commit | f9477a77c52af8d3dea361b3f4ac3e60653aa529 (patch) | |
| tree | 13459d013bcd32ccd59de28a29c6aab8853f6fd4 /src/test/ui/error-codes | |
| parent | fe499a7b34dcb1fc054dd637ea561a19a268d2de (diff) | |
| parent | f8681f0c05c91df4aaf90a0ca60d1f823cf89d9d (diff) | |
| download | rust-f9477a77c52af8d3dea361b3f4ac3e60653aa529.tar.gz rust-f9477a77c52af8d3dea361b3f4ac3e60653aa529.zip | |
Auto merge of #62694 - lundibundi:help-infer-fn-ret, r=eddyb
rustc_typeck: improve diagnostics for -> _ fn return type This should implement IIUC the mentioned issue. ~~I'm not sure if there is a better way than `get_infer_ret_ty` to get/check the return type without code duplication.~~ ~~Also, is this unwrap be okay `ty::Binder::bind(*tables.liberated_fn_sigs().get(hir_id).unwrap())`?~~ r? @eddyb Closes: https://github.com/rust-lang/rust/issues/56132
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0121.stderr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr index b7f4ce4d230..1a16aab6a41 100644 --- a/src/test/ui/error-codes/E0121.stderr +++ b/src/test/ui/error-codes/E0121.stderr @@ -2,7 +2,10 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa --> $DIR/E0121.rs:1:13 | LL | fn foo() -> _ { 5 } - | ^ not allowed in type signatures + | ^ + | | + | not allowed in type signatures + | help: replace `_` with the correct return type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:3:13 |
