Narrow allow(dead_code) declarations (#4116)
* Narrow `allow(dead_code)` declarations Having module wide `allow(dead_code)` may hide some code that's really dead. In this commit I just narrowed the declarations to the specific enum variants that were not used (as it seems reasonable to keep them and their handling in all the matches, for future use). And the compiler found more dead code that I think we can remove safely in the short term. With this, the only files annotated with a module-wide `allow(dead_code)` are isle-generated files. * resurrect some functions as test helpers
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
//! This module defines s390x-specific machine instruction types.
|
||||
|
||||
// Some variants are not constructed, but we still want them as options in the future.
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::binemit::{Addend, CodeOffset, Reloc};
|
||||
use crate::ir::{types, ExternalName, Opcode, Type};
|
||||
use crate::machinst::*;
|
||||
@@ -2019,6 +2016,7 @@ impl Inst {
|
||||
/// Different forms of label references for different instruction formats.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum LabelUse {
|
||||
#[allow(dead_code)]
|
||||
/// RI-format branch. 16-bit signed offset. PC-relative, offset is imm << 1.
|
||||
BranchRI,
|
||||
/// RIL-format branch. 32-bit signed offset. PC-relative, offset is imm << 1.
|
||||
|
||||
Reference in New Issue
Block a user