about summary refs log tree commit diff
path: root/tests/codegen-units
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-05 04:51:55 +0000
committerbors <bors@rust-lang.org>2024-01-05 04:51:55 +0000
commit5113ed28ea1451a13eae3a05dca0dbabfd56f587 (patch)
treec4edb2a07b2023ac8e393e3c4ce3b30657d5dd05 /tests/codegen-units
parenta59a98024e3fe317e37e218392f5c34e932b2394 (diff)
parent26194a3ffaf14b86e78ddcd0f2f88c609624d14b (diff)
downloadrust-5113ed28ea1451a13eae3a05dca0dbabfd56f587.tar.gz
rust-5113ed28ea1451a13eae3a05dca0dbabfd56f587.zip
Auto merge of #118297 - shepmaster:warn-dead-tuple-fields, r=WaffleLapkin
Merge `unused_tuple_struct_fields` into `dead_code`

This implicitly upgrades the lint from `allow` to `warn` and places it into the `unused` lint group.

[Discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Moving.20.60unused_tuple_struct_fields.60.20from.20allow.20to.20warn)
Diffstat (limited to 'tests/codegen-units')
-rw-r--r--tests/codegen-units/item-collection/generic-drop-glue.rs4
-rw-r--r--tests/codegen-units/item-collection/transitive-drop-glue.rs10
-rw-r--r--tests/codegen-units/item-collection/unsizing.rs2
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/codegen-units/item-collection/generic-drop-glue.rs b/tests/codegen-units/item-collection/generic-drop-glue.rs
index 6df4ff7e58b..ca477d06610 100644
--- a/tests/codegen-units/item-collection/generic-drop-glue.rs
+++ b/tests/codegen-units/item-collection/generic-drop-glue.rs
@@ -34,9 +34,9 @@ enum EnumNoDrop<T1, T2> {
 }
 
 
-struct NonGenericNoDrop(#[allow(unused_tuple_struct_fields)] i32);
+struct NonGenericNoDrop(#[allow(dead_code)] i32);
 
-struct NonGenericWithDrop(#[allow(unused_tuple_struct_fields)] i32);
+struct NonGenericWithDrop(#[allow(dead_code)] i32);
 //~ MONO_ITEM fn std::ptr::drop_in_place::<NonGenericWithDrop> - shim(Some(NonGenericWithDrop)) @@ generic_drop_glue-cgu.0[Internal]
 
 impl Drop for NonGenericWithDrop {
diff --git a/tests/codegen-units/item-collection/transitive-drop-glue.rs b/tests/codegen-units/item-collection/transitive-drop-glue.rs
index e286c800b7c..5f20637b40f 100644
--- a/tests/codegen-units/item-collection/transitive-drop-glue.rs
+++ b/tests/codegen-units/item-collection/transitive-drop-glue.rs
@@ -6,9 +6,9 @@
 #![feature(start)]
 
 //~ MONO_ITEM fn std::ptr::drop_in_place::<Root> - shim(Some(Root)) @@ transitive_drop_glue-cgu.0[Internal]
-struct Root(#[allow(unused_tuple_struct_fields)] Intermediate);
+struct Root(#[allow(dead_code)] Intermediate);
 //~ MONO_ITEM fn std::ptr::drop_in_place::<Intermediate> - shim(Some(Intermediate)) @@ transitive_drop_glue-cgu.0[Internal]
-struct Intermediate(#[allow(unused_tuple_struct_fields)] Leaf);
+struct Intermediate(#[allow(dead_code)] Leaf);
 //~ MONO_ITEM fn std::ptr::drop_in_place::<Leaf> - shim(Some(Leaf)) @@ transitive_drop_glue-cgu.0[Internal]
 struct Leaf;
 
@@ -17,9 +17,9 @@ impl Drop for Leaf {
     fn drop(&mut self) {}
 }
 
-struct RootGen<T>(#[allow(unused_tuple_struct_fields)] IntermediateGen<T>);
-struct IntermediateGen<T>(#[allow(unused_tuple_struct_fields)] LeafGen<T>);
-struct LeafGen<T>(#[allow(unused_tuple_struct_fields)] T);
+struct RootGen<T>(#[allow(dead_code)] IntermediateGen<T>);
+struct IntermediateGen<T>(#[allow(dead_code)] LeafGen<T>);
+struct LeafGen<T>(#[allow(dead_code)] T);
 
 impl<T> Drop for LeafGen<T> {
     fn drop(&mut self) {}
diff --git a/tests/codegen-units/item-collection/unsizing.rs b/tests/codegen-units/item-collection/unsizing.rs
index 111a7231209..34f52ce4e61 100644
--- a/tests/codegen-units/item-collection/unsizing.rs
+++ b/tests/codegen-units/item-collection/unsizing.rs
@@ -40,7 +40,7 @@ impl Trait for u32 {
 }
 
 #[derive(Clone, Copy)]
-struct Wrapper<T: ?Sized>(#[allow(unused_tuple_struct_fields)] *const T);
+struct Wrapper<T: ?Sized>(#[allow(dead_code)] *const T);
 
 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Wrapper<U>> for Wrapper<T> {}