Skip to content

Commit c5382ad

Browse files
committed
Simplify match statement since variable arch that is predictable
1 parent 8ad78cb commit c5382ad

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/rustc_target/src/asm/loongarch.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ impl LoongArchInlineAsmRegClass {
3333

3434
pub fn supported_types(
3535
self,
36-
arch: InlineAsmArch,
36+
_arch: InlineAsmArch,
3737
) -> &'static [(InlineAsmType, Option<Symbol>)] {
38-
match (self, arch) {
39-
(Self::reg, InlineAsmArch::LoongArch64) => types! { _: I8, I16, I32, I64, F32, F64; },
40-
(Self::reg, _) => types! { _: I8, I16, I32, F32; },
41-
(Self::freg, _) => types! { _: F32, F64; },
38+
match self {
39+
Self::reg => types! { _: I8, I16, I32, I64, F32, F64; },
40+
Self::freg => types! { _: F32, F64; },
4241
}
4342
}
4443
}

0 commit comments

Comments
 (0)