Merge pull request #3584 from bytecodealliance/pch/rust_1.57_warnings

cranelift codegen & filetests: silence new dead code warnings in rust 1.57
This commit is contained in:
Pat Hickey
2021-12-03 12:36:52 -08:00
committed by GitHub
3 changed files with 4 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ pub struct BlockLoweringOrder {
lowered_order: Vec<LoweredBlock>, lowered_order: Vec<LoweredBlock>,
/// Successors for all lowered blocks, in one serialized vector. Indexed by /// Successors for all lowered blocks, in one serialized vector. Indexed by
/// the ranges in `lowered_succ_ranges`. /// the ranges in `lowered_succ_ranges`.
#[allow(dead_code)]
lowered_succs: Vec<(Inst, LoweredBlock)>, lowered_succs: Vec<(Inst, LoweredBlock)>,
/// BlockIndex values for successors for all lowered blocks, in the same /// BlockIndex values for successors for all lowered blocks, in the same
/// order as `lowered_succs`. /// order as `lowered_succs`.
@@ -96,6 +97,7 @@ pub struct BlockLoweringOrder {
/// Mapping from CLIF BB to BlockIndex (index in lowered order). Note that /// Mapping from CLIF BB to BlockIndex (index in lowered order). Note that
/// some CLIF BBs may not be lowered; in particular, we skip unreachable /// some CLIF BBs may not be lowered; in particular, we skip unreachable
/// blocks. /// blocks.
#[allow(dead_code)]
orig_map: SecondaryMap<Block, Option<BlockIndex>>, orig_map: SecondaryMap<Block, Option<BlockIndex>>,
} }

View File

@@ -58,6 +58,7 @@ type HeapMemory = Vec<u8>;
pub struct RuntestContext { pub struct RuntestContext {
/// Store the heap memory alongside the context info so that we don't accidentally deallocate /// Store the heap memory alongside the context info so that we don't accidentally deallocate
/// it too early. /// it too early.
#[allow(dead_code)]
heaps: Vec<HeapMemory>, heaps: Vec<HeapMemory>,
/// This is the actual struct that gets passed into the `vmctx` argument of the tests. /// This is the actual struct that gets passed into the `vmctx` argument of the tests.

View File

@@ -111,6 +111,7 @@ mod windowsx64 {
version: u8, version: u8,
flags: u8, flags: u8,
prologue_size: u8, prologue_size: u8,
#[allow(dead_code)]
unwind_code_count_raw: u8, unwind_code_count_raw: u8,
frame_register: u8, frame_register: u8,
frame_register_offset: u8, frame_register_offset: u8,