Rollup merge of #64457 - petrochenkov:macunfield, r=matthewjasper

def_collector: Do not ICE on attributes on unnamed fields

The primary issue here is that the expansion infra needs to visit a field in isolation, and fields don't know their own indices during expansion, so they have to be kept in some other place (e.g. `struct Definitions`).

Fixes https://github.com/rust-lang/rust/issues/64385
This commit is contained in:
Mazdak Farrokhzad 2019-09-15 02:29:43 +02:00 committed by GitHub
commit 8f55245fdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 21 deletions

View file

@ -0,0 +1,9 @@
// check-pass
struct S(
#[rustfmt::skip] u8,
u16,
#[rustfmt::skip] u32,
);
fn main() {}