diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-11-18 23:24:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-18 23:24:37 +0100 |
| commit | 9577734ff360235894db2904503a4d515dc89a29 (patch) | |
| tree | da0064e79d38af69284bca3e6847db2be9ad3903 /src/rustllvm/RustWrapper.cpp | |
| parent | 71309479185827af1451dab8330a4475fe441e86 (diff) | |
| parent | f3e9b1a703203be4f375dc5fa3950b642a156ec7 (diff) | |
| download | rust-9577734ff360235894db2904503a4d515dc89a29.tar.gz rust-9577734ff360235894db2904503a4d515dc89a29.zip | |
Rollup merge of #55862 - zackmdavis:but_will_they_come_when_you_call_them, r=estebank
in which the E0618 "expected function" diagnostic gets a makeover A woman of wisdom once told me, "Better late than never." (Can't reopen the previously-closed pull request from six months ago [due to GitHub limitations](https://github.com/rust-lang/rust/pull/51098#issuecomment-437647157).) Now the main span focuses on the erroneous not-a-function callee, while showing the entire call expression is relegated to a secondary span. In the case where the erroneous callee is itself a call, we point out the definition, and, if the call expression spans multiple lines, tentatively suggest a semicolon (because we suspect that the "outer" call is actually supposed to be a tuple).   The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is only called by `check_call`, which is only called with a first arg of kind `ExprKind::Call` in `check_expr_kind`). Resolves #51055. r? @estebank
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
