rust/compiler
bors 9bbbf60b04 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`
2022-08-05 09:32:26 +00:00
..
rustc Don't rerun the build script for the compiler each time on linux 2022-07-10 23:57:25 -05:00
rustc_apfloat Warn about dead tuple struct fields 2022-08-03 12:17:23 +02:00
rustc_arena Rollup merge of #97711 - Nilstrieb:rustc-arena-ub, r=wesleywiser 2022-07-07 18:06:49 +05:30
rustc_ast Move LifetimeCollectVisitor to rustc_ast_lowering 2022-08-04 11:26:54 -03:00
rustc_ast_lowering Fix typo 2022-08-04 15:13:47 -03:00
rustc_ast_passes Provide suggestion on missing let in binding statement 2022-08-03 09:29:29 -07:00
rustc_ast_pretty Enable unused_parens for match arms 2022-08-04 07:16:39 -04:00
rustc_attr avoid embedding StabilityLevel::Unstable reason string into metadata multiple times 2022-07-21 22:53:02 +03:00
rustc_borrowck Rollup merge of #100095 - jackh726:early-binder, r=lcnr 2022-08-04 22:25:04 +02:00
rustc_builtin_macros Rollup merge of #100058 - TaKO8Ki:suggest-positional-formatting-argument-instead-of-format-args-capture, r=estebank 2022-08-04 22:25:01 +02:00
rustc_codegen_cranelift Introduce an ArchiveBuilderBuilder 2022-07-28 09:08:47 +00:00
rustc_codegen_gcc Introduce an ArchiveBuilderBuilder 2022-07-28 09:08:47 +00:00
rustc_codegen_llvm Rollup merge of #99844 - bjorn3:archive_builder_interface_refactor, r=nagisa 2022-07-31 17:36:42 +05:30
rustc_codegen_ssa Auto merge of #100120 - matthiaskrgr:rollup-g6ycykq, r=matthiaskrgr 2022-08-04 03:52:29 +00:00
rustc_const_eval Rollup merge of #100095 - jackh726:early-binder, r=lcnr 2022-08-04 22:25:04 +02:00
rustc_data_structures remove some manual hash stable impls 2022-07-29 12:48:28 +02:00
rustc_driver Rename local_did to def_id 2022-07-29 18:26:10 -04:00
rustc_error_codes region_outlives_predicate no snapshot 2022-07-21 13:09:01 +02:00
rustc_error_messages lint: add bad opt access internal lint 2022-07-27 11:24:27 +01:00
rustc_errors Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_expand Auto merge of #99887 - nnethercote:rm-TreeAndSpacing, r=petrochenkov 2022-07-30 14:50:05 +00:00
rustc_feature lint: add bad opt access internal lint 2022-07-27 11:24:27 +01:00
rustc_fs_util
rustc_graphviz Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_hir Do not collect lifetimes with Infer resolution 2022-08-04 12:40:00 -03:00
rustc_hir_pretty use rustc_hir_pretty::qpath_to_string to avoid span_to_snippet when rendering path 2022-07-17 04:58:38 +00:00
rustc_incremental Remove trait_of_item query. 2022-08-01 21:39:26 +02:00
rustc_index Auto merge of #99052 - tmiasko:bitset-clone-from, r=Mark-Simulacrum 2022-07-31 21:40:21 +00:00
rustc_infer Rollup merge of #100102 - b-naber:typo-higher-ranked-sub, r=Dylan-DPC 2022-08-03 22:30:46 +02:00
rustc_interface Rollup merge of #99519 - Urgau:check-cfg-implicit, r=petrochenkov 2022-07-31 23:39:38 +02:00
rustc_lexer Shrink Token. 2022-08-01 08:53:04 +10:00
rustc_lint Rollup merge of #100093 - wcampbell0x2a:unused-parens-for-match-arms, r=petrochenkov 2022-08-04 22:25:02 +02:00
rustc_lint_defs Warn about dead tuple struct fields 2022-08-03 12:17:23 +02:00
rustc_llvm RustWrapper: update for TypedPointerType in LLVM 2022-08-04 11:31:57 -04:00
rustc_log clippy::complexity fixes 2022-05-26 13:14:24 +02:00
rustc_macros clippy::perf fixes 2022-07-20 11:48:11 +02:00
rustc_metadata Auto merge of #95884 - cjgillot:assoc-item, r=lcnr 2022-08-01 21:43:35 +00:00
rustc_middle Auto merge of #99867 - spastorino:refactor-remap-lifetimes, r=nikomatsakis 2022-08-05 06:35:12 +00:00
rustc_mir_build Rollup merge of #100093 - wcampbell0x2a:unused-parens-for-match-arms, r=petrochenkov 2022-08-04 22:25:02 +02:00
rustc_mir_dataflow Remove redundant TransferWrapper struct 2022-08-01 17:08:19 +02:00
rustc_mir_transform Rollup merge of #100095 - jackh726:early-binder, r=lcnr 2022-08-04 22:25:04 +02:00
rustc_monomorphize Use LocalDefId for closures more 2022-07-30 15:59:17 -05:00
rustc_parse Rollup merge of #98796 - compiler-errors:no-semi-if-comma, r=estebank 2022-08-04 22:24:59 +02:00
rustc_parse_format add a comment about what we can parse now 2022-08-04 20:43:35 +09:00
rustc_passes Auto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebank 2022-08-05 09:32:26 +00:00
rustc_plugin_impl remove currently unused deps 2022-06-13 22:20:51 +03:00
rustc_privacy Remove DefId from AssocItemContainer. 2022-08-01 21:38:45 +02:00
rustc_query_impl Use LocalDefId for closures more 2022-07-30 15:59:17 -05:00
rustc_query_system Remove useless closure. 2022-07-29 22:11:23 +02:00
rustc_resolve Add docs to generics_def_id_map 2022-08-04 11:27:03 -03:00
rustc_save_analysis Remove DefId from AssocItemContainer. 2022-08-01 21:38:45 +02:00
rustc_serialize Upgrade indexmap and thorin-dwp to use hashbrown 0.12 2022-07-17 07:05:58 -07:00
rustc_session Rollup merge of #99620 - hudson-ayers:fix-location-detail, r=davidtwco 2022-07-31 23:39:40 +02:00
rustc_smir Rustfmt 2022-06-02 10:29:00 +00:00
rustc_span Auto merge of #92268 - jswrenn:transmute, r=oli-obk 2022-08-02 21:17:31 +00:00
rustc_symbol_mangling Auto merge of #95548 - rcvalle:rust-cfi-2, r=nagisa 2022-07-24 01:22:36 +00:00
rustc_target Rollup merge of #98771 - Thog:rust-lld-apple-target, r=petrochenkov 2022-08-03 22:29:25 +02:00
rustc_trait_selection Rollup merge of #100095 - jackh726:early-binder, r=lcnr 2022-08-04 22:25:04 +02:00
rustc_traits Rollup merge of #100095 - jackh726:early-binder, r=lcnr 2022-08-04 22:25:04 +02:00
rustc_transmute safe transmute: fix broken intradoc link 2022-08-02 14:44:23 +00:00
rustc_ty_utils Add bound_impl_subject and bound_return_ty 2022-08-03 01:02:46 -04:00
rustc_type_ir Inline DebruijnIndex methods 2022-07-22 17:00:49 +02:00
rustc_typeck Rollup merge of #100095 - jackh726:early-binder, r=lcnr 2022-08-04 22:25:04 +02:00