From 8587bacc252e95e533d319cc58b58ec11e5561ff Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Mon, 2 May 2022 23:05:01 +0900 Subject: [PATCH] YJIT: Remove redundant `extern crate` (#5869) Follow up https://github.com/ruby/ruby/commit/0514d81 Rust YJIT requires Rust 1.60.0 or later. So, `extern crate` looks unnecessary because it can use the following Rust 2018 edition feature: https://doc.rust-lang.org/stable/edition-guide/rust-2018/path-changes.html#no-more-extern-crate It passes the following tests. ```console % cd yjit % cargo test --features asm_comments,disasm (snip) test result: ok. 56 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` --- yjit/src/asm/x86_64/tests.rs | 1 - yjit/src/disasm.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/yjit/src/asm/x86_64/tests.rs b/yjit/src/asm/x86_64/tests.rs index 08f65b8821..c77d30e74d 100644 --- a/yjit/src/asm/x86_64/tests.rs +++ b/yjit/src/asm/x86_64/tests.rs @@ -404,7 +404,6 @@ fn test_xor() { #[cfg(feature = "disasm")] fn basic_capstone_usage() -> std::result::Result<(), capstone::Error> { // Test drive Capstone with simple input - extern crate capstone; use capstone::prelude::*; let cs = Capstone::new() .x86() diff --git a/yjit/src/disasm.rs b/yjit/src/disasm.rs index 3136bfd03f..2082648c4a 100644 --- a/yjit/src/disasm.rs +++ b/yjit/src/disasm.rs @@ -66,7 +66,6 @@ fn disasm_iseq(iseq: IseqPtr) -> String { } // Initialize capstone - extern crate capstone; use capstone::prelude::*; let cs = Capstone::new() .x86()