From cf03b2a513026c13f6c85f3e3b964141a25dbf25 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Fri, 3 Dec 2021 10:33:09 -0800 Subject: [PATCH] cranelift codegen & filetests: silence new dead code warnings in rust 1.57 --- cranelift/codegen/src/machinst/blockorder.rs | 2 ++ cranelift/filetests/src/runtest_environment.rs | 1 + cranelift/filetests/src/test_unwind.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/cranelift/codegen/src/machinst/blockorder.rs b/cranelift/codegen/src/machinst/blockorder.rs index 8c84be4f47..73c5ea2453 100644 --- a/cranelift/codegen/src/machinst/blockorder.rs +++ b/cranelift/codegen/src/machinst/blockorder.rs @@ -86,6 +86,7 @@ pub struct BlockLoweringOrder { lowered_order: Vec, /// Successors for all lowered blocks, in one serialized vector. Indexed by /// the ranges in `lowered_succ_ranges`. + #[allow(dead_code)] lowered_succs: Vec<(Inst, LoweredBlock)>, /// BlockIndex values for successors for all lowered blocks, in the same /// order as `lowered_succs`. @@ -96,6 +97,7 @@ pub struct BlockLoweringOrder { /// Mapping from CLIF BB to BlockIndex (index in lowered order). Note that /// some CLIF BBs may not be lowered; in particular, we skip unreachable /// blocks. + #[allow(dead_code)] orig_map: SecondaryMap>, } diff --git a/cranelift/filetests/src/runtest_environment.rs b/cranelift/filetests/src/runtest_environment.rs index b502643080..7d528d129b 100644 --- a/cranelift/filetests/src/runtest_environment.rs +++ b/cranelift/filetests/src/runtest_environment.rs @@ -58,6 +58,7 @@ type HeapMemory = Vec; pub struct RuntestContext { /// Store the heap memory alongside the context info so that we don't accidentally deallocate /// it too early. + #[allow(dead_code)] heaps: Vec, /// This is the actual struct that gets passed into the `vmctx` argument of the tests. diff --git a/cranelift/filetests/src/test_unwind.rs b/cranelift/filetests/src/test_unwind.rs index 3d22c4d3d9..ba53cfd8ee 100644 --- a/cranelift/filetests/src/test_unwind.rs +++ b/cranelift/filetests/src/test_unwind.rs @@ -111,6 +111,7 @@ mod windowsx64 { version: u8, flags: u8, prologue_size: u8, + #[allow(dead_code)] unwind_code_count_raw: u8, frame_register: u8, frame_register_offset: u8,