diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2022-04-29 18:20:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 18:20:23 -0400 |
commit | 5c843a1a6e24aeabb3497065a362caf7b3e2d3b1 (patch) | |
tree | 3933db10caabd1ac0f527f8a2e6e7c0d84f63611 /yjit/src/disasm.rs | |
parent | 7c039e423cb59c9e5d76df9f1dc1bf8b1a1b9a6b (diff) | |
download | ruby-5c843a1a6e24aeabb3497065a362caf7b3e2d3b1.tar.gz |
YJIT: Enable default rustc lints (warnings) (#5864)
`rustc` performs in depth dead code analysis and issues warning
even for things like unused struct fields and unconstructed enum
variants. This was annoying for us during the port but hopefully
they are less of an issue now.
This patch enables all the unused warnings we disabled and address
all the warnings we previously ignored. Generally, the approach I've
taken is to use `cfg!` instead of using the `cfg` attribute and
to delete code where it makes sense. I've put `#[allow(unused)]`
on things we intentionally keep around for printf style debugging
and on items that are too annoying to keep warning-free in all
build configs.
Diffstat (limited to 'yjit/src/disasm.rs')
-rw-r--r-- | yjit/src/disasm.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/yjit/src/disasm.rs b/yjit/src/disasm.rs index 97edc786bc..3136bfd03f 100644 --- a/yjit/src/disasm.rs +++ b/yjit/src/disasm.rs @@ -1,9 +1,6 @@ -use crate::asm::*; -use crate::codegen::*; use crate::core::*; use crate::cruby::*; use crate::yjit::yjit_enabled_p; -use std::fmt::Write; /// Primitive called in yjit.rb /// Produce a string representing the disassembly for an ISEQ @@ -43,7 +40,7 @@ fn disasm_iseq(iseq: IseqPtr) -> String { let mut block_list = get_iseq_block_list(iseq); // Get a list of codeblocks relevant to this iseq - let global_cb = CodegenGlobals::get_inline_cb(); + let global_cb = crate::codegen::CodegenGlobals::get_inline_cb(); // Sort the blocks by increasing start addresses block_list.sort_by(|a, b| { |