Auto merge of #8780 - Alexendoo:init-numbered-field-alias, r=flip1995

Ignore type aliases in `init_numbered_fields`

changelog: Ignore type aliases in [`init_numbered_fields`]

Fixes #8638
This commit is contained in:
bors 2022-05-04 13:17:35 +00:00
commit 751fd0d735
3 changed files with 12 additions and 0 deletions

View file

@ -30,4 +30,9 @@ fn main() {
// Ok because it's in macro
let _ = tuple_struct_init!();
type Alias = TupleStruct;
// Aliases can't be tuple constructed #8638
let _ = Alias { 0: 0, 1: 1, 2: 2 };
}

View file

@ -38,4 +38,9 @@ fn main() {
// Ok because it's in macro
let _ = tuple_struct_init!();
type Alias = TupleStruct;
// Aliases can't be tuple constructed #8638
let _ = Alias { 0: 0, 1: 1, 2: 2 };
}