about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-06-27 00:15:49 +0000
committerbors <bors@rust-lang.org>2021-06-27 00:15:49 +0000
commita5b7511a6ccf241ba2ce6ad0b04e79f1e3d85686 (patch)
tree848a00993d06d9cefdda7a3367e60945f0f2335a /compiler/rustc_codegen_llvm/src
parenta1411de9de38e0fed728874580218338160eb185 (diff)
parente8ebf98742a46aef11d382d5cbad3d9bb9098b19 (diff)
downloadrust-a5b7511a6ccf241ba2ce6ad0b04e79f1e3d85686.tar.gz
rust-a5b7511a6ccf241ba2ce6ad0b04e79f1e3d85686.zip
Auto merge of #86645 - FabianWolff:issue-82328, r=LeSeulArtichaut
Fix ICE with `-Zunpretty=hir,typed`

This PR fixes #82328. The `-Zunpretty=hir,typed` pretty-printer maintains an `Option` with type-checking results and sets the `Option` to `Some` when entering a body. However, this leads to an ICE if an expression occurs in a function signature (i.e. outside of a body), such as `128` in
```rust
fn foo(-128..=127: i8) {}
```
This PR fixes the ICE by checking (if necessary) whether the expression's owner has a body, and retrieving type-checking results for that on the fly.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions