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
..
rustc
rustc_apfloat Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_arena
rustc_ast Auto merge of #86599 - Amanieu:asm_raw, r=nagisa 2021-06-25 20:44:28 +00:00
rustc_ast_lowering Auto merge of #86321 - JohnTitor:rollup-q61c8q4, r=JohnTitor 2021-06-15 20:15:23 +00:00
rustc_ast_passes Auto merge of #86164 - FabianWolff:issue-86053, r=davidtwco 2021-06-17 06:34:12 +00:00
rustc_ast_pretty Auto merge of #86599 - Amanieu:asm_raw, r=nagisa 2021-06-25 20:44:28 +00:00
rustc_attr
rustc_builtin_macros Auto merge of #86599 - Amanieu:asm_raw, r=nagisa 2021-06-25 20:44:28 +00:00
rustc_codegen_cranelift Auto merge of #85640 - bjorn3:custom_ice_hook, r=jackh726 2021-06-25 04:06:32 +00:00
rustc_codegen_llvm Auto merge of #86267 - ZuseZ4:master, r=nagisa 2021-06-26 19:20:41 +00:00
rustc_codegen_ssa Auto merge of #86166 - tmiasko:no-alloca-for-zsts, r=nagisa 2021-06-21 04:03:51 +00:00
rustc_data_structures Rollup merge of #86387 - JohnTitor:now-no-unused-lifetimes, r=Mark-Simulacrum 2021-06-22 07:37:53 +09:00
rustc_driver Use Option::map() instead of if let 2021-06-26 22:26:26 +02:00
rustc_error_codes Auto merge of #86279 - JohnTitor:transparent-zero-size-fields, r=nikomatsakis 2021-06-24 07:29:59 +00:00
rustc_errors Auto merge of #85903 - bjorn3:rustc_serialize_cleanup, r=varkor 2021-06-07 14:40:26 +00:00
rustc_expand Don't lint :pat when re-parsing a macro from another crate. 2021-06-24 22:04:55 +00:00
rustc_feature Add support for using qualified paths with structs in expression and pattern 2021-06-10 13:18:41 +02:00
rustc_fs_util
rustc_graphviz Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_hir Rollup merge of #86223 - fee1-dead:better-E0121, r=petrochenkov 2021-06-23 00:20:18 +02:00
rustc_hir_pretty Auto merge of #86599 - Amanieu:asm_raw, r=nagisa 2021-06-25 20:44:28 +00:00
rustc_incremental Do not require the DefPathTable to construct the on-disk cache. 2021-06-08 22:23:03 +02:00
rustc_index
rustc_infer Auto merge of #86164 - FabianWolff:issue-86053, r=davidtwco 2021-06-17 06:34:12 +00:00
rustc_interface Auto merge of #86267 - ZuseZ4:master, r=nagisa 2021-06-26 19:20:41 +00:00
rustc_lexer
rustc_lint Better suggestion for array_into_iter in for loop. 2021-06-26 12:14:22 +00:00
rustc_lint_defs Auto merge of #86637 - ehuss:spellings, r=dtolnay 2021-06-26 05:09:27 +00:00
rustc_llvm
rustc_macros Lint for unused borrows as part of UNUSED_MUST_USE 2021-06-18 15:09:40 +08:00
rustc_metadata Use #[non_exhaustive] where appropriate 2021-06-24 04:16:11 -04:00
rustc_middle Auto merge of #86586 - Smittyvb:https-everywhere, r=petrochenkov 2021-06-26 08:24:31 +00:00
rustc_mir Auto merge of #86586 - Smittyvb:https-everywhere, r=petrochenkov 2021-06-26 08:24:31 +00:00
rustc_mir_build Auto merge of #86138 - FabianWolff:issue-85871, r=nikomatsakis 2021-06-23 21:35:46 +00:00
rustc_parse Auto merge of #86586 - Smittyvb:https-everywhere, r=petrochenkov 2021-06-26 08:24:31 +00:00
rustc_parse_format
rustc_passes Check that #[cmse_nonsecure_entry] is applied to a function definition 2021-06-25 17:49:41 +02:00
rustc_plugin_impl
rustc_privacy Add more tests + visit_ty in some places 2021-06-09 19:28:41 +01:00
rustc_query_impl Auto merge of #85154 - cjgillot:lessfn, r=bjorn3 2021-06-15 14:52:58 +00:00
rustc_query_system Auto merge of #85154 - cjgillot:lessfn, r=bjorn3 2021-06-15 14:52:58 +00:00
rustc_resolve Auto merge of #85427 - ehuss:fix-use-placement, r=jackh726 2021-06-24 14:56:28 +00:00
rustc_save_analysis Revert "Merge CrateDisambiguator into StableCrateId" 2021-06-07 10:37:45 +02:00
rustc_serialize Emit warnings for unused fields in custom targets. 2021-06-17 21:48:02 +02:00
rustc_session Auto merge of #86267 - ZuseZ4:master, r=nagisa 2021-06-26 19:20:41 +00:00
rustc_span Auto merge of #86386 - inquisitivecrystal:better-errors-for-display-traits-v3, r=estebank 2021-06-23 03:16:04 +00:00
rustc_symbol_mangling Revert "Merge CrateDisambiguator into StableCrateId" 2021-06-07 10:37:45 +02:00
rustc_target Point to the updated version of some dead links 2021-06-23 19:36:51 -04:00
rustc_trait_selection Auto merge of #86386 - inquisitivecrystal:better-errors-for-display-traits-v3, r=estebank 2021-06-23 03:16:04 +00:00
rustc_traits Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_ty_utils Revert "Merge CrateDisambiguator into StableCrateId" 2021-06-07 10:37:45 +02:00
rustc_type_ir
rustc_typeck Auto merge of #86505 - JohnTitor:fix-86483, r=jackh726 2021-06-25 09:28:17 +00:00