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:
commit
8f55245fdc
3 changed files with 38 additions and 21 deletions
9
src/test/ui/attributes/unnamed-field-attributes.rs
Normal file
9
src/test/ui/attributes/unnamed-field-attributes.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// check-pass
|
||||
|
||||
struct S(
|
||||
#[rustfmt::skip] u8,
|
||||
u16,
|
||||
#[rustfmt::skip] u32,
|
||||
);
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue