rust/compiler
Yuki Okushi 945458d472
Rollup merge of #87013 - FabianWolff:issue-83921, r=estebank
Fix several ICEs related to malformed `#[repr(...)]` attributes

This PR fixes #83921. #83921 actually contains two related but distinct issues (one of them incorrectly reported as a duplicate in https://github.com/rust-lang/rust/issues/83921#issuecomment-814640734):

In the first, a call to `delay_span_bug` leads to an ICE when compiling with `-Zunpretty=everybody_loops` (and some other pretty-printing modes), because the corresponding error is emitted in a later pass, which does not run when only pretty-printing is requested.

The second issue is about parsing `#[repr(...)]` attributes. Currently, all of the following cause an ICE when applied to a struct/enum:
```rust
#[repr(packed())]
#[repr(align)]
#[repr(align(2, 4))]
#[repr(align())]
#[repr(i8())]
#[repr(u32(42))]
#[repr(i64 = 2)]
```
I have fixed this by expanding the well-formedness checks in `find_repr_attrs()`.
2021-07-11 01:15:41 +09:00
..
rustc
rustc_apfloat Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_arena
rustc_ast Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_ast_lowering Update the comment on lower_expr_try 2021-07-09 00:13:44 -07:00
rustc_ast_passes Auto merge of #86164 - FabianWolff:issue-86053, r=davidtwco 2021-06-17 06:34:12 +00:00
rustc_ast_pretty Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_attr Enhance well-formedness checks for #[repr(...)] attributes 2021-07-09 22:03:48 +02:00
rustc_builtin_macros Auto merge of #86599 - Amanieu:asm_raw, r=nagisa 2021-06-25 20:44:28 +00:00
rustc_codegen_cranelift Use cranelift's Type::int instead of doing the match myself 2021-07-08 14:55:58 -07:00
rustc_codegen_llvm Auto merge of #86419 - ricobbe:raw-dylib-stdcall, r=petrochenkov 2021-07-09 23:24:21 +00:00
rustc_codegen_ssa Add support for raw-dylib with stdcall, fastcall functions on i686-pc-windows-msvc. 2021-07-09 12:04:54 -07:00
rustc_data_structures rustc_data_structures: Drop unused dependency on crossbeam-utils 2021-06-25 01:03:16 -07:00
rustc_driver Auto merge of #80182 - in42:stack_trace, r=tmandry 2021-07-02 05:40:51 +00:00
rustc_error_codes Rollup merge of #86838 - lambinoo:I-69630-rust_const_unstable_check_const, r=oli-obk 2021-07-08 18:30:34 +02:00
rustc_errors Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_expand Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_feature Change linked tracking issue for more qualified paths 2021-07-07 14:56:51 +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 #86726 - sexxi-goose:use-diagnostic-item-for-rfc2229-migration, r=nikomatsakis 2021-07-08 18:30:33 +02:00
rustc_hir_pretty Rollup merge of #86358 - klensy:pp-loop, r=Mark-Simulacrum 2021-06-29 00:26:55 +09:00
rustc_incremental Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_index
rustc_infer remove unused Option 2021-07-04 11:09:32 -04:00
rustc_interface Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_lexer Rename 'bad prefix' to 'unknown prefix'. 2021-06-26 23:11:14 +08:00
rustc_lint Auto merge of #86968 - inquisitivecrystal:missing-docs-v2, r=oli-obk 2021-07-10 03:32:42 +00:00
rustc_lint_defs rename rust_2021_token_prefixes to rust_2021_prefixes_incompatible_syntax 2021-07-06 20:13:36 +02:00
rustc_llvm Auto merge of #84171 - ricobbe:raw-dylib-via-llvm, r=petrochenkov 2021-06-06 03:59:17 +00:00
rustc_macros Lint for unused borrows as part of UNUSED_MUST_USE 2021-06-18 15:09:40 +08:00
rustc_metadata Add support for raw-dylib with stdcall, fastcall functions on i686-pc-windows-msvc. 2021-07-09 12:04:54 -07:00
rustc_middle Rollup merge of #87006 - ptrojahn:implsource_vtable, r=jonas-schievink 2021-07-11 01:15:39 +09:00
rustc_mir Rollup merge of #87000 - m-ou-se:const-panic-track-caller, r=oli-obk 2021-07-09 16:20:36 +02:00
rustc_mir_build Auto merge of #85263 - Smittyvb:thir-unsafeck-union-field, r=oli-obk 2021-07-09 20:56:07 +00:00
rustc_parse Rollup merge of #86932 - rylev:fix-ice-86895, r=estebank 2021-07-08 10:44:34 +09:00
rustc_parse_format Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_passes Rollup merge of #86838 - lambinoo:I-69630-rust_const_unstable_check_const, r=oli-obk 2021-07-08 18:30:34 +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 rustc_query_impl: Remove unused dependencies 2021-06-25 01:13:00 -07: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 #86143 - bjorn3:revert_revert_merge_crate_disambiguator, r=michaelwoerister 2021-07-06 11:31:59 +00:00
rustc_save_analysis Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +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 #86572 - rylev:force-warnings-always, r=nikomatsakis 2021-07-06 16:50:33 +00:00
rustc_span Rollup merge of #86881 - tmiasko:lookup-line, r=nagisa 2021-07-09 16:20:32 +02:00
rustc_symbol_mangling Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_target Replace per-target ABI denylist with an allowlist 2021-07-06 13:12:15 +03:00
rustc_trait_selection Rollup merge of #86726 - sexxi-goose:use-diagnostic-item-for-rfc2229-migration, r=nikomatsakis 2021-07-08 18:30:33 +02:00
rustc_traits Combine individual limit queries into single limits query 2021-07-04 13:02:51 -05:00
rustc_ty_utils Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_type_ir
rustc_typeck Auto merge of #86987 - lcnr:const-default-eval-bound, r=oli-obk 2021-07-10 06:01:04 +00:00