mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Fix Rust warnings (#13813)
This commit is contained in:
parent
0239809ab9
commit
e0841a795b
1 changed files with 1 additions and 4 deletions
|
@ -3147,7 +3147,7 @@ mod validation_tests {
|
||||||
fn one_block_no_terminator() {
|
fn one_block_no_terminator() {
|
||||||
let mut function = Function::new(std::ptr::null());
|
let mut function = Function::new(std::ptr::null());
|
||||||
let entry = function.entry_block;
|
let entry = function.entry_block;
|
||||||
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
||||||
assert_matches_err(function.validate(), ValidationError::BlockHasNoTerminator(format!("{:?}", function), entry));
|
assert_matches_err(function.validate(), ValidationError::BlockHasNoTerminator(format!("{:?}", function), entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3166,7 +3166,6 @@ mod validation_tests {
|
||||||
let mut function = Function::new(std::ptr::null());
|
let mut function = Function::new(std::ptr::null());
|
||||||
let entry = function.entry_block;
|
let entry = function.entry_block;
|
||||||
let side = function.new_block();
|
let side = function.new_block();
|
||||||
let exit = function.new_block();
|
|
||||||
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
||||||
function.push_insn(entry, Insn::IfTrue { val, target: BranchEdge { target: side, args: vec![val, val, val] } });
|
function.push_insn(entry, Insn::IfTrue { val, target: BranchEdge { target: side, args: vec![val, val, val] } });
|
||||||
assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(format!("{:?}", function), entry, 0, 3));
|
assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(format!("{:?}", function), entry, 0, 3));
|
||||||
|
@ -3177,7 +3176,6 @@ mod validation_tests {
|
||||||
let mut function = Function::new(std::ptr::null());
|
let mut function = Function::new(std::ptr::null());
|
||||||
let entry = function.entry_block;
|
let entry = function.entry_block;
|
||||||
let side = function.new_block();
|
let side = function.new_block();
|
||||||
let exit = function.new_block();
|
|
||||||
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
||||||
function.push_insn(entry, Insn::IfFalse { val, target: BranchEdge { target: side, args: vec![val, val, val] } });
|
function.push_insn(entry, Insn::IfFalse { val, target: BranchEdge { target: side, args: vec![val, val, val] } });
|
||||||
assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(format!("{:?}", function), entry, 0, 3));
|
assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(format!("{:?}", function), entry, 0, 3));
|
||||||
|
@ -3188,7 +3186,6 @@ mod validation_tests {
|
||||||
let mut function = Function::new(std::ptr::null());
|
let mut function = Function::new(std::ptr::null());
|
||||||
let entry = function.entry_block;
|
let entry = function.entry_block;
|
||||||
let side = function.new_block();
|
let side = function.new_block();
|
||||||
let exit = function.new_block();
|
|
||||||
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) });
|
||||||
function.push_insn(entry, Insn::Jump ( BranchEdge { target: side, args: vec![val, val, val] } ));
|
function.push_insn(entry, Insn::Jump ( BranchEdge { target: side, args: vec![val, val, val] } ));
|
||||||
assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(format!("{:?}", function), entry, 0, 3));
|
assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(format!("{:?}", function), entry, 0, 3));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue