Fix all dead-code warnings in cranelift-codegen-meta

This commit is contained in:
bjorn3
2021-06-21 12:06:24 +02:00
parent 59e18b7d1b
commit d8818c967e
10 changed files with 14 additions and 748 deletions

View File

@@ -70,18 +70,6 @@ impl fmt::Display for InstructionFormat {
}
impl InstructionFormat {
pub fn imm_by_name(&self, name: &'static str) -> &FormatField {
self.imm_fields
.iter()
.find(|&field| field.member == name)
.unwrap_or_else(|| {
panic!(
"unexpected immediate field named {} in instruction format {}",
name, self.name
)
})
}
/// Returns a tuple that uniquely identifies the structure.
pub fn structure(&self) -> FormatStructure {
FormatStructure {