[INFO] cloning repository https://github.com/obs145628/strength-reduction [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/obs145628/strength-reduction" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fobs145628%2Fstrength-reduction", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fobs145628%2Fstrength-reduction'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 009d943f1f3417ebc12c8fadb2b272a1a2fc8a3e [INFO] linting obs145628/strength-reduction against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fobs145628%2Fstrength-reduction" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/obs145628/strength-reduction [INFO] finished tweaking git repo https://github.com/obs145628/strength-reduction [INFO] tweaked toml for git repo https://github.com/obs145628/strength-reduction written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/obs145628/strength-reduction on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/obs145628/strength-reduction already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] fb8ed68c2df544b5e9cda2d69ca72bd2be73905b78c62eb4f8e0b8f178b9871b [INFO] running `Command { std: "docker" "start" "-a" "fb8ed68c2df544b5e9cda2d69ca72bd2be73905b78c62eb4f8e0b8f178b9871b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fb8ed68c2df544b5e9cda2d69ca72bd2be73905b78c62eb4f8e0b8f178b9871b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fb8ed68c2df544b5e9cda2d69ca72bd2be73905b78c62eb4f8e0b8f178b9871b", kill_on_drop: false }` [INFO] [stdout] fb8ed68c2df544b5e9cda2d69ca72bd2be73905b78c62eb4f8e0b8f178b9871b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 598a18182f3799f284583663fbe741d5dfb0727d5837005ed0e9d11c95dfdd8c [INFO] running `Command { std: "docker" "start" "-a" "598a18182f3799f284583663fbe741d5dfb0727d5837005ed0e9d11c95dfdd8c", kill_on_drop: false }` [INFO] [stderr] Checking strength-reduction v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `BasicBlockRef`, `InstructionRef`, and `ValueRef` [INFO] [stdout] --> src/argument.rs:2:36 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{ArgumentRef, BasicBlockRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValueRef` [INFO] [stdout] --> src/basicblock.rs:2:67 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{BasicBlockRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BasicBlockRef`, `FunctionRef`, `InstructionRef`, and `ValueRef` [INFO] [stdout] --> src/constant.rs:2:23 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{BasicBlockRef, ConstantRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/digraph.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | (0..self.v) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 55 - (0..self.v) [INFO] [stdout] 55 + 0..self.v [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/digraph_order.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | if (self.visit_unreachable) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 32 - if (self.visit_unreachable) { [INFO] [stdout] 32 + if self.visit_unreachable { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `InstructionRef` and `ValueRef` [INFO] [stdout] --> src/function.rs:2:64 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{ArgumentRef, BasicBlockRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValueRef` [INFO] [stdout] --> src/instruction.rs:2:54 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{BasicBlockRef, InstructionRef, ValueRef, ValueRefEnum}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/isa.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | if (self.name == "call") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - if (self.name == "call") { [INFO] [stdout] 19 + if self.name == "call" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BasicBlockRef`, `InstructionRef`, and `ValueRef` [INFO] [stdout] --> src/argument.rs:2:36 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{ArgumentRef, BasicBlockRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValueRef` [INFO] [stdout] --> src/basicblock.rs:2:67 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{BasicBlockRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BasicBlockRef`, `FunctionRef`, `InstructionRef`, and `ValueRef` [INFO] [stdout] --> src/constant.rs:2:23 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{BasicBlockRef, ConstantRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/digraph.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | (0..self.v) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 55 - (0..self.v) [INFO] [stdout] 55 + 0..self.v [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/digraph_order.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | if (self.visit_unreachable) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 32 - if (self.visit_unreachable) { [INFO] [stdout] 32 + if self.visit_unreachable { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `InstructionRef` and `ValueRef` [INFO] [stdout] --> src/function.rs:2:64 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{ArgumentRef, BasicBlockRef, FunctionRef, InstructionRef, ValueRef}; [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValueRef` [INFO] [stdout] --> src/instruction.rs:2:54 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::valueref::{BasicBlockRef, InstructionRef, ValueRef, ValueRefEnum}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/isa.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | if (self.name == "call") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - if (self.name == "call") { [INFO] [stdout] 19 + if self.name == "call" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::checker` [INFO] [stdout] --> src/loader.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::checker; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fun` [INFO] [stdout] --> src/loader.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | let fun = self.act_fun.unwrap(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fun` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/loader.rs:286:9 [INFO] [stdout] | [INFO] [stdout] 286 | _ => unreachable!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/loader.rs:286:9 [INFO] [stdout] | [INFO] [stdout] 281 | ValueRefEnum::Ins(r) => "%".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] 282 | ValueRefEnum::BB(r) => "@".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] 283 | ValueRefEnum::Fun(r) => "@".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] 284 | ValueRefEnum::Const(r) => r.own(ctx).unwrap().const_int().to_string(), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 285 | ValueRefEnum::Arg(r) => "%".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] 286 | _ => unreachable!(), [INFO] [stdout] | ^ ...and 1 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `arg_pos` and `fun` are never read [INFO] [stdout] --> src/argument.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Argument { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 5 | val: Value, [INFO] [stdout] 6 | arg_pos: usize, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 7 | fun: FunctionRef, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `arg_pos` and `fun` are never used [INFO] [stdout] --> src/argument.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Argument { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 23 | pub fn arg_pos(&self) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn fun(&self) -> FunctionRef { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `ins_mut`, `insert_begin`, `insert_before`, `insert_after`, `erase`, and `ins_idx` are never used [INFO] [stdout] --> src/basicblock.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl BasicBlock { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn ins_mut(&mut self) -> &mut [InstructionRef] { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn insert_begin(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn insert_before(&mut self, new_ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn insert_after(&mut self, new_ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn erase(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | fn ins_idx(&self, ins: InstructionRef) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/context.rs:160:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Context { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 160 | pub fn get_data_constant_mut(&mut self, r: ConstantRef) -> Option<&mut Constant> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 195 | pub fn erase_ins(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn ins_detach(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn ins_insert_before(&mut self, ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | pub fn ins_insert_after(&mut self, ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 274 | pub fn erase_bb(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 279 | pub fn bb_detach(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 301 | pub fn bb_insert_before(&mut self, bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 312 | pub fn bb_insert_after(&mut self, bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 332 | fn erase_arg(&mut self, arg: ArgumentRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 351 | pub fn erase_fun(&mut self, fun: FunctionRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 356 | pub fn fun_get_arg_mut(&mut self, fun: FunctionRef, idx: usize) -> &mut Argument { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 377 | pub fn erase_const(&mut self, c: ConstantRef) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `e` and `del_edge` are never used [INFO] [stdout] --> src/digraph.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Digraph { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn e(&self) -> usize { [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn del_edge(&mut self, u: usize, v: usize) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fun` is never read [INFO] [stdout] --> src/dom_tree.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct DomTree { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 8 | fun: FunctionRef, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `idom` and `dom` are never used [INFO] [stdout] --> src/dom_tree.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl DomTree { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn idom(&self, bb: BasicBlockRef) -> BasicBlockRef { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn dom(&self, bb: BasicBlockRef) -> Vec { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `bbs_mut`, `insert_begin`, `insert_before`, `insert_after`, `erase`, and `bb_idx` are never used [INFO] [stdout] --> src/function.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Function { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn bbs_mut(&mut self) -> &mut [BasicBlockRef] { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn insert_begin(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn insert_before(&mut self, new_bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | pub fn insert_after(&mut self, new_bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | pub fn erase(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn bb_idx(&self, bb: BasicBlockRef) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/isa.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl InsInfos { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 10 | pub fn name(&self) -> &'static str { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `users`, `users_mut`, and `set_op` are never used [INFO] [stdout] --> src/value.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Value { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn users(&self) -> &[ValueRef] { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn users_mut(&mut self) -> &mut [ValueRef] { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn set_op(&mut self, ctx: &mut Context, idx: usize, val: ValueRef) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `own_mut` is never used [INFO] [stdout] --> src/valueref.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 225 | impl ConstantRef { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 230 | pub fn own_mut<'a>(&self, ctx: &'a mut Context) -> Option<&'a mut Constant> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CFG` contains a capitalized acronym [INFO] [stdout] --> src/cfg.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct CFG { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cfg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fun` [INFO] [stdout] --> src/loader.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | let fun = self.act_fun.unwrap(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fun` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/checker.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | self.bbs = fun.bbs().iter().map(|x| *x).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `fun.bbs().iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/loader.rs:286:9 [INFO] [stdout] | [INFO] [stdout] 286 | _ => unreachable!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/loader.rs:286:9 [INFO] [stdout] | [INFO] [stdout] 281 | ValueRefEnum::Ins(r) => "%".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] 282 | ValueRefEnum::BB(r) => "@".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] 283 | ValueRefEnum::Fun(r) => "@".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] 284 | ValueRefEnum::Const(r) => r.own(ctx).unwrap().const_int().to_string(), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 285 | ValueRefEnum::Arg(r) => "%".to_string() + r.own(ctx).unwrap().val().name(), [INFO] [stdout] 286 | _ => unreachable!(), [INFO] [stdout] | ^ ...and 1 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/checker.rs:179:33 [INFO] [stdout] | [INFO] [stdout] 179 | let op_pos = op_pos.expect(&format!( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 180 | | "Phi predecesor value for {} is missing in {}", [INFO] [stdout] 181 | | parent_val.own(ctx).unwrap().name(), [INFO] [stdout] 182 | | bb.val().name() [INFO] [stdout] 183 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 179 ~ let op_pos = op_pos.unwrap_or_else(|| panic!("Phi predecesor value for {} is missing in {}", [INFO] [stdout] 180 + parent_val.own(ctx).unwrap().name(), [INFO] [stdout] 181 ~ bb.val().name())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | write!(os, "digraph G {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 78 - write!(os, "digraph G {{\n")?; [INFO] [stdout] 78 + writeln!(os, "digraph G {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | / write!( [INFO] [stdout] 82 | | os, [INFO] [stdout] 83 | | " {} [ label=\"{}\" ];\n", [INFO] [stdout] 84 | | u, self.labels_vertex_names[u] [INFO] [stdout] 85 | | )?; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 81 ~ writeln!( [INFO] [stdout] 82 | os, [INFO] [stdout] 83 ~ " {} [ label=\"{}\" ];", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | write!(os, " {} -> {}\n", u, v)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 89 - write!(os, " {} -> {}\n", u, v)?; [INFO] [stdout] 89 + writeln!(os, " {} -> {}", u, v)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | write!(os, "}}\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 92 - write!(os, "}}\n") [INFO] [stdout] 92 + writeln!(os, "}}") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DFS` contains a capitalized acronym [INFO] [stdout] --> src/digraph_order.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct DFS { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Dfs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `arg_pos` and `fun` are never read [INFO] [stdout] --> src/argument.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Argument { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 5 | val: Value, [INFO] [stdout] 6 | arg_pos: usize, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 7 | fun: FunctionRef, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `arg_pos` and `fun` are never used [INFO] [stdout] --> src/argument.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Argument { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 23 | pub fn arg_pos(&self) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn fun(&self) -> FunctionRef { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `ins_mut`, `insert_begin`, `insert_before`, `insert_after`, `erase`, and `ins_idx` are never used [INFO] [stdout] --> src/basicblock.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl BasicBlock { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn ins_mut(&mut self) -> &mut [InstructionRef] { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn insert_begin(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn insert_before(&mut self, new_ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn insert_after(&mut self, new_ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn erase(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | fn ins_idx(&self, ins: InstructionRef) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/context.rs:160:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Context { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 160 | pub fn get_data_constant_mut(&mut self, r: ConstantRef) -> Option<&mut Constant> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 195 | pub fn erase_ins(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn ins_detach(&mut self, ins: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn ins_insert_before(&mut self, ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | pub fn ins_insert_after(&mut self, ins: InstructionRef, pos: InstructionRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 274 | pub fn erase_bb(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 279 | pub fn bb_detach(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 301 | pub fn bb_insert_before(&mut self, bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 312 | pub fn bb_insert_after(&mut self, bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 332 | fn erase_arg(&mut self, arg: ArgumentRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 351 | pub fn erase_fun(&mut self, fun: FunctionRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 377 | pub fn erase_const(&mut self, c: ConstantRef) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `e` and `del_edge` are never used [INFO] [stdout] --> src/digraph.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Digraph { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn e(&self) -> usize { [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn del_edge(&mut self, u: usize, v: usize) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fun` is never read [INFO] [stdout] --> src/dom_tree.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct DomTree { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 8 | fun: FunctionRef, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `idom` and `dom` are never used [INFO] [stdout] --> src/dom_tree.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl DomTree { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn idom(&self, bb: BasicBlockRef) -> BasicBlockRef { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn dom(&self, bb: BasicBlockRef) -> Vec { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `bbs_mut`, `insert_begin`, `insert_before`, `insert_after`, `erase`, and `bb_idx` are never used [INFO] [stdout] --> src/function.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Function { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn bbs_mut(&mut self) -> &mut [BasicBlockRef] { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn insert_begin(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn insert_before(&mut self, new_bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | pub fn insert_after(&mut self, new_bb: BasicBlockRef, pos: BasicBlockRef) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | pub fn erase(&mut self, bb: BasicBlockRef) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn bb_idx(&self, bb: BasicBlockRef) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/isa.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl InsInfos { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 10 | pub fn name(&self) -> &'static str { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `users`, `users_mut`, and `set_op` are never used [INFO] [stdout] --> src/value.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Value { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn users(&self) -> &[ValueRef] { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn users_mut(&mut self) -> &mut [ValueRef] { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn set_op(&mut self, ctx: &mut Context, idx: usize, val: ValueRef) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `own_mut` is never used [INFO] [stdout] --> src/valueref.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 225 | impl ConstantRef { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 230 | pub fn own_mut<'a>(&self, ctx: &'a mut Context) -> Option<&'a mut Constant> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CFG` contains a capitalized acronym [INFO] [stdout] --> src/cfg.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct CFG { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cfg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/gop.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | if s.is_empty() || s.chars().next().unwrap() != '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/gop.rs:106:29 [INFO] [stdout] | [INFO] [stdout] 106 | if !s.is_empty() && s.chars().next().unwrap() == '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:163:13 [INFO] [stdout] | [INFO] [stdout] 163 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 163 - write!(f, "\n")?; [INFO] [stdout] 163 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | write!(f, "{}:\n", label)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 165 - write!(f, "{}:\n", label)?; [INFO] [stdout] 165 + writeln!(f, "{}:", label)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | write!(f, " ; {}\n", comm)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 170 - write!(f, " ; {}\n", comm)?; [INFO] [stdout] 170 + writeln!(f, " ; {}", comm)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | write!(f, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 182 - write!(f, "\n") [INFO] [stdout] 182 + writeln!(f) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/gop.rs:214:16 [INFO] [stdout] | [INFO] [stdout] 214 | if line.chars().next().unwrap() == ';' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `line.starts_with(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/gop.rs:219:16 [INFO] [stdout] | [INFO] [stdout] 219 | if line.chars().last().unwrap() == ':' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `line.ends_with(':')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | write!(f, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 250 - write!(f, "\n") [INFO] [stdout] 250 + writeln!(f) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/checker.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | self.bbs = fun.bbs().iter().map(|x| *x).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `fun.bbs().iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/instruction.rs:48:25 [INFO] [stdout] | [INFO] [stdout] 48 | .filter(|x| match x.to_enum() { [INFO] [stdout] | _________________________^ [INFO] [stdout] 49 | | ValueRefEnum::BB(_) => true, [INFO] [stdout] 50 | | _ => false, [INFO] [stdout] 51 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 48 - .filter(|x| match x.to_enum() { [INFO] [stdout] 49 - ValueRefEnum::BB(_) => true, [INFO] [stdout] 50 - _ => false, [INFO] [stdout] 51 - }) [INFO] [stdout] 48 + .filter(|x| matches!(x.to_enum(), ValueRefEnum::BB(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/isa.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | &self.name [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/isa.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | return args[1].chars().next().unwrap() == '%'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - return args[1].chars().next().unwrap() == '%'; [INFO] [stdout] 27 + args[1].chars().next().unwrap() == '%' [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/isa.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | return args[1].chars().next().unwrap() == '%'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `args[1].starts_with('%')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ISA` contains a capitalized acronym [INFO] [stdout] --> src/isa.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct ISA { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Isa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/checker.rs:179:33 [INFO] [stdout] | [INFO] [stdout] 179 | let op_pos = op_pos.expect(&format!( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 180 | | "Phi predecesor value for {} is missing in {}", [INFO] [stdout] 181 | | parent_val.own(ctx).unwrap().name(), [INFO] [stdout] 182 | | bb.val().name() [INFO] [stdout] 183 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 179 ~ let op_pos = op_pos.unwrap_or_else(|| panic!("Phi predecesor value for {} is missing in {}", [INFO] [stdout] 180 + parent_val.own(ctx).unwrap().name(), [INFO] [stdout] 181 ~ bb.val().name())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/loader.rs:82:32 [INFO] [stdout] | [INFO] [stdout] 82 | let fun = ctx.make_fun(&fun_name, args_count, false); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `fun_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/loader.rs:113:45 [INFO] [stdout] | [INFO] [stdout] 113 | .map(|arg| self.handle_arg(ctx, &arg)) [INFO] [stdout] | ^^^^ help: change this to: `arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/loader.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | if f == '-' || (f >= '0' && f <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&f)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/loader.rs:181:43 [INFO] [stdout] | [INFO] [stdout] 181 | *self.vars_map.get(&arg[1..]).expect(&format!( [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 182 | | "Use undefined register value {} at {:?}", [INFO] [stdout] 183 | | &arg[1..], [INFO] [stdout] 184 | | args [INFO] [stdout] 185 | | )) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 181 ~ *self.vars_map.get(&arg[1..]).unwrap_or_else(|| panic!("Use undefined register value {} at {:?}", [INFO] [stdout] 182 + &arg[1..], [INFO] [stdout] 183 + args)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `it` after checking its variant with `is_some` [INFO] [stdout] --> src/loader.rs:207:21 [INFO] [stdout] | [INFO] [stdout] 206 | if it.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = it` [INFO] [stdout] 207 | return *it.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/value.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | if !self.users.iter().find(|x| **x == v).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.users.iter().find(|x| **x == v).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | write!(os, "digraph G {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 78 - write!(os, "digraph G {{\n")?; [INFO] [stdout] 78 + writeln!(os, "digraph G {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | / write!( [INFO] [stdout] 82 | | os, [INFO] [stdout] 83 | | " {} [ label=\"{}\" ];\n", [INFO] [stdout] 84 | | u, self.labels_vertex_names[u] [INFO] [stdout] 85 | | )?; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 81 ~ writeln!( [INFO] [stdout] 82 | os, [INFO] [stdout] 83 ~ " {} [ label=\"{}\" ];", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/valueref.rs:281:20 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn to_enum(&self) -> ValueRefEnum { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | write!(os, " {} -> {}\n", u, v)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 89 - write!(os, " {} -> {}\n", u, v)?; [INFO] [stdout] 89 + writeln!(os, " {} -> {}", u, v)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/digraph.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | write!(os, "}}\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 92 - write!(os, "}}\n") [INFO] [stdout] 92 + writeln!(os, "}}") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:31:52 [INFO] [stdout] | [INFO] [stdout] 31 | loader::load_gop(&mut ctx, &gop::Module::parse(&fpath)); [INFO] [stdout] | ^^^^^^ help: change this to: `fpath` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DFS` contains a capitalized acronym [INFO] [stdout] --> src/digraph_order.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct DFS { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Dfs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/gop.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | if s.is_empty() || s.chars().next().unwrap() != '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/gop.rs:106:29 [INFO] [stdout] | [INFO] [stdout] 106 | if !s.is_empty() && s.chars().next().unwrap() == '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:163:13 [INFO] [stdout] | [INFO] [stdout] 163 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 163 - write!(f, "\n")?; [INFO] [stdout] 163 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | write!(f, "{}:\n", label)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 165 - write!(f, "{}:\n", label)?; [INFO] [stdout] 165 + writeln!(f, "{}:", label)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | write!(f, " ; {}\n", comm)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 170 - write!(f, " ; {}\n", comm)?; [INFO] [stdout] 170 + writeln!(f, " ; {}", comm)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | write!(f, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 182 - write!(f, "\n") [INFO] [stdout] 182 + writeln!(f) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/gop.rs:214:16 [INFO] [stdout] | [INFO] [stdout] 214 | if line.chars().next().unwrap() == ';' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `line.starts_with(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/gop.rs:219:16 [INFO] [stdout] | [INFO] [stdout] 219 | if line.chars().last().unwrap() == ':' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `line.ends_with(':')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/gop.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | write!(f, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 250 - write!(f, "\n") [INFO] [stdout] 250 + writeln!(f) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/instruction.rs:48:25 [INFO] [stdout] | [INFO] [stdout] 48 | .filter(|x| match x.to_enum() { [INFO] [stdout] | _________________________^ [INFO] [stdout] 49 | | ValueRefEnum::BB(_) => true, [INFO] [stdout] 50 | | _ => false, [INFO] [stdout] 51 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 48 - .filter(|x| match x.to_enum() { [INFO] [stdout] 49 - ValueRefEnum::BB(_) => true, [INFO] [stdout] 50 - _ => false, [INFO] [stdout] 51 - }) [INFO] [stdout] 48 + .filter(|x| matches!(x.to_enum(), ValueRefEnum::BB(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/isa.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | &self.name [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/isa.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | return args[1].chars().next().unwrap() == '%'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - return args[1].chars().next().unwrap() == '%'; [INFO] [stdout] 27 + args[1].chars().next().unwrap() == '%' [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/isa.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | return args[1].chars().next().unwrap() == '%'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `args[1].starts_with('%')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ISA` contains a capitalized acronym [INFO] [stdout] --> src/isa.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct ISA { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Isa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/loader.rs:82:32 [INFO] [stdout] | [INFO] [stdout] 82 | let fun = ctx.make_fun(&fun_name, args_count, false); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `fun_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/loader.rs:113:45 [INFO] [stdout] | [INFO] [stdout] 113 | .map(|arg| self.handle_arg(ctx, &arg)) [INFO] [stdout] | ^^^^ help: change this to: `arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/loader.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | if f == '-' || (f >= '0' && f <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&f)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/loader.rs:181:43 [INFO] [stdout] | [INFO] [stdout] 181 | *self.vars_map.get(&arg[1..]).expect(&format!( [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 182 | | "Use undefined register value {} at {:?}", [INFO] [stdout] 183 | | &arg[1..], [INFO] [stdout] 184 | | args [INFO] [stdout] 185 | | )) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 181 ~ *self.vars_map.get(&arg[1..]).unwrap_or_else(|| panic!("Use undefined register value {} at {:?}", [INFO] [stdout] 182 + &arg[1..], [INFO] [stdout] 183 + args)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `it` after checking its variant with `is_some` [INFO] [stdout] --> src/loader.rs:207:21 [INFO] [stdout] | [INFO] [stdout] 206 | if it.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = it` [INFO] [stdout] 207 | return *it.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/value.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | if !self.users.iter().find(|x| **x == v).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.users.iter().find(|x| **x == v).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/valueref.rs:281:20 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn to_enum(&self) -> ValueRefEnum { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:31:52 [INFO] [stdout] | [INFO] [stdout] 31 | loader::load_gop(&mut ctx, &gop::Module::parse(&fpath)); [INFO] [stdout] | ^^^^^^ help: change this to: `fpath` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.63s [INFO] running `Command { std: "docker" "inspect" "598a18182f3799f284583663fbe741d5dfb0727d5837005ed0e9d11c95dfdd8c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "598a18182f3799f284583663fbe741d5dfb0727d5837005ed0e9d11c95dfdd8c", kill_on_drop: false }` [INFO] [stdout] 598a18182f3799f284583663fbe741d5dfb0727d5837005ed0e9d11c95dfdd8c