[INFO] cloning repository https://github.com/cp-20/pocc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cp-20/pocc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcp-20%2Fpocc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcp-20%2Fpocc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 93b514bccab197caa9aca5356e2afe99f4c5b464 [INFO] linting cp-20/pocc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcp-20%2Fpocc" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cp-20/pocc [INFO] finished tweaking git repo https://github.com/cp-20/pocc [INFO] tweaked toml for git repo https://github.com/cp-20/pocc written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cp-20/pocc 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/cp-20/pocc 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-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] f900d97353331c426b54200c43fd193bf5d61a12af3d74713458a8759b317a5f [INFO] running `Command { std: "docker" "start" "-a" "f900d97353331c426b54200c43fd193bf5d61a12af3d74713458a8759b317a5f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f900d97353331c426b54200c43fd193bf5d61a12af3d74713458a8759b317a5f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f900d97353331c426b54200c43fd193bf5d61a12af3d74713458a8759b317a5f", kill_on_drop: false }` [INFO] [stdout] f900d97353331c426b54200c43fd193bf5d61a12af3d74713458a8759b317a5f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] d2b919a25d043b4a41b0be0d2dfac0c754a1fcb2254848b4d8ae2321955c27ea [INFO] running `Command { std: "docker" "start" "-a" "d2b919a25d043b4a41b0be0d2dfac0c754a1fcb2254848b4d8ae2321955c27ea", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Checking pocc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `crate::ast::ASTNode` [INFO] [stdout] --> src/code_generator/error.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::ast::ASTNode; [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: `crate::ast::ASTNode` [INFO] [stdout] --> src/code_generator/error.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::ast::ASTNode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_void`, `deref`, and `size` are never used [INFO] [stdout] --> src/ast.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 40 | impl Type { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 41 | pub fn is_void(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn deref(&self) -> Option<&Type> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BitOr` is never constructed [INFO] [stdout] --> src/ir_generator/domain.rs:361:5 [INFO] [stdout] | [INFO] [stdout] 353 | pub enum IRBinaryOp { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 361 | BitOr, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `IRBinaryOp` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fmt_with_allocation` is never used [INFO] [stdout] --> src/ir_generator/visualizer.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 96 | impl IRBlock { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 97 | pub fn fmt_with_allocation(&self, allocation: &RegisterAllocationFunction) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fmt_with_allocation` is never used [INFO] [stdout] --> src/ir_generator/visualizer.rs:123:12 [INFO] [stdout] | [INFO] [stdout] 122 | impl IRNode { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 123 | pub fn fmt_with_allocation(&self, allocation: &RegisterAllocationFunction) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Pointer` is never constructed [INFO] [stdout] --> src/parser.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | enum DeclaratorType { [INFO] [stdout] | -------------- variant in this enum [INFO] [stdout] 7 | Direct, [INFO] [stdout] 8 | Pointer(Box), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DeclaratorType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `id`, `dword_name`, `word_name`, `is_caller_save`, and `is_callee_save` are never used [INFO] [stdout] --> src/physical_register.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl PhysicalRegister { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] 22 | pub fn id(&self) -> u32 { [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn dword_name(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn word_name(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn is_caller_save(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 143 | pub fn is_callee_save(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `insert_spill_code`, `insert_unspill_before_use`, `insert_spill_after_def`, `get_used_registers`, and `get_defined_registers` are never used [INFO] [stdout] --> src/register_allocator/allocator.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 16 | impl RegisterAllocator { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 73 | fn insert_spill_code(&self, function: &mut IRFunction, spilled_regs: &[VirtualRegister]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | fn insert_unspill_before_use( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | fn insert_spill_after_def( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 129 | fn get_used_registers(&self, node: &IRNode) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 155 | fn get_defined_registers(&self, node: &IRNode) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `allocate` are never used [INFO] [stdout] --> src/register_allocator/domain.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl RegisterAllocationFunction { [INFO] [stdout] | ------------------------------- associated items in this implementation [INFO] [stdout] 27 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn allocate(&mut self, virtual_reg: VirtualRegister, physical_reg: PhysicalRegister) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `offset` is never read [INFO] [stdout] --> src/symbol.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | LocalVariable { [INFO] [stdout] | ------------- field in this variant [INFO] [stdout] 10 | offset: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SymbolKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `offset` is never read [INFO] [stdout] --> src/symbol.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 13 | Parameter { [INFO] [stdout] | --------- field in this variant [INFO] [stdout] 14 | offset: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SymbolKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `params` is never read [INFO] [stdout] --> src/symbol.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 18 | Function { [INFO] [stdout] | -------- field in this variant [INFO] [stdout] 19 | params: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SymbolKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_global_scope` and `get_local_offset` are never used [INFO] [stdout] --> src/symbol.rs:63:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl SymbolTable { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 63 | pub fn is_global_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | pub fn get_local_offset(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `physical_dummy` is never used [INFO] [stdout] --> src/virtual_register.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl VirtualRegister { [INFO] [stdout] | -------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn physical_dummy(physical: &PhysicalRegister) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_void`, `deref`, and `size` are never used [INFO] [stdout] --> src/ast.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 40 | impl Type { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 41 | pub fn is_void(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn deref(&self) -> Option<&Type> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BitOr` is never constructed [INFO] [stdout] --> src/ir_generator/domain.rs:361:5 [INFO] [stdout] | [INFO] [stdout] 353 | pub enum IRBinaryOp { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 361 | BitOr, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `IRBinaryOp` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fmt_with_allocation` is never used [INFO] [stdout] --> src/ir_generator/visualizer.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl IRModule { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 22 | pub fn fmt_with_allocation(&self, allocation: &RegisterAllocation) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fmt_with_allocation` is never used [INFO] [stdout] --> src/ir_generator/visualizer.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 96 | impl IRBlock { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 97 | pub fn fmt_with_allocation(&self, allocation: &RegisterAllocationFunction) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fmt_with_allocation` is never used [INFO] [stdout] --> src/ir_generator/visualizer.rs:123:12 [INFO] [stdout] | [INFO] [stdout] 122 | impl IRNode { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 123 | pub fn fmt_with_allocation(&self, allocation: &RegisterAllocationFunction) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Pointer` is never constructed [INFO] [stdout] --> src/parser.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | enum DeclaratorType { [INFO] [stdout] | -------------- variant in this enum [INFO] [stdout] 7 | Direct, [INFO] [stdout] 8 | Pointer(Box), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DeclaratorType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `id`, `dword_name`, `word_name`, `is_caller_save`, and `is_callee_save` are never used [INFO] [stdout] --> src/physical_register.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl PhysicalRegister { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] 22 | pub fn id(&self) -> u32 { [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn dword_name(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn word_name(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn is_caller_save(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 143 | pub fn is_callee_save(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `insert_spill_code`, `insert_unspill_before_use`, `insert_spill_after_def`, `get_used_registers`, and `get_defined_registers` are never used [INFO] [stdout] --> src/register_allocator/allocator.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 16 | impl RegisterAllocator { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 73 | fn insert_spill_code(&self, function: &mut IRFunction, spilled_regs: &[VirtualRegister]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | fn insert_unspill_before_use( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | fn insert_spill_after_def( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 129 | fn get_used_registers(&self, node: &IRNode) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 155 | fn get_defined_registers(&self, node: &IRNode) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `allocate` are never used [INFO] [stdout] --> src/register_allocator/domain.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl RegisterAllocationFunction { [INFO] [stdout] | ------------------------------- associated items in this implementation [INFO] [stdout] 27 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn allocate(&mut self, virtual_reg: VirtualRegister, physical_reg: PhysicalRegister) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `offset` is never read [INFO] [stdout] --> src/symbol.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | LocalVariable { [INFO] [stdout] | ------------- field in this variant [INFO] [stdout] 10 | offset: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SymbolKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `offset` is never read [INFO] [stdout] --> src/symbol.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 13 | Parameter { [INFO] [stdout] | --------- field in this variant [INFO] [stdout] 14 | offset: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SymbolKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `params` is never read [INFO] [stdout] --> src/symbol.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 18 | Function { [INFO] [stdout] | -------- field in this variant [INFO] [stdout] 19 | params: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SymbolKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_global_scope` and `get_local_offset` are never used [INFO] [stdout] --> src/symbol.rs:63:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl SymbolTable { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 63 | pub fn is_global_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | pub fn get_local_offset(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `physical_dummy` is never used [INFO] [stdout] --> src/virtual_register.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl VirtualRegister { [INFO] [stdout] | -------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn physical_dummy(physical: &PhysicalRegister) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ir_optimizer/assign.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | } else if let IRNodeKind::FunctionCall { [INFO] [stdout] | ________________________^ [INFO] [stdout] 93 | | name, [INFO] [stdout] 94 | | arguments, [INFO] [stdout] 95 | | argument_regs, [INFO] [stdout] ... | [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 97 ~ } = &calc_node.kind [INFO] [stdout] 98 ~ && let Some(result) = result [INFO] [stdout] 99 | && !result.stored [INFO] [stdout] ... [INFO] [stdout] 110 | nodes_to_remove.push(index + 1); [INFO] [stdout] 111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ir_optimizer/folder.rs:61:24 [INFO] [stdout] | [INFO] [stdout] 61 | } else if let IRNodeKind::Branch { [INFO] [stdout] | ________________________^ [INFO] [stdout] 62 | | condition, [INFO] [stdout] 63 | | true_branch, [INFO] [stdout] 64 | | false_branch, [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ } = node.kind.clone() [INFO] [stdout] 66 ~ && let Some(cond_value) = condition.and_then(|c| c.get_immediate()) { [INFO] [stdout] 67 | if cond_value != 0 { [INFO] [stdout] ... [INFO] [stdout] 79 | } [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ir_optimizer/inline.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | / if let IRNodeKind::FunctionCall { [INFO] [stdout] 69 | | name, [INFO] [stdout] 70 | | arguments, [INFO] [stdout] 71 | | result, [INFO] [stdout] ... | [INFO] [stdout] 164 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 73 ~ } = node.kind [INFO] [stdout] 74 ~ && let IRVariable::Global(name) = name [INFO] [stdout] 75 | && *name == target.name [INFO] [stdout] ... [INFO] [stdout] 161 | break; [INFO] [stdout] 162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lifetime_analyzer/function.rs:214:5 [INFO] [stdout] | [INFO] [stdout] 214 | / if let Some(block) = function.body.get(addr.id) { [INFO] [stdout] 215 | | if let Some(instruction) = block.nodes.get(addr.offset) { [INFO] [stdout] ... | [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 214 ~ if let Some(block) = function.body.get(addr.id) [INFO] [stdout] 215 ~ && let Some(instruction) = block.nodes.get(addr.offset) { [INFO] [stdout] 216 | // Check if instruction is a function call [INFO] [stdout] ... [INFO] [stdout] 219 | || instruction.to_string().contains("invoke"); [INFO] [stdout] 220 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RAX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | RAX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rax` [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: name `RBX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | RBX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rbx` [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: name `RCX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RCX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Rcx` [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: name `RDX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | RDX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rdx` [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: name `RDI` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RDI, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rdi` [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: name `RSI` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | RSI, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Rsi` [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: name `RSP` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | RSP, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rsp` [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: name `RBP` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | RBP, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rbp` [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: the variable `spill_offset` is used as a loop counter [INFO] [stdout] --> src/register_allocator/allocator.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | for reg in spilled_regs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (spill_offset, reg) in spilled_regs.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/register_allocator/irc.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | cost *= 10.0f32.powi(max_depth as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `max_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/register_allocator/irc.rs:368:38 [INFO] [stdout] | [INFO] [stdout] 368 | .sort_by_key(|p_reg| !CALLEE_SAVE_REGISTERS.contains(p_reg) == prefer_callee_save); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `CALLEE_SAVE_REGISTERS.contains(p_reg) != prefer_callee_save` [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: unneeded `return` statement [INFO] [stdout] --> src/register_allocator/irc.rs:464:13 [INFO] [stdout] | [INFO] [stdout] 464 | return Ok((current_function, reg_alloc_func)); [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] 464 - return Ok((current_function, reg_alloc_func)); [INFO] [stdout] 464 + Ok((current_function, reg_alloc_func)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/register_allocator/irc.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | / ... return Err(RegisterAllocatorError::Other { [INFO] [stdout] 488 | | ... message: format!( [INFO] [stdout] 489 | | ... "Register spilling is required for {:?}, but the process cannot re-run liveness analysis with the current function ... [INFO] [stdout] 490 | | ... spilled_nodes [INFO] [stdout] 491 | | ... ), [INFO] [stdout] 492 | | ... }); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 487 ~ Err(RegisterAllocatorError::Other { [INFO] [stdout] 488 + message: format!( [INFO] [stdout] 489 + "Register spilling is required for {:?}, but the process cannot re-run liveness analysis with the current function signature. Aborting.", [INFO] [stdout] 490 + spilled_nodes [INFO] [stdout] 491 + ), [INFO] [stdout] 492 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/register_allocator/irc.rs:571:9 [INFO] [stdout] | [INFO] [stdout] 571 | / if let Some(last_node) = block.nodes.last() { [INFO] [stdout] 572 | | if let IRNodeKind::Branch { [INFO] [stdout] 573 | | true_branch, [INFO] [stdout] 574 | | false_branch, [INFO] [stdout] ... | [INFO] [stdout] 585 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 571 ~ if let Some(last_node) = block.nodes.last() [INFO] [stdout] 572 ~ && let IRNodeKind::Branch { [INFO] [stdout] 573 | true_branch, [INFO] [stdout] ... [INFO] [stdout] 583 | } [INFO] [stdout] 584 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/register_allocator/irc.rs:640:17 [INFO] [stdout] | [INFO] [stdout] 640 | / if let Some(cond) = condition { [INFO] [stdout] 641 | | regs.extend(cond.get_register()); [INFO] [stdout] 642 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/register_allocator/irc.rs:639:34 [INFO] [stdout] | [INFO] [stdout] 639 | IRNodeKind::Branch { condition, .. } => { [INFO] [stdout] | ^^^^^^^^^ replace this binding [INFO] [stdout] 640 | if let Some(cond) = condition { [INFO] [stdout] | ^^^^^^^^^^ with this pattern, prefixed by `condition: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/register_allocator/irc.rs:645:17 [INFO] [stdout] | [INFO] [stdout] 645 | / if let Some(val) = value { [INFO] [stdout] 646 | | regs.extend(val.get_register()); [INFO] [stdout] 647 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/register_allocator/irc.rs:644:34 [INFO] [stdout] | [INFO] [stdout] 644 | IRNodeKind::Return { value } => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 645 | if let Some(val) = value { [INFO] [stdout] | ^^^^^^^^^ with this pattern, prefixed by `value: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/register_allocator/irc.rs:706:9 [INFO] [stdout] | [INFO] [stdout] 706 | / match self { [INFO] [stdout] 707 | | IRNodeKind::Assign { variable, value } => { [INFO] [stdout] 708 | | if let IRVariable::Register(r) = variable { [INFO] [stdout] 709 | | if r == from { [INFO] [stdout] ... | [INFO] [stdout] 721 | | _ => {} [INFO] [stdout] 722 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 706 ~ if let IRNodeKind::Assign { variable, value } = self { [INFO] [stdout] 707 + if let IRVariable::Register(r) = variable { [INFO] [stdout] 708 + if r == from { [INFO] [stdout] 709 + *variable = IRVariable::Register(to.clone()); [INFO] [stdout] 710 + } [INFO] [stdout] 711 + } [INFO] [stdout] 712 + if let Some(r) = value.get_register() { [INFO] [stdout] 713 + if r == *from { [INFO] [stdout] 714 + // This part is complex, as IRValue is not mutable directly. [INFO] [stdout] 715 + // A real implementation needs to handle this. [INFO] [stdout] 716 + } [INFO] [stdout] 717 + } [INFO] [stdout] 718 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/register_allocator/irc.rs:708:17 [INFO] [stdout] | [INFO] [stdout] 708 | / if let IRVariable::Register(r) = variable { [INFO] [stdout] 709 | | if r == from { [INFO] [stdout] 710 | | *variable = IRVariable::Register(to.clone()); [INFO] [stdout] 711 | | } [INFO] [stdout] 712 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 708 ~ if let IRVariable::Register(r) = variable [INFO] [stdout] 709 ~ && r == from { [INFO] [stdout] 710 | *variable = IRVariable::Register(to.clone()); [INFO] [stdout] 711 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ir_optimizer/assign.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | } else if let IRNodeKind::FunctionCall { [INFO] [stdout] | ________________________^ [INFO] [stdout] 93 | | name, [INFO] [stdout] 94 | | arguments, [INFO] [stdout] 95 | | argument_regs, [INFO] [stdout] ... | [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 97 ~ } = &calc_node.kind [INFO] [stdout] 98 ~ && let Some(result) = result [INFO] [stdout] 99 | && !result.stored [INFO] [stdout] ... [INFO] [stdout] 110 | nodes_to_remove.push(index + 1); [INFO] [stdout] 111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/register_allocator/irc.rs:713:17 [INFO] [stdout] | [INFO] [stdout] 713 | / if let Some(r) = value.get_register() { [INFO] [stdout] 714 | | if r == *from { [INFO] [stdout] ... | [INFO] [stdout] 718 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 713 ~ if let Some(r) = value.get_register() [INFO] [stdout] 714 ~ && r == *from { [INFO] [stdout] 715 | // This part is complex, as IRValue is not mutable directly. [INFO] [stdout] 716 | // A real implementation needs to handle this. [INFO] [stdout] 717 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ir_optimizer/folder.rs:61:24 [INFO] [stdout] | [INFO] [stdout] 61 | } else if let IRNodeKind::Branch { [INFO] [stdout] | ________________________^ [INFO] [stdout] 62 | | condition, [INFO] [stdout] 63 | | true_branch, [INFO] [stdout] 64 | | false_branch, [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ } = node.kind.clone() [INFO] [stdout] 66 ~ && let Some(cond_value) = condition.and_then(|c| c.get_immediate()) { [INFO] [stdout] 67 | if cond_value != 0 { [INFO] [stdout] ... [INFO] [stdout] 79 | } [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ir_optimizer/inline.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | / if let IRNodeKind::FunctionCall { [INFO] [stdout] 69 | | name, [INFO] [stdout] 70 | | arguments, [INFO] [stdout] 71 | | result, [INFO] [stdout] ... | [INFO] [stdout] 164 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 73 ~ } = node.kind [INFO] [stdout] 74 ~ && let IRVariable::Global(name) = name [INFO] [stdout] 75 | && *name == target.name [INFO] [stdout] ... [INFO] [stdout] 161 | break; [INFO] [stdout] 162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lifetime_analyzer/function.rs:214:5 [INFO] [stdout] | [INFO] [stdout] 214 | / if let Some(block) = function.body.get(addr.id) { [INFO] [stdout] 215 | | if let Some(instruction) = block.nodes.get(addr.offset) { [INFO] [stdout] ... | [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 214 ~ if let Some(block) = function.body.get(addr.id) [INFO] [stdout] 215 ~ && let Some(instruction) = block.nodes.get(addr.offset) { [INFO] [stdout] 216 | // Check if instruction is a function call [INFO] [stdout] ... [INFO] [stdout] 219 | || instruction.to_string().contains("invoke"); [INFO] [stdout] 220 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RAX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | RAX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rax` [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: name `RBX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | RBX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rbx` [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: name `RCX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RCX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Rcx` [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: name `RDX` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | RDX, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rdx` [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: name `RDI` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RDI, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rdi` [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: name `RSI` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | RSI, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Rsi` [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: name `RSP` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | RSP, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rsp` [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: name `RBP` contains a capitalized acronym [INFO] [stdout] --> src/physical_register.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | RBP, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rbp` [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: the variable `spill_offset` is used as a loop counter [INFO] [stdout] --> src/register_allocator/allocator.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | for reg in spilled_regs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (spill_offset, reg) in spilled_regs.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/register_allocator/irc.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | cost *= 10.0f32.powi(max_depth as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `max_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/register_allocator/irc.rs:368:38 [INFO] [stdout] | [INFO] [stdout] 368 | .sort_by_key(|p_reg| !CALLEE_SAVE_REGISTERS.contains(p_reg) == prefer_callee_save); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `CALLEE_SAVE_REGISTERS.contains(p_reg) != prefer_callee_save` [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: unneeded `return` statement [INFO] [stdout] --> src/register_allocator/irc.rs:464:13 [INFO] [stdout] | [INFO] [stdout] 464 | return Ok((current_function, reg_alloc_func)); [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] 464 - return Ok((current_function, reg_alloc_func)); [INFO] [stdout] 464 + Ok((current_function, reg_alloc_func)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/register_allocator/irc.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | / ... return Err(RegisterAllocatorError::Other { [INFO] [stdout] 488 | | ... message: format!( [INFO] [stdout] 489 | | ... "Register spilling is required for {:?}, but the process cannot re-run liveness analysis with the current function ... [INFO] [stdout] 490 | | ... spilled_nodes [INFO] [stdout] 491 | | ... ), [INFO] [stdout] 492 | | ... }); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 487 ~ Err(RegisterAllocatorError::Other { [INFO] [stdout] 488 + message: format!( [INFO] [stdout] 489 + "Register spilling is required for {:?}, but the process cannot re-run liveness analysis with the current function signature. Aborting.", [INFO] [stdout] 490 + spilled_nodes [INFO] [stdout] 491 + ), [INFO] [stdout] 492 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/register_allocator/irc.rs:571:9 [INFO] [stdout] | [INFO] [stdout] 571 | / if let Some(last_node) = block.nodes.last() { [INFO] [stdout] 572 | | if let IRNodeKind::Branch { [INFO] [stdout] 573 | | true_branch, [INFO] [stdout] 574 | | false_branch, [INFO] [stdout] ... | [INFO] [stdout] 585 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 571 ~ if let Some(last_node) = block.nodes.last() [INFO] [stdout] 572 ~ && let IRNodeKind::Branch { [INFO] [stdout] 573 | true_branch, [INFO] [stdout] ... [INFO] [stdout] 583 | } [INFO] [stdout] 584 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/register_allocator/irc.rs:640:17 [INFO] [stdout] | [INFO] [stdout] 640 | / if let Some(cond) = condition { [INFO] [stdout] 641 | | regs.extend(cond.get_register()); [INFO] [stdout] 642 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/register_allocator/irc.rs:639:34 [INFO] [stdout] | [INFO] [stdout] 639 | IRNodeKind::Branch { condition, .. } => { [INFO] [stdout] | ^^^^^^^^^ replace this binding [INFO] [stdout] 640 | if let Some(cond) = condition { [INFO] [stdout] | ^^^^^^^^^^ with this pattern, prefixed by `condition: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/register_allocator/irc.rs:645:17 [INFO] [stdout] | [INFO] [stdout] 645 | / if let Some(val) = value { [INFO] [stdout] 646 | | regs.extend(val.get_register()); [INFO] [stdout] 647 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/register_allocator/irc.rs:644:34 [INFO] [stdout] | [INFO] [stdout] 644 | IRNodeKind::Return { value } => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 645 | if let Some(val) = value { [INFO] [stdout] | ^^^^^^^^^ with this pattern, prefixed by `value: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/register_allocator/irc.rs:706:9 [INFO] [stdout] | [INFO] [stdout] 706 | / match self { [INFO] [stdout] 707 | | IRNodeKind::Assign { variable, value } => { [INFO] [stdout] 708 | | if let IRVariable::Register(r) = variable { [INFO] [stdout] 709 | | if r == from { [INFO] [stdout] ... | [INFO] [stdout] 721 | | _ => {} [INFO] [stdout] 722 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 706 ~ if let IRNodeKind::Assign { variable, value } = self { [INFO] [stdout] 707 + if let IRVariable::Register(r) = variable { [INFO] [stdout] 708 + if r == from { [INFO] [stdout] 709 + *variable = IRVariable::Register(to.clone()); [INFO] [stdout] 710 + } [INFO] [stdout] 711 + } [INFO] [stdout] 712 + if let Some(r) = value.get_register() { [INFO] [stdout] 713 + if r == *from { [INFO] [stdout] 714 + // This part is complex, as IRValue is not mutable directly. [INFO] [stdout] 715 + // A real implementation needs to handle this. [INFO] [stdout] 716 + } [INFO] [stdout] 717 + } [INFO] [stdout] 718 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/register_allocator/irc.rs:708:17 [INFO] [stdout] | [INFO] [stdout] 708 | / if let IRVariable::Register(r) = variable { [INFO] [stdout] 709 | | if r == from { [INFO] [stdout] 710 | | *variable = IRVariable::Register(to.clone()); [INFO] [stdout] 711 | | } [INFO] [stdout] 712 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 708 ~ if let IRVariable::Register(r) = variable [INFO] [stdout] 709 ~ && r == from { [INFO] [stdout] 710 | *variable = IRVariable::Register(to.clone()); [INFO] [stdout] 711 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/register_allocator/irc.rs:713:17 [INFO] [stdout] | [INFO] [stdout] 713 | / if let Some(r) = value.get_register() { [INFO] [stdout] 714 | | if r == *from { [INFO] [stdout] ... | [INFO] [stdout] 718 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 713 ~ if let Some(r) = value.get_register() [INFO] [stdout] 714 ~ && r == *from { [INFO] [stdout] 715 | // This part is complex, as IRValue is not mutable directly. [INFO] [stdout] 716 | // A real implementation needs to handle this. [INFO] [stdout] 717 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.40s [INFO] running `Command { std: "docker" "inspect" "d2b919a25d043b4a41b0be0d2dfac0c754a1fcb2254848b4d8ae2321955c27ea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2b919a25d043b4a41b0be0d2dfac0c754a1fcb2254848b4d8ae2321955c27ea", kill_on_drop: false }` [INFO] [stdout] d2b919a25d043b4a41b0be0d2dfac0c754a1fcb2254848b4d8ae2321955c27ea