Merge pull request #1866 from cfallin/remove-matches
Remove uses of `matches!()` macro, incompatible with Firefox build.
This commit is contained in:
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@@ -107,6 +107,12 @@ jobs:
|
||||
- run: cargo check --target wasm32-unknown-emscripten -p wasi-common
|
||||
- run: cargo check --target armv7-unknown-linux-gnueabihf -p wasi-common
|
||||
|
||||
# Check that codegen and wasm crates typecheck on 1.41.0; this is required
|
||||
# for Firefox.
|
||||
- run: rustup install 1.41.0
|
||||
- run: cargo +1.41.0 check -p cranelift-codegen
|
||||
- run: cargo +1.41.0 check -p cranelift-wasm
|
||||
|
||||
|
||||
fuzz_targets:
|
||||
name: Fuzz Targets
|
||||
|
||||
@@ -80,7 +80,10 @@ impl ValueConversion {
|
||||
|
||||
/// Is this a conversion to pointer?
|
||||
pub fn is_pointer(self) -> bool {
|
||||
matches!(self, Self::Pointer(_))
|
||||
match self {
|
||||
Self::Pointer(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ impl InstructionData {
|
||||
arg: _,
|
||||
imm,
|
||||
} => {
|
||||
if matches!(opcode, Opcode::SdivImm | Opcode::SremImm) {
|
||||
if *opcode == Opcode::SdivImm || *opcode == Opcode::SremImm {
|
||||
imm.sign_extend_from_width(bit_width);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user