@@ -569,8 +569,13 @@ declare_lint! {
569
569
/// Dead code may signal a mistake or unfinished code. To silence the
570
570
/// warning for individual items, prefix the name with an underscore such
571
571
/// as `_foo`. If it was intended to expose the item outside of the crate,
572
- /// consider adding a visibility modifier like `pub`. Otherwise consider
573
- /// removing the unused code.
572
+ /// consider adding a visibility modifier like `pub`.
573
+ ///
574
+ /// To preserve the numbering of tuple structs with unused fields,
575
+ /// change the unused fields to have unit type or use
576
+ /// `PhantomData`.
577
+ ///
578
+ /// Otherwise consider removing the unused code.
574
579
pub DEAD_CODE ,
575
580
Warn ,
576
581
"detect unused, unexported items"
@@ -604,32 +609,6 @@ declare_lint! {
604
609
"detects attributes that were not used by the compiler"
605
610
}
606
611
607
- declare_lint ! {
608
- /// The `unused_tuple_struct_fields` lint detects fields of tuple structs
609
- /// that are never read.
610
- ///
611
- /// ### Example
612
- ///
613
- /// ```rust
614
- /// #[warn(unused_tuple_struct_fields)]
615
- /// struct S(i32, i32, i32);
616
- /// let s = S(1, 2, 3);
617
- /// let _ = (s.0, s.2);
618
- /// ```
619
- ///
620
- /// {{produces}}
621
- ///
622
- /// ### Explanation
623
- ///
624
- /// Tuple struct fields that are never read anywhere may indicate a
625
- /// mistake or unfinished code. To silence this warning, consider
626
- /// removing the unused field(s) or, to preserve the numbering of the
627
- /// remaining fields, change the unused field(s) to have unit type.
628
- pub UNUSED_TUPLE_STRUCT_FIELDS ,
629
- Allow ,
630
- "detects tuple struct fields that are never read"
631
- }
632
-
633
612
declare_lint ! {
634
613
/// The `unreachable_code` lint detects unreachable code paths.
635
614
///
@@ -3466,7 +3445,6 @@ declare_lint_pass! {
3466
3445
UNUSED_MACROS ,
3467
3446
UNUSED_MUT ,
3468
3447
UNUSED_QUALIFICATIONS ,
3469
- UNUSED_TUPLE_STRUCT_FIELDS ,
3470
3448
UNUSED_UNSAFE ,
3471
3449
UNUSED_VARIABLES ,
3472
3450
USELESS_DEPRECATED ,
0 commit comments