Files
rust/compiler
bors a5b7511a6c 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.
2021-06-27 00:15:49 +00:00
..
2021-04-04 14:10:26 -07:00
2021-03-27 22:16:33 -04:00
2021-05-24 11:07:48 -04:00
2021-05-31 13:55:43 +02:00
2021-05-24 11:07:48 -04:00
2021-05-31 13:55:43 +02:00