Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 53eca9f

Browse files
committed
Adjust compiler tests for unused_tuple_struct_fields -> dead_code
1 parent 5772818 commit 53eca9f

File tree

166 files changed

+223
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+223
-209
lines changed

tests/codegen-units/item-collection/generic-drop-glue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ enum EnumNoDrop<T1, T2> {
3434
}
3535

3636

37-
struct NonGenericNoDrop(#[allow(unused_tuple_struct_fields)] i32);
37+
struct NonGenericNoDrop(#[allow(dead_code)] i32);
3838

39-
struct NonGenericWithDrop(#[allow(unused_tuple_struct_fields)] i32);
39+
struct NonGenericWithDrop(#[allow(dead_code)] i32);
4040
//~ MONO_ITEM fn std::ptr::drop_in_place::<NonGenericWithDrop> - shim(Some(NonGenericWithDrop)) @@ generic_drop_glue-cgu.0[Internal]
4141

4242
impl Drop for NonGenericWithDrop {

tests/codegen-units/item-collection/transitive-drop-glue.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#![feature(start)]
77

88
//~ MONO_ITEM fn std::ptr::drop_in_place::<Root> - shim(Some(Root)) @@ transitive_drop_glue-cgu.0[Internal]
9-
struct Root(#[allow(unused_tuple_struct_fields)] Intermediate);
9+
struct Root(#[allow(dead_code)] Intermediate);
1010
//~ MONO_ITEM fn std::ptr::drop_in_place::<Intermediate> - shim(Some(Intermediate)) @@ transitive_drop_glue-cgu.0[Internal]
11-
struct Intermediate(#[allow(unused_tuple_struct_fields)] Leaf);
11+
struct Intermediate(#[allow(dead_code)] Leaf);
1212
//~ MONO_ITEM fn std::ptr::drop_in_place::<Leaf> - shim(Some(Leaf)) @@ transitive_drop_glue-cgu.0[Internal]
1313
struct Leaf;
1414

@@ -17,9 +17,9 @@ impl Drop for Leaf {
1717
fn drop(&mut self) {}
1818
}
1919

20-
struct RootGen<T>(#[allow(unused_tuple_struct_fields)] IntermediateGen<T>);
21-
struct IntermediateGen<T>(#[allow(unused_tuple_struct_fields)] LeafGen<T>);
22-
struct LeafGen<T>(#[allow(unused_tuple_struct_fields)] T);
20+
struct RootGen<T>(#[allow(dead_code)] IntermediateGen<T>);
21+
struct IntermediateGen<T>(#[allow(dead_code)] LeafGen<T>);
22+
struct LeafGen<T>(#[allow(dead_code)] T);
2323

2424
impl<T> Drop for LeafGen<T> {
2525
fn drop(&mut self) {}

tests/codegen-units/item-collection/unsizing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Trait for u32 {
4040
}
4141

4242
#[derive(Clone, Copy)]
43-
struct Wrapper<T: ?Sized>(#[allow(unused_tuple_struct_fields)] *const T);
43+
struct Wrapper<T: ?Sized>(#[allow(dead_code)] *const T);
4444

4545
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Wrapper<U>> for Wrapper<T> {}
4646

tests/ui/allocator/no_std-alloc-error-handler-custom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
7474
extern "C" fn rust_eh_personality() {}
7575

7676
#[derive(Default, Debug)]
77-
struct Page(#[allow(unused_tuple_struct_fields)] [[u64; 32]; 16]);
77+
struct Page(#[allow(dead_code)] [[u64; 32]; 16]);
7878

7979
#[no_mangle]
8080
fn main(_argc: i32, _argv: *const *const u8) -> isize {

tests/ui/allocator/no_std-alloc-error-handler-default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
6161
extern "C" fn rust_eh_personality() {}
6262

6363
#[derive(Default, Debug)]
64-
struct Page(#[allow(unused_tuple_struct_fields)] [[u64; 32]; 16]);
64+
struct Page(#[allow(dead_code)] [[u64; 32]; 16]);
6565

6666
#[no_mangle]
6767
fn main(_argc: i32, _argv: *const *const u8) -> isize {

tests/ui/array-slice-vec/show-boxed-slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-pass
22

33
#[derive(Debug)]
4-
struct Foo(#[allow(unused_tuple_struct_fields)] Box<[u8]>);
4+
struct Foo(#[allow(dead_code)] Box<[u8]>);
55

66
pub fn main() {
77
println!("{:?}", Foo(Box::new([0, 1, 2])));

tests/ui/associated-consts/associated-const-type-parameters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl Foo for Def {
1717
const X: i32 = 97;
1818
}
1919

20-
struct Proxy<T>(#[allow(unused_tuple_struct_fields)] T);
20+
struct Proxy<T>(#[allow(dead_code)] T);
2121

2222
impl<T: Foo> Foo for Proxy<T> {
2323
const X: i32 = T::X;

tests/ui/associated-types/associated-types-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
trait Device {
66
type Resources;
77
}
8-
#[allow(unused_tuple_struct_fields)]
8+
#[allow(dead_code)]
99
struct Foo<D, R>(D, R);
1010

1111
trait Tr {

tests/ui/associated-types/associated-types-struct-field-numbered.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub trait UnifyKey {
99
fn dummy(&self) { }
1010
}
1111

12-
pub struct Node<K:UnifyKey>(#[allow(unused_tuple_struct_fields)] K, K::Value);
12+
pub struct Node<K:UnifyKey>(#[allow(dead_code)] K, K::Value);
1313

1414
fn foo<K : UnifyKey<Value=Option<V>>,V : Clone>(node: &Node<K>) -> Option<V> {
1515
node.1.clone()

tests/ui/associated-types/issue-25700-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
struct S<T: 'static>(#[allow(unused_tuple_struct_fields)] Option<&'static T>);
2+
struct S<T: 'static>(#[allow(dead_code)] Option<&'static T>);
33

44
trait Tr { type Out; }
55
impl<T> Tr for T { type Out = T; }

0 commit comments

Comments
 (0)