diff options
author | Jake Goulding <jake.goulding@gmail.com> | 2023-12-27 17:11:58 -0500 |
---|---|---|
committer | Jake Goulding <jake.goulding@gmail.com> | 2024-01-02 15:34:37 -0500 |
commit | 53eca9fa877460973f29aca24e6636a4175df469 (patch) | |
tree | b574f39908fef034b675c7e6da5be4a72ec6ab5f /tests/ui/drop | |
parent | 5772818dc8f4c5a0fec1f5b35b33e85764dcd4f4 (diff) |
Adjust compiler tests for unused_tuple_struct_fields -> dead_code
Diffstat (limited to 'tests/ui/drop')
-rw-r--r-- | tests/ui/drop/dropck-eyepatch-reorder.rs | 8 | ||||
-rw-r--r-- | tests/ui/drop/dropck-eyepatch.rs | 8 | ||||
-rw-r--r-- | tests/ui/drop/dynamic-drop.rs | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/ui/drop/dropck-eyepatch-reorder.rs b/tests/ui/drop/dropck-eyepatch-reorder.rs index 0d7af3d4f61..4a56c45aa92 100644 --- a/tests/ui/drop/dropck-eyepatch-reorder.rs +++ b/tests/ui/drop/dropck-eyepatch-reorder.rs @@ -12,10 +12,10 @@ trait Foo { fn foo(&self, _: &str); } struct Dt<A: Foo>(&'static str, A); struct Dr<'a, B:'a+Foo>(&'static str, &'a B); -struct Pt<A: Foo, B: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A, B); -struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B, &'b B); -struct St<A: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A); -struct Sr<'a, B:'a+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B); +struct Pt<A: Foo, B: Foo>(&'static str, #[allow(dead_code)] A, B); +struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(dead_code)] &'a B, &'b B); +struct St<A: Foo>(&'static str, #[allow(dead_code)] A); +struct Sr<'a, B:'a+Foo>(&'static str, #[allow(dead_code)] &'a B); impl<A: Foo> Drop for Dt<A> { fn drop(&mut self) { println!("drop {}", self.0); self.1.foo(self.0); } diff --git a/tests/ui/drop/dropck-eyepatch.rs b/tests/ui/drop/dropck-eyepatch.rs index 3c4840d5c7a..ff5a52b906b 100644 --- a/tests/ui/drop/dropck-eyepatch.rs +++ b/tests/ui/drop/dropck-eyepatch.rs @@ -35,10 +35,10 @@ trait Foo { fn foo(&self, _: &str); } struct Dt<A: Foo>(&'static str, A); struct Dr<'a, B:'a+Foo>(&'static str, &'a B); -struct Pt<A,B: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A, B); -struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B, &'b B); -struct St<A: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A); -struct Sr<'a, B:'a+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B); +struct Pt<A,B: Foo>(&'static str, #[allow(dead_code)] A, B); +struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(dead_code)] &'a B, &'b B); +struct St<A: Foo>(&'static str, #[allow(dead_code)] A); +struct Sr<'a, B:'a+Foo>(&'static str, #[allow(dead_code)] &'a B); impl<A: Foo> Drop for Dt<A> { fn drop(&mut self) { println!("drop {}", self.0); self.1.foo(self.0); } diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs index d35913ed641..4745cceb516 100644 --- a/tests/ui/drop/dynamic-drop.rs +++ b/tests/ui/drop/dynamic-drop.rs @@ -103,7 +103,7 @@ fn dynamic_drop(a: &Allocator, c: bool) { }; } -struct TwoPtrs<'a>(Ptr<'a>, #[allow(unused_tuple_struct_fields)] Ptr<'a>); +struct TwoPtrs<'a>(Ptr<'a>, #[allow(dead_code)] Ptr<'a>); fn struct_dynamic_drop(a: &Allocator, c0: bool, c1: bool, c: bool) { for i in 0..2 { let x; |