@@ -569,8 +569,13 @@ declare_lint! {
569569/// Dead code may signal a mistake or unfinished code. To silence the 
570570/// warning for individual items, prefix the name with an underscore such 
571571/// 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. 
574579pub  DEAD_CODE , 
575580    Warn , 
576581    "detect unused, unexported items" 
@@ -604,32 +609,6 @@ declare_lint! {
604609    "detects attributes that were not used by the compiler" 
605610} 
606611
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- 
633612declare_lint !  { 
634613    /// The `unreachable_code` lint detects unreachable code paths. 
635614/// 
@@ -3466,7 +3445,6 @@ declare_lint_pass! {
34663445        UNUSED_MACROS , 
34673446        UNUSED_MUT , 
34683447        UNUSED_QUALIFICATIONS , 
3469-         UNUSED_TUPLE_STRUCT_FIELDS , 
34703448        UNUSED_UNSAFE , 
34713449        UNUSED_VARIABLES , 
34723450        USELESS_DEPRECATED , 
0 commit comments