diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-07-01 05:20:58 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-01 05:20:58 +0900 |
| commit | dfe05c0ea01f94e1701e8f1182b52b0f42682b3b (patch) | |
| tree | 9889c8379160e791f485c57188bbc72636a945e2 /compiler/rustc_query_impl/src | |
| parent | 56ddef8ab855ebdd57febde8356e890cdc03f118 (diff) | |
| parent | 0c267830d5afdeea2058f0b97e69cf1afbb3d3da (diff) | |
| download | rust-dfe05c0ea01f94e1701e8f1182b52b0f42682b3b.tar.gz rust-dfe05c0ea01f94e1701e8f1182b52b0f42682b3b.zip | |
Rollup merge of #86728 - FabianWolff:issue-86721, r=LeSeulArtichaut
Check node kind to avoid ICE in `check_expr_return()` This PR fixes #86721. The ICE described there is apparently due to a misunderstanding: https://github.com/rust-lang/rust/blob/e98897e5dc9898707bf4331c43b2e76ab7e282fe/compiler/rustc_typeck/src/check/expr.rs#L684-L685 Intuitively, one would think that calling `expect_item()` after `get_parent_item()` should succeed, but as it turns out, `get_parent_item()` can also return foreign, trait, and impl items as well as crates, whereas `expect_item()` specifically expects a `Node::Item`. I have therefore added an extra check to prevent this ICE.
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions
