diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2023-12-27 18:03:23 -0500 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2024-01-02 15:34:37 -0500 |
| commit | 5772818dc8f4c5a0fec1f5b35b33e85764dcd4f4 (patch) | |
| tree | d0df909f2e81b935d3afd06d19ac311d2a6ae665 /library/alloc/tests | |
| parent | 9fcf9c141068984ffcbb4cb00c83d891043761e8 (diff) | |
| download | rust-5772818dc8f4c5a0fec1f5b35b33e85764dcd4f4.tar.gz rust-5772818dc8f4c5a0fec1f5b35b33e85764dcd4f4.zip | |
Adjust library tests for unused_tuple_struct_fields -> dead_code
Diffstat (limited to 'library/alloc/tests')
| -rw-r--r-- | library/alloc/tests/autotraits.rs | 2 | ||||
| -rw-r--r-- | library/alloc/tests/vec.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/tests/autotraits.rs b/library/alloc/tests/autotraits.rs index b41e457614e..ba5e28f7293 100644 --- a/library/alloc/tests/autotraits.rs +++ b/library/alloc/tests/autotraits.rs @@ -1,7 +1,7 @@ fn require_sync<T: Sync>(_: T) {} fn require_send_sync<T: Send + Sync>(_: T) {} -struct NotSend(*const ()); +struct NotSend(#[allow(dead_code)] *const ()); unsafe impl Sync for NotSend {} #[test] diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 364dc920187..9ec6f6ae1ac 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -547,7 +547,7 @@ fn test_cmp() { #[test] fn test_vec_truncate_drop() { static mut DROPS: u32 = 0; - struct Elem(i32); + struct Elem(#[allow(dead_code)] i32); impl Drop for Elem { fn drop(&mut self) { unsafe { @@ -1089,7 +1089,7 @@ fn test_into_iter_advance_by() { #[test] fn test_into_iter_drop_allocator() { - struct ReferenceCountedAllocator<'a>(DropCounter<'a>); + struct ReferenceCountedAllocator<'a>(#[allow(dead_code)] DropCounter<'a>); unsafe impl Allocator for ReferenceCountedAllocator<'_> { fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, core::alloc::AllocError> { @@ -2407,7 +2407,7 @@ fn test_vec_dedup_multiple_ident() { #[test] fn test_vec_dedup_partialeq() { #[derive(Debug)] - struct Foo(i32, i32); + struct Foo(i32, #[allow(dead_code)] i32); impl PartialEq for Foo { fn eq(&self, other: &Foo) -> bool { |
