From d254a5f422e7dfad5965cf5ec6495ae6aefbdd28 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Sat, 25 Nov 2023 15:14:10 -0500 Subject: [PATCH] Convert unused_tuple_struct_fields to warn-by-default --- compiler/rustc_lint_defs/src/builtin.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index a2243817df95f..cf6dab9809b94 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -611,7 +611,6 @@ declare_lint! { /// ### Example /// /// ```rust - /// #[warn(unused_tuple_struct_fields)] /// struct S(i32, i32, i32); /// let s = S(1, 2, 3); /// let _ = (s.0, s.2); @@ -626,7 +625,7 @@ declare_lint! { /// removing the unused field(s) or, to preserve the numbering of the /// remaining fields, change the unused field(s) to have unit type. pub UNUSED_TUPLE_STRUCT_FIELDS, - Allow, + Warn, "detects tuple struct fields that are never read" }