diff options
| author | bors <bors@rust-lang.org> | 2022-08-05 09:32:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-05 09:32:26 +0000 |
| commit | 9bbbf60b0442f1d56fc39f30274be77acc79164c (patch) | |
| tree | 1ce993d5a0b8f327611f5d4ab57c11ec3bd3c9e6 /compiler/rustc_privacy/src | |
| parent | cdfd675a63090182fd1c5f2ff58d8eaa115da156 (diff) | |
| parent | e3c7e04a4430942205872a8ed3c67531f22985bc (diff) | |
| download | rust-9bbbf60b0442f1d56fc39f30274be77acc79164c.tar.gz rust-9bbbf60b0442f1d56fc39f30274be77acc79164c.zip | |
Auto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebank
Warn about dead tuple struct fields Continuation of #92972. Fixes #92790. The language team has already commented on this in https://github.com/rust-lang/rust/pull/92972#issuecomment-1021511970; I have incorporated their requests here. Specifically, there is now a new allow-by-default `unused_tuple_struct_fields` lint (name bikesheddable), and fields of unit type are ignored (https://github.com/rust-lang/rust/pull/92972#issuecomment-1021815408), so error messages look like this: ``` error: field is never read: `1` --> $DIR/tuple-struct-field.rs:6:21 | LL | struct Wrapper(i32, [u8; LEN], String); | ^^^^^^^^^ | help: change the field to unit type to suppress this warning while preserving the field numbering | LL | struct Wrapper(i32, (), String); | ~~ ``` r? `@joshtriplett`
Diffstat (limited to 'compiler/rustc_privacy/src')
0 files changed, 0 insertions, 0 deletions
