summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-09-16 00:06:39 -0400
committerGitHub <noreply@github.com>2023-09-16 04:06:39 +0000
commite159971e03102090e29f3555975498f75cf02f2c (patch)
treedf2b57003e6812f985dc258e65a9eb7a8bcbd0a7
parentbb877e5b4fe81965af60a0d86daeb8ed477e8e87 (diff)
[For ruby_3_2] Fix unused_mut Rust warnings (#8435)
Fix unused_mut Rust warnings Rust version 1.71.0 and up issue these warnings. On GitHub CI, the warnings were previously seen in -DYJIT_FORCE_ENABLE runs.
-rw-r--r--yjit/src/asm/mod.rs4
-rw-r--r--yjit/src/core.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/yjit/src/asm/mod.rs b/yjit/src/asm/mod.rs
index e3f0cbfee1..c5c65a9dc3 100644
--- a/yjit/src/asm/mod.rs
+++ b/yjit/src/asm/mod.rs
@@ -624,12 +624,12 @@ impl CodeBlock {
freed_pages.append(&mut virtual_pages);
if let Some(&first_page) = freed_pages.first() {
- let mut cb = CodegenGlobals::get_inline_cb();
+ let cb = CodegenGlobals::get_inline_cb();
cb.write_pos = cb.get_page_pos(first_page);
cb.dropped_bytes = false;
cb.clear_comments();
- let mut ocb = CodegenGlobals::get_outlined_cb().unwrap();
+ let ocb = CodegenGlobals::get_outlined_cb().unwrap();
ocb.write_pos = ocb.get_page_pos(first_page);
ocb.dropped_bytes = false;
ocb.clear_comments();
diff --git a/yjit/src/core.rs b/yjit/src/core.rs
index abe0797257..836410cb6c 100644
--- a/yjit/src/core.rs
+++ b/yjit/src/core.rs
@@ -1484,7 +1484,7 @@ fn gen_block_series_body(
// gen_direct_jump() can request a block to be placed immediately after by
// leaving a single target that has a `None` address.
- let mut last_target = match &mut last_branch.targets {
+ let last_target = match &mut last_branch.targets {
[Some(last_target), None] if last_target.address.is_none() => last_target,
_ => break
};