Skip to content

Commit c0a2f46

Browse files
committed
Fix new dead_code instances in compiler's tests
1 parent 9d2f083 commit c0a2f46

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_errors/src/json/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct TestData {
1313
}
1414

1515
#[derive(Deserialize, Debug, PartialEq, Eq)]
16+
#[allow(dead_code, reason = "Fields are only used for equality comparisons")]
1617
struct SpanTestData {
1718
pub byte_start: u32,
1819
pub byte_end: u32,

compiler/rustc_thread_pool/tests/scoped_threadpool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crossbeam_utils::thread;
44
use rustc_thread_pool::ThreadPoolBuilder;
55

66
#[derive(PartialEq, Eq, Debug)]
7-
struct Local(i32);
7+
struct Local(#[allow(dead_code, reason = "Only used for equality comparisons")] i32);
88

99
scoped_tls::scoped_thread_local!(static LOCAL: Local);
1010

0 commit comments

Comments
 (0)