[INFO] cloning repository https://github.com/CarbonSmasher/dpc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CarbonSmasher/dpc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCarbonSmasher%2Fdpc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCarbonSmasher%2Fdpc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 046de5378f865068517f4aa193f0566ea0e0b331 [INFO] linting CarbonSmasher/dpc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCarbonSmasher%2Fdpc" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/CarbonSmasher/dpc [INFO] removed 0 missing tests [INFO] finished tweaking git repo https://github.com/CarbonSmasher/dpc [INFO] tweaked toml for git repo https://github.com/CarbonSmasher/dpc written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/CarbonSmasher/dpc 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/CarbonSmasher/dpc 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] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded include_dir v0.7.3 [INFO] [stderr] Downloaded pyo3-macros-backend v0.19.2 [INFO] [stderr] Downloaded pyo3-macros v0.19.2 [INFO] [stderr] Downloaded include_dir_macros v0.7.3 [INFO] [stderr] Downloaded intset v1.0.2 [INFO] [stderr] Downloaded color-print v0.3.5 [INFO] [stderr] Downloaded pyo3-build-config v0.19.2 [INFO] [stderr] Downloaded color-print-proc-macro v0.3.5 [INFO] [stderr] Downloaded anyhow v1.0.79 [INFO] [stderr] Downloaded pyo3-ffi v0.19.2 [INFO] [stderr] Downloaded pyo3 v0.19.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 82a4f2ca243550f08b7c416e83e2890b2e430c7d6fd4148166d7f5e5d890529b [INFO] running `Command { std: "docker" "start" "-a" "82a4f2ca243550f08b7c416e83e2890b2e430c7d6fd4148166d7f5e5d890529b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "82a4f2ca243550f08b7c416e83e2890b2e430c7d6fd4148166d7f5e5d890529b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82a4f2ca243550f08b7c416e83e2890b2e430c7d6fd4148166d7f5e5d890529b", kill_on_drop: false }` [INFO] [stdout] 82a4f2ca243550f08b7c416e83e2890b2e430c7d6fd4148166d7f5e5d890529b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 585a84ead99d7aecfd3cf38b9977a83e3456302f1544f36b3c8b93c8d5e2bc46 [INFO] running `Command { std: "docker" "start" "-a" "585a84ead99d7aecfd3cf38b9977a83e3456302f1544f36b3c8b93c8d5e2bc46", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.78 [INFO] [stderr] Compiling libc v0.2.152 [INFO] [stderr] Compiling serde v1.0.196 [INFO] [stderr] Checking anstyle-query v1.0.2 [INFO] [stderr] Compiling serde_json v1.0.112 [INFO] [stderr] Compiling anyhow v1.0.79 [INFO] [stderr] Checking anstyle-parse v0.2.3 [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling target-lexicon v0.12.13 [INFO] [stderr] Checking itoa v1.0.10 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Checking ryu v1.0.16 [INFO] [stderr] Checking intset v1.0.2 [INFO] [stderr] Compiling memchr v2.7.1 [INFO] [stderr] Compiling parking_lot_core v0.9.9 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Compiling indoc v1.0.9 [INFO] [stderr] Checking unindent v0.1.11 [INFO] [stderr] Checking itertools v0.11.0 [INFO] [stderr] Checking anstream v0.6.11 [INFO] [stderr] Checking clap_builder v4.4.18 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling pyo3-build-config v0.19.2 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling syn v2.0.48 [INFO] [stderr] Compiling include_dir_macros v0.7.3 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking include_dir v0.7.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling pyo3-ffi v0.19.2 [INFO] [stderr] Compiling pyo3 v0.19.2 [INFO] [stderr] Compiling serde_derive v1.0.196 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Compiling pyo3-macros-backend v0.19.2 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Compiling color-print-proc-macro v0.3.5 [INFO] [stderr] Checking clap v4.4.18 [INFO] [stderr] Checking color-print v0.3.5 [INFO] [stderr] Compiling pyo3-macros v0.19.2 [INFO] [stderr] Checking dpc v0.2.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: struct `EqFloat` is never constructed [INFO] [stdout] --> src/util/mod.rs:171:12 [INFO] [stdout] | [INFO] [stdout] 171 | pub struct EqFloat(pub f32); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `only_mut` is never used [INFO] [stdout] --> src/util/mod.rs:181:5 [INFO] [stdout] | [INFO] [stdout] 177 | pub trait Only { [INFO] [stdout] | ---- method in this trait [INFO] [stdout] ... [INFO] [stdout] 181 | fn only_mut(&mut self) -> Option<&mut Self::Item>; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/common/condition.rs:84:3 [INFO] [stdout] | [INFO] [stdout] 84 | / match self { [INFO] [stdout] 85 | | Self::Function(..) => true, [INFO] [stdout] 86 | | _ => false, [INFO] [stdout] 87 | | } [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] 84 - match self { [INFO] [stdout] 85 - Self::Function(..) => true, [INFO] [stdout] 86 - _ => false, [INFO] [stdout] 87 - } [INFO] [stdout] 84 + matches!(self, Self::Function(..)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/common/cost.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | let cost = self.get_cost() as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_cost()` [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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/common/cost.rs:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | cost / Self::MAX as f32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `Self::MAX` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [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/common/mc/modifier.rs:220:3 [INFO] [stdout] | [INFO] [stdout] 220 | / match self { [INFO] [stdout] 221 | | Self::Local(loc, ..) => { [INFO] [stdout] 222 | | for reg in loc.get_used_regs_mut() { [INFO] [stdout] 223 | | f(reg); [INFO] [stdout] ... | [INFO] [stdout] 226 | | _ => {} [INFO] [stdout] 227 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [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] 220 ~ if let Self::Local(loc, ..) = self { [INFO] [stdout] 221 ~ for reg in loc.get_used_regs_mut() { [INFO] [stdout] 222 ~ f(reg); [INFO] [stdout] 223 ~ } [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EqFloat` is never constructed [INFO] [stdout] --> src/util/mod.rs:171:12 [INFO] [stdout] | [INFO] [stdout] 171 | pub struct EqFloat(pub f32); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `only_mut` is never used [INFO] [stdout] --> src/util/mod.rs:181:5 [INFO] [stdout] | [INFO] [stdout] 177 | pub trait Only { [INFO] [stdout] | ---- method in this trait [INFO] [stdout] ... [INFO] [stdout] 181 | fn only_mut(&mut self) -> Option<&mut Self::Item>; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/common/condition.rs:84:3 [INFO] [stdout] | [INFO] [stdout] 84 | / match self { [INFO] [stdout] 85 | | Self::Function(..) => true, [INFO] [stdout] 86 | | _ => false, [INFO] [stdout] 87 | | } [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] 84 - match self { [INFO] [stdout] 85 - Self::Function(..) => true, [INFO] [stdout] 86 - _ => false, [INFO] [stdout] 87 - } [INFO] [stdout] 84 + matches!(self, Self::Function(..)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/common/cost.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | let cost = self.get_cost() as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_cost()` [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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/common/cost.rs:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | cost / Self::MAX as f32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `Self::MAX` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common/op.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | / if let Some(instr) = DoubleOperation::from_instr(instr) { [INFO] [stdout] 24 | | Some(Self::Double(instr)) [INFO] [stdout] 25 | | } else { [INFO] [stdout] 26 | | None [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____________^ help: try: `DoubleOperation::from_instr(instr).map(Self::Double)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/reg.rs:62:10 [INFO] [stdout] | [INFO] [stdout] 62 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/reg.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/common/ty.rs:403:25 [INFO] [stdout] | [INFO] [stdout] 403 | Self::Int(n) => Some(*n as i32), [INFO] [stdout] | ^^^^^^^^^ help: try: `(*n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [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/common/val.rs:82:3 [INFO] [stdout] | [INFO] [stdout] 82 | / match self { [INFO] [stdout] 83 | | Self::Mutable(val) => val.append_used_regs(regs), [INFO] [stdout] 84 | | _ => {} [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ help: try: `if let Self::Mutable(val) = self { val.append_used_regs(regs) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_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/common/mc/modifier.rs:220:3 [INFO] [stdout] | [INFO] [stdout] 220 | / match self { [INFO] [stdout] 221 | | Self::Local(loc, ..) => { [INFO] [stdout] 222 | | for reg in loc.get_used_regs_mut() { [INFO] [stdout] 223 | | f(reg); [INFO] [stdout] ... | [INFO] [stdout] 226 | | _ => {} [INFO] [stdout] 227 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [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] 220 ~ if let Self::Local(loc, ..) = self { [INFO] [stdout] 221 ~ for reg in loc.get_used_regs_mut() { [INFO] [stdout] 222 ~ f(reg); [INFO] [stdout] 223 ~ } [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/val.rs:128:10 [INFO] [stdout] | [INFO] [stdout] 128 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/val.rs:133:11 [INFO] [stdout] | [INFO] [stdout] 133 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/common/mod.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | fn get_fns<'this>(&'this self) -> &'this FxHashMap; [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 104 - fn get_fns<'this>(&'this self) -> &'this FxHashMap; [INFO] [stdout] 104 + fn get_fns(&self) -> &FxHashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/common/mod.rs:105:17 [INFO] [stdout] | [INFO] [stdout] 105 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 106 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 107 | ) -> &'this mut FxHashMap; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 105 ~ fn get_fns_mut( [INFO] [stdout] 106 ~ &mut self, [INFO] [stdout] 107 ~ ) -> &mut FxHashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/ir.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 31 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 31 + fn get_fns(&self) -> &FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/ir.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 36 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 37 | ) -> &'this mut FxHashMap { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 35 ~ fn get_fns_mut( [INFO] [stdout] 36 ~ &mut self, [INFO] [stdout] 37 ~ ) -> &mut FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common/op.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | / if let Some(instr) = DoubleOperation::from_instr(instr) { [INFO] [stdout] 24 | | Some(Self::Double(instr)) [INFO] [stdout] 25 | | } else { [INFO] [stdout] 26 | | None [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____________^ help: try: `DoubleOperation::from_instr(instr).map(Self::Double)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/lir.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 41 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 41 + fn get_fns(&self) -> &FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/lir.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 46 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 47 | ) -> &'this mut FxHashMap { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 45 ~ fn get_fns_mut( [INFO] [stdout] 46 ~ &mut self, [INFO] [stdout] 47 ~ ) -> &mut FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/reg.rs:62:10 [INFO] [stdout] | [INFO] [stdout] 62 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/reg.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [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/lir.rs:451:4 [INFO] [stdout] | [INFO] [stdout] 451 | / match modi { [INFO] [stdout] 452 | | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] 453 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 454 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] ... | [INFO] [stdout] 484 | | _ => {} [INFO] [stdout] 485 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 451 ~ if let Modifier::If { condition, .. } = modi { match condition.as_mut() { [INFO] [stdout] 452 ~ IfModCondition::Score(cond) => match cond { [INFO] [stdout] 453 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 454 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 455 ~ f(left); [INFO] [stdout] 456 ~ } [INFO] [stdout] 457 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 458 ~ f(right); [INFO] [stdout] 459 ~ } [INFO] [stdout] 460 ~ } [INFO] [stdout] 461 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 462 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 463 ~ f(score); [INFO] [stdout] 464 ~ } [INFO] [stdout] 465 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 466 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 467 ~ .. [INFO] [stdout] 468 ~ } = left [INFO] [stdout] 469 ~ { [INFO] [stdout] 470 ~ f(left); [INFO] [stdout] 471 ~ } [INFO] [stdout] 472 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 473 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 474 ~ .. [INFO] [stdout] 475 ~ } = right [INFO] [stdout] 476 ~ { [INFO] [stdout] 477 ~ f(right); [INFO] [stdout] 478 ~ } [INFO] [stdout] 479 ~ } [INFO] [stdout] 480 ~ }, [INFO] [stdout] 481 ~ _ => {} [INFO] [stdout] 482 ~ } } [INFO] [stdout] | [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/lir.rs:452:39 [INFO] [stdout] | [INFO] [stdout] 452 | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 453 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 454 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] 455 | | if let ScoreValue::Mutable(left) = left { [INFO] [stdout] ... | [INFO] [stdout] 482 | | _ => {} [INFO] [stdout] 483 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 452 ~ Modifier::If { condition, .. } => if let IfModCondition::Score(cond) = condition.as_mut() { match cond { [INFO] [stdout] 453 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 454 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 455 ~ f(left); [INFO] [stdout] 456 ~ } [INFO] [stdout] 457 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 458 ~ f(right); [INFO] [stdout] 459 ~ } [INFO] [stdout] 460 ~ } [INFO] [stdout] 461 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 462 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 463 ~ f(score); [INFO] [stdout] 464 ~ } [INFO] [stdout] 465 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 466 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 467 ~ .. [INFO] [stdout] 468 ~ } = left [INFO] [stdout] 469 ~ { [INFO] [stdout] 470 ~ f(left); [INFO] [stdout] 471 ~ } [INFO] [stdout] 472 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 473 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 474 ~ .. [INFO] [stdout] 475 ~ } = right [INFO] [stdout] 476 ~ { [INFO] [stdout] 477 ~ f(right); [INFO] [stdout] 478 ~ } [INFO] [stdout] 479 ~ } [INFO] [stdout] 480 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/lower/mir_to_lir/cond.rs:525:19 [INFO] [stdout] | [INFO] [stdout] 525 | pub fn to_if_mod(self) -> Modifier { [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/common/ty.rs:403:25 [INFO] [stdout] | [INFO] [stdout] 403 | Self::Int(n) => Some(*n as i32), [INFO] [stdout] | ^^^^^^^^^ help: try: `(*n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lower/mir_to_lir/mod.rs:207:7 [INFO] [stdout] | [INFO] [stdout] 207 | i.try_into().expect("This should fit"), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lower/mir_to_lir/mod.rs:223:7 [INFO] [stdout] | [INFO] [stdout] 223 | i.try_into().expect("This should fit"), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/lower/mir_to_lir/mod.rs:246:36 [INFO] [stdout] | [INFO] [stdout] 246 | instr.modifiers = prepend.chain(instr.modifiers.into_iter()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 246 - instr.modifiers = prepend.chain(instr.modifiers.into_iter()).collect(); [INFO] [stdout] 246 + instr.modifiers = prepend.chain(instr.modifiers).collect(); [INFO] [stdout] | [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/common/val.rs:82:3 [INFO] [stdout] | [INFO] [stdout] 82 | / match self { [INFO] [stdout] 83 | | Self::Mutable(val) => val.append_used_regs(regs), [INFO] [stdout] 84 | | _ => {} [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ help: try: `if let Self::Mutable(val) = self { val.append_used_regs(regs) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/val.rs:128:10 [INFO] [stdout] | [INFO] [stdout] 128 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/common/val.rs:133:11 [INFO] [stdout] | [INFO] [stdout] 133 | .get(*num as usize) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(*num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mir/instr_impls.rs:214:24 [INFO] [stdout] | [INFO] [stdout] 214 | pub fn get_bodies_mut<'a>(&'a mut self) -> Vec<&'a mut MIRBlock> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 214 - pub fn get_bodies_mut<'a>(&'a mut self) -> Vec<&'a mut MIRBlock> { [INFO] [stdout] 214 + pub fn get_bodies_mut(&mut self) -> Vec<&mut MIRBlock> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/mir/mod.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 56 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 56 + fn get_fns(&self) -> &FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/mir/mod.rs:60:17 [INFO] [stdout] | [INFO] [stdout] 60 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 61 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 62 | ) -> &'this mut FxHashMap { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 60 ~ fn get_fns_mut( [INFO] [stdout] 61 ~ &mut self, [INFO] [stdout] 62 ~ ) -> &mut FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/common/mod.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | fn get_fns<'this>(&'this self) -> &'this FxHashMap; [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 104 - fn get_fns<'this>(&'this self) -> &'this FxHashMap; [INFO] [stdout] 104 + fn get_fns(&self) -> &FxHashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/common/mod.rs:105:17 [INFO] [stdout] | [INFO] [stdout] 105 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 106 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 107 | ) -> &'this mut FxHashMap; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 105 ~ fn get_fns_mut( [INFO] [stdout] 106 ~ &mut self, [INFO] [stdout] 107 ~ ) -> &mut FxHashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/ir.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 31 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 31 + fn get_fns(&self) -> &FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/ir.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 36 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 37 | ) -> &'this mut FxHashMap { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 35 ~ fn get_fns_mut( [INFO] [stdout] 36 ~ &mut self, [INFO] [stdout] 37 ~ ) -> &mut FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/lir.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 41 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 41 + fn get_fns(&self) -> &FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/lir.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 46 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 47 | ) -> &'this mut FxHashMap { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 45 ~ fn get_fns_mut( [INFO] [stdout] 46 ~ &mut self, [INFO] [stdout] 47 ~ ) -> &mut FxHashMap { [INFO] [stdout] | [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/lir.rs:451:4 [INFO] [stdout] | [INFO] [stdout] 451 | / match modi { [INFO] [stdout] 452 | | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] 453 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 454 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] ... | [INFO] [stdout] 484 | | _ => {} [INFO] [stdout] 485 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 451 ~ if let Modifier::If { condition, .. } = modi { match condition.as_mut() { [INFO] [stdout] 452 ~ IfModCondition::Score(cond) => match cond { [INFO] [stdout] 453 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 454 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 455 ~ f(left); [INFO] [stdout] 456 ~ } [INFO] [stdout] 457 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 458 ~ f(right); [INFO] [stdout] 459 ~ } [INFO] [stdout] 460 ~ } [INFO] [stdout] 461 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 462 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 463 ~ f(score); [INFO] [stdout] 464 ~ } [INFO] [stdout] 465 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 466 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 467 ~ .. [INFO] [stdout] 468 ~ } = left [INFO] [stdout] 469 ~ { [INFO] [stdout] 470 ~ f(left); [INFO] [stdout] 471 ~ } [INFO] [stdout] 472 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 473 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 474 ~ .. [INFO] [stdout] 475 ~ } = right [INFO] [stdout] 476 ~ { [INFO] [stdout] 477 ~ f(right); [INFO] [stdout] 478 ~ } [INFO] [stdout] 479 ~ } [INFO] [stdout] 480 ~ }, [INFO] [stdout] 481 ~ _ => {} [INFO] [stdout] 482 ~ } } [INFO] [stdout] | [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/lir.rs:452:39 [INFO] [stdout] | [INFO] [stdout] 452 | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 453 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 454 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] 455 | | if let ScoreValue::Mutable(left) = left { [INFO] [stdout] ... | [INFO] [stdout] 482 | | _ => {} [INFO] [stdout] 483 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 452 ~ Modifier::If { condition, .. } => if let IfModCondition::Score(cond) = condition.as_mut() { match cond { [INFO] [stdout] 453 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 454 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 455 ~ f(left); [INFO] [stdout] 456 ~ } [INFO] [stdout] 457 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 458 ~ f(right); [INFO] [stdout] 459 ~ } [INFO] [stdout] 460 ~ } [INFO] [stdout] 461 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 462 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 463 ~ f(score); [INFO] [stdout] 464 ~ } [INFO] [stdout] 465 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 466 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 467 ~ .. [INFO] [stdout] 468 ~ } = left [INFO] [stdout] 469 ~ { [INFO] [stdout] 470 ~ f(left); [INFO] [stdout] 471 ~ } [INFO] [stdout] 472 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 473 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 474 ~ .. [INFO] [stdout] 475 ~ } = right [INFO] [stdout] 476 ~ { [INFO] [stdout] 477 ~ f(right); [INFO] [stdout] 478 ~ } [INFO] [stdout] 479 ~ } [INFO] [stdout] 480 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/lower/mir_to_lir/cond.rs:525:19 [INFO] [stdout] | [INFO] [stdout] 525 | pub fn to_if_mod(self) -> Modifier { [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: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lower/mir_to_lir/mod.rs:207:7 [INFO] [stdout] | [INFO] [stdout] 207 | i.try_into().expect("This should fit"), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lower/mir_to_lir/mod.rs:223:7 [INFO] [stdout] | [INFO] [stdout] 223 | i.try_into().expect("This should fit"), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/lower/mir_to_lir/mod.rs:246:36 [INFO] [stdout] | [INFO] [stdout] 246 | instr.modifiers = prepend.chain(instr.modifiers.into_iter()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 246 - instr.modifiers = prepend.chain(instr.modifiers.into_iter()).collect(); [INFO] [stdout] 246 + instr.modifiers = prepend.chain(instr.modifiers).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mir/instr_impls.rs:214:24 [INFO] [stdout] | [INFO] [stdout] 214 | pub fn get_bodies_mut<'a>(&'a mut self) -> Vec<&'a mut MIRBlock> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 214 - pub fn get_bodies_mut<'a>(&'a mut self) -> Vec<&'a mut MIRBlock> { [INFO] [stdout] 214 + pub fn get_bodies_mut(&mut self) -> Vec<&mut MIRBlock> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/mir/mod.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 56 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 56 + fn get_fns(&self) -> &FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'this [INFO] [stdout] --> src/mir/mod.rs:60:17 [INFO] [stdout] | [INFO] [stdout] 60 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 61 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 62 | ) -> &'this mut FxHashMap { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 60 ~ fn get_fns_mut( [INFO] [stdout] 61 ~ &mut self, [INFO] [stdout] 62 ~ ) -> &mut FxHashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/output/mod.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | let code = codegen_block(&cleaned_id, &func, &func.block, ccx)?; [INFO] [stdout] | ^^^^^ help: change this to: `func` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parse/lex.rs:151:6 [INFO] [stdout] | [INFO] [stdout] 151 | / if !is_whitespace(c) { [INFO] [stdout] 152 | | repeat = true; [INFO] [stdout] 153 | | tokens.push((tok, tok_start_pos.clone())); [INFO] [stdout] 154 | | tok_start_pos = pos.clone(); [INFO] [stdout] 155 | | tok = Token::None; [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 150 ~ Token::Whitespace [INFO] [stdout] 151 ~ if !is_whitespace(c) => { [INFO] [stdout] 152 | repeat = true; [INFO] [stdout] ... [INFO] [stdout] 155 | tok = Token::None; [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/parse/lex.rs:172:60 [INFO] [stdout] | [INFO] [stdout] 172 | tok = Token::Decimal(TryInto::::try_into(*num)?.try_into()?); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `i32` to `f64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 172 - tok = Token::Decimal(TryInto::::try_into(*num)?.try_into()?); [INFO] [stdout] 172 + tok = Token::Decimal(TryInto::::try_into(*num)?.into()?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parse/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | mod parse; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` 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/output/mod.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | let code = codegen_block(&cleaned_id, &func, &func.block, ccx)?; [INFO] [stdout] | ^^^^^ help: change this to: `func` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parse/lex.rs:151:6 [INFO] [stdout] | [INFO] [stdout] 151 | / if !is_whitespace(c) { [INFO] [stdout] 152 | | repeat = true; [INFO] [stdout] 153 | | tokens.push((tok, tok_start_pos.clone())); [INFO] [stdout] 154 | | tok_start_pos = pos.clone(); [INFO] [stdout] 155 | | tok = Token::None; [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 150 ~ Token::Whitespace [INFO] [stdout] 151 ~ if !is_whitespace(c) => { [INFO] [stdout] 152 | repeat = true; [INFO] [stdout] ... [INFO] [stdout] 155 | tok = Token::None; [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/parse/lex.rs:172:60 [INFO] [stdout] | [INFO] [stdout] 172 | tok = Token::Decimal(TryInto::::try_into(*num)?.try_into()?); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `i32` to `f64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 172 - tok = Token::Decimal(TryInto::::try_into(*num)?.try_into()?); [INFO] [stdout] 172 + tok = Token::Decimal(TryInto::::try_into(*num)?.into()?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parse/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | mod parse; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/analysis/ir.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | / if !right [INFO] [stdout] 86 | | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 87 | | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 84 ~ InstrKind::Swap { left, right } [INFO] [stdout] 85 | if !right [INFO] [stdout] 86 | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 87 | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] 88 ~ => { [INFO] [stdout] 89 | bail!("Incompatible types in instruction at {i}"); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/analysis/ir.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | / if *scale != 1.0 { [INFO] [stdout] 95 | | bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 96 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 93 ~ DataType::Score(..) [INFO] [stdout] 94 ~ if *scale != 1.0 => { [INFO] [stdout] 95 | bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 96 ~ } [INFO] [stdout] | [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/passes/analysis/ir.rs:92:38 [INFO] [stdout] | [INFO] [stdout] 92 | InstrKind::Get { value, scale } => match value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 93 | | DataType::Score(..) => { [INFO] [stdout] 94 | | if *scale != 1.0 { [INFO] [stdout] 95 | | bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] ... | [INFO] [stdout] 98 | | _ => {} [INFO] [stdout] 99 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ InstrKind::Get { value, scale } => if let DataType::Score(..) = value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] 93 ~ if *scale != 1.0 { [INFO] [stdout] 94 ~ bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 95 ~ } [INFO] [stdout] 96 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/passes/opt/constant/fold.rs:535:17 [INFO] [stdout] | [INFO] [stdout] 535 | fn to_contents(self) -> Option { [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] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:111:4 [INFO] [stdout] | [INFO] [stdout] 111 | / if let MutableValue::Reg(reg) = value { [INFO] [stdout] 112 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 113 | | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 114 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] ... | [INFO] [stdout] 120 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:110:23 [INFO] [stdout] | [INFO] [stdout] 110 | MIRInstrKind::Get { value, scale } => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 111 | if let MutableValue::Reg(reg) = 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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:102:6 [INFO] [stdout] | [INFO] [stdout] 102 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 103 | | *right = Value::Constant(val.clone()); [INFO] [stdout] 104 | | *run_again = true; [INFO] [stdout] 105 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 102 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:113:6 [INFO] [stdout] | [INFO] [stdout] 113 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 114 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] 115 | | let scaled = ((val as f64) * *scale) as i32; [INFO] [stdout] 116 | | *instr = MIRInstrKind::GetConst { value: scaled }; [INFO] [stdout] 117 | | } [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 113 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:216:4 [INFO] [stdout] | [INFO] [stdout] 216 | / if let Value::Mutable(MutableValue::Reg(reg)) = val { [INFO] [stdout] 217 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 218 | | match val { [INFO] [stdout] 219 | | ConstAnalyzerValue::Reset(..) => { [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:215:21 [INFO] [stdout] | [INFO] [stdout] 215 | Condition::Exists(val) => { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 216 | if let Value::Mutable(MutableValue::Reg(reg)) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:190:6 [INFO] [stdout] | [INFO] [stdout] 190 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 191 | | *l = Value::Constant(val.clone()); [INFO] [stdout] 192 | | *run_again = true; [INFO] [stdout] 193 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 190 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:198:6 [INFO] [stdout] | [INFO] [stdout] 198 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 199 | | *r = Value::Constant(val.clone()); [INFO] [stdout] 200 | | *run_again = true; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 198 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:208:6 [INFO] [stdout] | [INFO] [stdout] 208 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 209 | | *b = Value::Constant(val.clone()); [INFO] [stdout] 210 | | *run_again = true; [INFO] [stdout] 211 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 208 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: unneeded `return` statement [INFO] [stdout] --> src/passes/opt/dataflow/copy_elide.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | return; [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] 195 - *run_again_2.borrow_mut() = true; [INFO] [stdout] 196 - return; [INFO] [stdout] 195 + *run_again_2.borrow_mut() = true; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/passes/opt/dse.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | / if !instrs_to_remove.contains(&i) { [INFO] [stdout] 148 | | if instr.modifiers.is_empty() { [INFO] [stdout] 149 | | // If the candidate already exists, then that is a dead store that can be removed [INFO] [stdout] 150 | | if let Some(candidate) = elim_candidates.get(id) { [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [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] 147 ~ if !instrs_to_remove.contains(&i) [INFO] [stdout] 148 ~ && instr.modifiers.is_empty() { [INFO] [stdout] 149 | // If the candidate already exists, then that is a dead store that can be removed [INFO] [stdout] ... [INFO] [stdout] 153 | elim_candidates.insert(id.clone(), i); [INFO] [stdout] 154 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/passes/opt/func/inline.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | &cloned_funcs, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `cloned_funcs` [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 boolean expression can be simplified [INFO] [stdout] --> src/passes/opt/func/inline.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | if !(!is_root && block.contents.len() != 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_root || block.contents.len() == 1` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/passes/opt/func/inline.rs:138:3 [INFO] [stdout] | [INFO] [stdout] 138 | ®s, [INFO] [stdout] | ^^^^^ help: change this to: `regs` [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: useless conversion to the same type: `usize` [INFO] [stdout] --> src/passes/opt/func/inline.rs:179:38 [INFO] [stdout] | [INFO] [stdout] 179 | let reg = fmt_lowered_arg(func_id, i.try_into().expect("This should fit")); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/passes/opt/func/inline.rs:204:45 [INFO] [stdout] | [INFO] [stdout] 204 | if let Some(dest) = ret_destinations.get(*index as usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(*index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/passes/opt/modifiers/null.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | / if !matches!(modifier, Modifier::If { .. }) { [INFO] [stdout] 50 | | if !this_mod_ctx.iter().any(|x| { [INFO] [stdout] 51 | | let dep = x.clone().to_dep(); [INFO] [stdout] 52 | | instr_deps.contains(&dep) | mod_deps.contains(&dep) [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [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] 49 ~ if !matches!(modifier, Modifier::If { .. }) [INFO] [stdout] 50 ~ && !this_mod_ctx.iter().any(|x| { [INFO] [stdout] 51 | let dep = x.clone().to_dep(); [INFO] [stdout] ... [INFO] [stdout] 55 | dont_push_deps = true; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/passes/opt/modifiers/simplify.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | / *condition = Box::new(IfModCondition::Score(IfScoreCondition::Single { [INFO] [stdout] 149 | | left: score.clone(), [INFO] [stdout] 150 | | right: ScoreValue::Constant(left_val.clone()), [INFO] [stdout] 151 | | })); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] = note: `#[warn(clippy::replace_box)]` on by default [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 148 ~ **condition = IfModCondition::Score(IfScoreCondition::Single { [INFO] [stdout] 149 ~ left: score.clone(), [INFO] [stdout] 150 ~ right: ScoreValue::Constant(left_val.clone()), [INFO] [stdout] 151 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/passes/opt/modifiers/simplify.rs:164:4 [INFO] [stdout] | [INFO] [stdout] 164 | / *condition = Box::new(IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 165 | | score: score.clone(), [INFO] [stdout] 166 | | left: IfScoreRangeEnd::Infinite, [INFO] [stdout] 167 | | right: IfScoreRangeEnd::Fixed { [INFO] [stdout] ... | [INFO] [stdout] 170 | | }, [INFO] [stdout] 171 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 164 ~ **condition = IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 165 ~ score: score.clone(), [INFO] [stdout] 166 ~ left: IfScoreRangeEnd::Infinite, [INFO] [stdout] 167 ~ right: IfScoreRangeEnd::Fixed { [INFO] [stdout] 168 ~ value: ScoreValue::Constant(value.clone()), [INFO] [stdout] 169 ~ inclusive: !*inclusive, [INFO] [stdout] 170 ~ }, [INFO] [stdout] 171 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/passes/opt/modifiers/simplify.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | / *condition = Box::new(IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 184 | | score: score.clone(), [INFO] [stdout] 185 | | left: IfScoreRangeEnd::Fixed { [INFO] [stdout] 186 | | value: ScoreValue::Constant(value.clone()), [INFO] [stdout] ... | [INFO] [stdout] 189 | | right: IfScoreRangeEnd::Infinite, [INFO] [stdout] 190 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 183 ~ **condition = IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 184 ~ score: score.clone(), [INFO] [stdout] 185 ~ left: IfScoreRangeEnd::Fixed { [INFO] [stdout] 186 ~ value: ScoreValue::Constant(value.clone()), [INFO] [stdout] 187 ~ inclusive: !*inclusive, [INFO] [stdout] 188 ~ }, [INFO] [stdout] 189 ~ right: IfScoreRangeEnd::Infinite, [INFO] [stdout] 190 ~ }); [INFO] [stdout] | [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/passes/opt/multifold/assign.rs:76:3 [INFO] [stdout] | [INFO] [stdout] 76 | / match &instr.kind { [INFO] [stdout] 77 | | MIRInstrKind::Assign { [INFO] [stdout] 78 | | left: MutableValue::Reg(left), [INFO] [stdout] 79 | | right, [INFO] [stdout] ... | [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 76 ~ if let MIRInstrKind::Assign { [INFO] [stdout] 77 ~ left: MutableValue::Reg(left), [INFO] [stdout] 78 ~ right, [INFO] [stdout] 79 ~ } = &instr.kind { [INFO] [stdout] 80 ~ if let Some(fold) = overwrite_op.get_mut(left) { [INFO] [stdout] 81 ~ if !fold.finished { [INFO] [stdout] 82 ~ fold.right = Some(right.clone()); [INFO] [stdout] 83 ~ fold.end_pos = i; [INFO] [stdout] 84 ~ fold.finished = true; [INFO] [stdout] 85 ~ dont_create_new_overwrite_op = true; [INFO] [stdout] 86 ~ } [INFO] [stdout] 87 ~ } [INFO] [stdout] 88 + [INFO] [stdout] 89 ~ if let DeclareBinding::Value(Value::Mutable(MutableValue::Reg(right))) = right { [INFO] [stdout] 90 ~ if let Some(fold) = stack_peak.get_mut(right) { [INFO] [stdout] 91 ~ if &fold.original_reg == left { [INFO] [stdout] 92 ~ if !fold.finished { [INFO] [stdout] 93 ~ fold.end_pos = i; [INFO] [stdout] 94 ~ fold.finished = true; [INFO] [stdout] 95 ~ regs_to_keep.stack_peak = true; [INFO] [stdout] 96 ~ } [INFO] [stdout] 97 ~ } else { [INFO] [stdout] 98 ~ fold.finished = true; [INFO] [stdout] 99 ~ } [INFO] [stdout] 100 ~ } else { [INFO] [stdout] 101 ~ stack_peak.insert( [INFO] [stdout] 102 ~ left.clone(), [INFO] [stdout] 103 ~ StackPeak { [INFO] [stdout] 104 ~ finished: false, [INFO] [stdout] 105 ~ start_pos: i, [INFO] [stdout] 106 ~ end_pos: i, [INFO] [stdout] 107 ~ original_reg: right.clone(), [INFO] [stdout] 108 ~ op_poses: Vec::new(), [INFO] [stdout] 109 ~ ops: Vec::new(), [INFO] [stdout] 110 ~ }, [INFO] [stdout] 111 ~ ); [INFO] [stdout] 112 ~ regs_to_keep.stack_peak = true; [INFO] [stdout] 113 ~ } [INFO] [stdout] 114 ~ } [INFO] [stdout] 115 ~ } [INFO] [stdout] | [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/passes/opt/multifold/assign.rs:173:44 [INFO] [stdout] | [INFO] [stdout] 173 | MIRInstrKind::If { condition, body } => match body.contents.only().map(|x| &x.kind) { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 174 | | Some(MIRInstrKind::Assign { [INFO] [stdout] 175 | | left: MutableValue::Reg(left), [INFO] [stdout] 176 | | right: DeclareBinding::Value(Value::Constant(DataTypeContents::Score(right))), [INFO] [stdout] ... | [INFO] [stdout] 195 | | _ => {} [INFO] [stdout] 196 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 173 ~ MIRInstrKind::If { condition, body } => if let Some(MIRInstrKind::Assign { [INFO] [stdout] 174 ~ left: MutableValue::Reg(left), [INFO] [stdout] 175 ~ right: DeclareBinding::Value(Value::Constant(DataTypeContents::Score(right))), [INFO] [stdout] 176 ~ }) = body.contents.only().map(|x| &x.kind) { [INFO] [stdout] 177 ~ let right = right.get_i32(); [INFO] [stdout] 178 ~ if right == 0 || right == 1 { [INFO] [stdout] 179 ~ if let Some(fold) = if_cond_assign.get_mut(left) { [INFO] [stdout] 180 ~ if !fold.finished { [INFO] [stdout] 181 ~ if (right == 1 && !fold.invert) || (right == 0 && fold.invert) { [INFO] [stdout] 182 ~ fold.end_pos = i; [INFO] [stdout] 183 ~ let mut condition = condition.clone(); [INFO] [stdout] 184 ~ if fold.invert { [INFO] [stdout] 185 ~ condition = Condition::Not(Box::new(condition)); [INFO] [stdout] 186 ~ } [INFO] [stdout] 187 ~ fold.condition = Some(condition); [INFO] [stdout] 188 ~ } [INFO] [stdout] 189 ~ fold.finished = true; [INFO] [stdout] 190 ~ } [INFO] [stdout] 191 ~ } [INFO] [stdout] 192 ~ } [INFO] [stdout] 193 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/assign.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | if_cond_assign.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 249 - if_cond_assign.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 249 + if let Some(x) = if_cond_assign.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/assign.rs:252:5 [INFO] [stdout] | [INFO] [stdout] 252 | assign_const_add.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 252 - assign_const_add.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 252 + if let Some(x) = assign_const_add.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/assign.rs:262:5 [INFO] [stdout] | [INFO] [stdout] 262 | overwrite_op.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 262 - overwrite_op.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 262 + if let Some(x) = overwrite_op.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:144:6 [INFO] [stdout] | [INFO] [stdout] 144 | add_subs.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 144 - add_subs.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 144 + if let Some(x) = add_subs.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:145:6 [INFO] [stdout] | [INFO] [stdout] 145 | muls.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 145 - muls.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 145 + if let Some(x) = muls.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | mods.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 146 - mods.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 146 + if let Some(x) = mods.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:147:6 [INFO] [stdout] | [INFO] [stdout] 147 | nots.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 147 - nots.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 147 + if let Some(x) = nots.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:148:6 [INFO] [stdout] | [INFO] [stdout] 148 | pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 148 - pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 148 + if let Some(x) = pows.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:149:6 [INFO] [stdout] | [INFO] [stdout] 149 | to_pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 149 - to_pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 149 + if let Some(x) = to_pows.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:150:6 [INFO] [stdout] | [INFO] [stdout] 150 | abses.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 150 - abses.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 150 + if let Some(x) = abses.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/analysis/ir.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | / if !right [INFO] [stdout] 86 | | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 87 | | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 84 ~ InstrKind::Swap { left, right } [INFO] [stdout] 85 | if !right [INFO] [stdout] 86 | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 87 | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] 88 ~ => { [INFO] [stdout] 89 | bail!("Incompatible types in instruction at {i}"); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/analysis/ir.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | / if *scale != 1.0 { [INFO] [stdout] 95 | | bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 96 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 93 ~ DataType::Score(..) [INFO] [stdout] 94 ~ if *scale != 1.0 => { [INFO] [stdout] 95 | bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 96 ~ } [INFO] [stdout] | [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/passes/analysis/ir.rs:92:38 [INFO] [stdout] | [INFO] [stdout] 92 | InstrKind::Get { value, scale } => match value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 93 | | DataType::Score(..) => { [INFO] [stdout] 94 | | if *scale != 1.0 { [INFO] [stdout] 95 | | bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] ... | [INFO] [stdout] 98 | | _ => {} [INFO] [stdout] 99 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ InstrKind::Get { value, scale } => if let DataType::Score(..) = value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] 93 ~ if *scale != 1.0 { [INFO] [stdout] 94 ~ bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 95 ~ } [INFO] [stdout] 96 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/passes/opt/ty/mod.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / if let Some(Register { [INFO] [stdout] 75 | | ty: DataType::Score(ScoreType::Bool), [INFO] [stdout] 76 | | .. [INFO] [stdout] 77 | | }) = regs.get(reg) [INFO] [stdout] ... | [INFO] [stdout] 81 | | false [INFO] [stdout] 82 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 74 ~ matches!(regs.get(reg), Some(Register { [INFO] [stdout] 75 ~ ty: DataType::Score(ScoreType::Bool), [INFO] [stdout] 76 ~ .. [INFO] [stdout] 77 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/passes/util/usage_analysis.rs:29:26 [INFO] [stdout] | [INFO] [stdout] 29 | for (_, existing) in &copies { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 29 - for (_, existing) in &copies { [INFO] [stdout] 29 + for existing in copies.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RunAgain` [INFO] [stdout] --> src/passes/util/mod.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | / pub fn new() -> Self { [INFO] [stdout] 11 | | Self(false) [INFO] [stdout] 12 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 9 + impl Default for RunAgain { [INFO] [stdout] 10 + fn default() -> Self { [INFO] [stdout] 11 + Self::new() [INFO] [stdout] 12 + } [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/passes/opt/constant/fold.rs:535:17 [INFO] [stdout] | [INFO] [stdout] 535 | fn to_contents(self) -> Option { [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] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:111:4 [INFO] [stdout] | [INFO] [stdout] 111 | / if let MutableValue::Reg(reg) = value { [INFO] [stdout] 112 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 113 | | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 114 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] ... | [INFO] [stdout] 120 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:110:23 [INFO] [stdout] | [INFO] [stdout] 110 | MIRInstrKind::Get { value, scale } => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 111 | if let MutableValue::Reg(reg) = 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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:102:6 [INFO] [stdout] | [INFO] [stdout] 102 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 103 | | *right = Value::Constant(val.clone()); [INFO] [stdout] 104 | | *run_again = true; [INFO] [stdout] 105 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 102 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:113:6 [INFO] [stdout] | [INFO] [stdout] 113 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 114 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] 115 | | let scaled = ((val as f64) * *scale) as i32; [INFO] [stdout] 116 | | *instr = MIRInstrKind::GetConst { value: scaled }; [INFO] [stdout] 117 | | } [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 113 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:216:4 [INFO] [stdout] | [INFO] [stdout] 216 | / if let Value::Mutable(MutableValue::Reg(reg)) = val { [INFO] [stdout] 217 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 218 | | match val { [INFO] [stdout] 219 | | ConstAnalyzerValue::Reset(..) => { [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:215:21 [INFO] [stdout] | [INFO] [stdout] 215 | Condition::Exists(val) => { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 216 | if let Value::Mutable(MutableValue::Reg(reg)) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:190:6 [INFO] [stdout] | [INFO] [stdout] 190 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 191 | | *l = Value::Constant(val.clone()); [INFO] [stdout] 192 | | *run_again = true; [INFO] [stdout] 193 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 190 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:198:6 [INFO] [stdout] | [INFO] [stdout] 198 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 199 | | *r = Value::Constant(val.clone()); [INFO] [stdout] 200 | | *run_again = true; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 198 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:208:6 [INFO] [stdout] | [INFO] [stdout] 208 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 209 | | *b = Value::Constant(val.clone()); [INFO] [stdout] 210 | | *run_again = true; [INFO] [stdout] 211 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/passes/opt/constant/prop.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 208 | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/common/mod.rs:110:14 [INFO] [stdout] | [INFO] [stdout] 110 | fn iter_fns(&self) -> std::collections::hash_map::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 110 | fn iter_fns(&self) -> std::collections::hash_map::Iter<'_, ResourceLocation, Self::FunctionType> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/common/mod.rs:115:3 [INFO] [stdout] | [INFO] [stdout] 115 | &mut self, [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 116 | ) -> std::collections::hash_map::IterMut { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 116 | ) -> std::collections::hash_map::IterMut<'_, ResourceLocation, Self::FunctionType> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/passes/opt/dataflow/copy_elide.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | return; [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] 195 - *run_again_2.borrow_mut() = true; [INFO] [stdout] 196 - return; [INFO] [stdout] 195 + *run_again_2.borrow_mut() = true; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/passes/opt/dse.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | / if !instrs_to_remove.contains(&i) { [INFO] [stdout] 148 | | if instr.modifiers.is_empty() { [INFO] [stdout] 149 | | // If the candidate already exists, then that is a dead store that can be removed [INFO] [stdout] 150 | | if let Some(candidate) = elim_candidates.get(id) { [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [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] 147 ~ if !instrs_to_remove.contains(&i) [INFO] [stdout] 148 ~ && instr.modifiers.is_empty() { [INFO] [stdout] 149 | // If the candidate already exists, then that is a dead store that can be removed [INFO] [stdout] ... [INFO] [stdout] 153 | elim_candidates.insert(id.clone(), i); [INFO] [stdout] 154 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/passes/opt/func/inline.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | &cloned_funcs, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `cloned_funcs` [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 boolean expression can be simplified [INFO] [stdout] --> src/passes/opt/func/inline.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | if !(!is_root && block.contents.len() != 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_root || block.contents.len() == 1` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/passes/opt/func/inline.rs:138:3 [INFO] [stdout] | [INFO] [stdout] 138 | ®s, [INFO] [stdout] | ^^^^^ help: change this to: `regs` [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: useless conversion to the same type: `usize` [INFO] [stdout] --> src/passes/opt/func/inline.rs:179:38 [INFO] [stdout] | [INFO] [stdout] 179 | let reg = fmt_lowered_arg(func_id, i.try_into().expect("This should fit")); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/passes/opt/func/inline.rs:204:45 [INFO] [stdout] | [INFO] [stdout] 204 | if let Some(dest) = ret_destinations.get(*index as usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(*index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/passes/opt/modifiers/null.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | / if !matches!(modifier, Modifier::If { .. }) { [INFO] [stdout] 50 | | if !this_mod_ctx.iter().any(|x| { [INFO] [stdout] 51 | | let dep = x.clone().to_dep(); [INFO] [stdout] 52 | | instr_deps.contains(&dep) | mod_deps.contains(&dep) [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [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] 49 ~ if !matches!(modifier, Modifier::If { .. }) [INFO] [stdout] 50 ~ && !this_mod_ctx.iter().any(|x| { [INFO] [stdout] 51 | let dep = x.clone().to_dep(); [INFO] [stdout] ... [INFO] [stdout] 55 | dont_push_deps = true; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/passes/opt/modifiers/simplify.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | / *condition = Box::new(IfModCondition::Score(IfScoreCondition::Single { [INFO] [stdout] 149 | | left: score.clone(), [INFO] [stdout] 150 | | right: ScoreValue::Constant(left_val.clone()), [INFO] [stdout] 151 | | })); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] = note: `#[warn(clippy::replace_box)]` on by default [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 148 ~ **condition = IfModCondition::Score(IfScoreCondition::Single { [INFO] [stdout] 149 ~ left: score.clone(), [INFO] [stdout] 150 ~ right: ScoreValue::Constant(left_val.clone()), [INFO] [stdout] 151 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/passes/opt/modifiers/simplify.rs:164:4 [INFO] [stdout] | [INFO] [stdout] 164 | / *condition = Box::new(IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 165 | | score: score.clone(), [INFO] [stdout] 166 | | left: IfScoreRangeEnd::Infinite, [INFO] [stdout] 167 | | right: IfScoreRangeEnd::Fixed { [INFO] [stdout] ... | [INFO] [stdout] 170 | | }, [INFO] [stdout] 171 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 164 ~ **condition = IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 165 ~ score: score.clone(), [INFO] [stdout] 166 ~ left: IfScoreRangeEnd::Infinite, [INFO] [stdout] 167 ~ right: IfScoreRangeEnd::Fixed { [INFO] [stdout] 168 ~ value: ScoreValue::Constant(value.clone()), [INFO] [stdout] 169 ~ inclusive: !*inclusive, [INFO] [stdout] 170 ~ }, [INFO] [stdout] 171 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/passes/opt/modifiers/simplify.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | / *condition = Box::new(IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 184 | | score: score.clone(), [INFO] [stdout] 185 | | left: IfScoreRangeEnd::Fixed { [INFO] [stdout] 186 | | value: ScoreValue::Constant(value.clone()), [INFO] [stdout] ... | [INFO] [stdout] 189 | | right: IfScoreRangeEnd::Infinite, [INFO] [stdout] 190 | | })); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 183 ~ **condition = IfModCondition::Score(IfScoreCondition::Range { [INFO] [stdout] 184 ~ score: score.clone(), [INFO] [stdout] 185 ~ left: IfScoreRangeEnd::Fixed { [INFO] [stdout] 186 ~ value: ScoreValue::Constant(value.clone()), [INFO] [stdout] 187 ~ inclusive: !*inclusive, [INFO] [stdout] 188 ~ }, [INFO] [stdout] 189 ~ right: IfScoreRangeEnd::Infinite, [INFO] [stdout] 190 ~ }); [INFO] [stdout] | [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/passes/opt/multifold/assign.rs:76:3 [INFO] [stdout] | [INFO] [stdout] 76 | / match &instr.kind { [INFO] [stdout] 77 | | MIRInstrKind::Assign { [INFO] [stdout] 78 | | left: MutableValue::Reg(left), [INFO] [stdout] 79 | | right, [INFO] [stdout] ... | [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 76 ~ if let MIRInstrKind::Assign { [INFO] [stdout] 77 ~ left: MutableValue::Reg(left), [INFO] [stdout] 78 ~ right, [INFO] [stdout] 79 ~ } = &instr.kind { [INFO] [stdout] 80 ~ if let Some(fold) = overwrite_op.get_mut(left) { [INFO] [stdout] 81 ~ if !fold.finished { [INFO] [stdout] 82 ~ fold.right = Some(right.clone()); [INFO] [stdout] 83 ~ fold.end_pos = i; [INFO] [stdout] 84 ~ fold.finished = true; [INFO] [stdout] 85 ~ dont_create_new_overwrite_op = true; [INFO] [stdout] 86 ~ } [INFO] [stdout] 87 ~ } [INFO] [stdout] 88 + [INFO] [stdout] 89 ~ if let DeclareBinding::Value(Value::Mutable(MutableValue::Reg(right))) = right { [INFO] [stdout] 90 ~ if let Some(fold) = stack_peak.get_mut(right) { [INFO] [stdout] 91 ~ if &fold.original_reg == left { [INFO] [stdout] 92 ~ if !fold.finished { [INFO] [stdout] 93 ~ fold.end_pos = i; [INFO] [stdout] 94 ~ fold.finished = true; [INFO] [stdout] 95 ~ regs_to_keep.stack_peak = true; [INFO] [stdout] 96 ~ } [INFO] [stdout] 97 ~ } else { [INFO] [stdout] 98 ~ fold.finished = true; [INFO] [stdout] 99 ~ } [INFO] [stdout] 100 ~ } else { [INFO] [stdout] 101 ~ stack_peak.insert( [INFO] [stdout] 102 ~ left.clone(), [INFO] [stdout] 103 ~ StackPeak { [INFO] [stdout] 104 ~ finished: false, [INFO] [stdout] 105 ~ start_pos: i, [INFO] [stdout] 106 ~ end_pos: i, [INFO] [stdout] 107 ~ original_reg: right.clone(), [INFO] [stdout] 108 ~ op_poses: Vec::new(), [INFO] [stdout] 109 ~ ops: Vec::new(), [INFO] [stdout] 110 ~ }, [INFO] [stdout] 111 ~ ); [INFO] [stdout] 112 ~ regs_to_keep.stack_peak = true; [INFO] [stdout] 113 ~ } [INFO] [stdout] 114 ~ } [INFO] [stdout] 115 ~ } [INFO] [stdout] | [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/passes/opt/multifold/assign.rs:173:44 [INFO] [stdout] | [INFO] [stdout] 173 | MIRInstrKind::If { condition, body } => match body.contents.only().map(|x| &x.kind) { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 174 | | Some(MIRInstrKind::Assign { [INFO] [stdout] 175 | | left: MutableValue::Reg(left), [INFO] [stdout] 176 | | right: DeclareBinding::Value(Value::Constant(DataTypeContents::Score(right))), [INFO] [stdout] ... | [INFO] [stdout] 195 | | _ => {} [INFO] [stdout] 196 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 173 ~ MIRInstrKind::If { condition, body } => if let Some(MIRInstrKind::Assign { [INFO] [stdout] 174 ~ left: MutableValue::Reg(left), [INFO] [stdout] 175 ~ right: DeclareBinding::Value(Value::Constant(DataTypeContents::Score(right))), [INFO] [stdout] 176 ~ }) = body.contents.only().map(|x| &x.kind) { [INFO] [stdout] 177 ~ let right = right.get_i32(); [INFO] [stdout] 178 ~ if right == 0 || right == 1 { [INFO] [stdout] 179 ~ if let Some(fold) = if_cond_assign.get_mut(left) { [INFO] [stdout] 180 ~ if !fold.finished { [INFO] [stdout] 181 ~ if (right == 1 && !fold.invert) || (right == 0 && fold.invert) { [INFO] [stdout] 182 ~ fold.end_pos = i; [INFO] [stdout] 183 ~ let mut condition = condition.clone(); [INFO] [stdout] 184 ~ if fold.invert { [INFO] [stdout] 185 ~ condition = Condition::Not(Box::new(condition)); [INFO] [stdout] 186 ~ } [INFO] [stdout] 187 ~ fold.condition = Some(condition); [INFO] [stdout] 188 ~ } [INFO] [stdout] 189 ~ fold.finished = true; [INFO] [stdout] 190 ~ } [INFO] [stdout] 191 ~ } [INFO] [stdout] 192 ~ } [INFO] [stdout] 193 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/assign.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | if_cond_assign.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 249 - if_cond_assign.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 249 + if let Some(x) = if_cond_assign.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/assign.rs:252:5 [INFO] [stdout] | [INFO] [stdout] 252 | assign_const_add.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 252 - assign_const_add.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 252 + if let Some(x) = assign_const_add.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/assign.rs:262:5 [INFO] [stdout] | [INFO] [stdout] 262 | overwrite_op.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 262 - overwrite_op.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 262 + if let Some(x) = overwrite_op.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:144:6 [INFO] [stdout] | [INFO] [stdout] 144 | add_subs.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 144 - add_subs.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 144 + if let Some(x) = add_subs.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:145:6 [INFO] [stdout] | [INFO] [stdout] 145 | muls.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 145 - muls.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 145 + if let Some(x) = muls.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | mods.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 146 - mods.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 146 + if let Some(x) = mods.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:147:6 [INFO] [stdout] | [INFO] [stdout] 147 | nots.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 147 - nots.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 147 + if let Some(x) = nots.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:148:6 [INFO] [stdout] | [INFO] [stdout] 148 | pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 148 - pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 148 + if let Some(x) = pows.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:149:6 [INFO] [stdout] | [INFO] [stdout] 149 | to_pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 149 - to_pows.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 149 + if let Some(x) = to_pows.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/passes/opt/multifold/combine.rs:150:6 [INFO] [stdout] | [INFO] [stdout] 150 | abses.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 150 - abses.get_mut(reg).map(|x| x.finished = true); [INFO] [stdout] 150 + if let Some(x) = abses.get_mut(reg) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/passes/opt/ty/mod.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / if let Some(Register { [INFO] [stdout] 75 | | ty: DataType::Score(ScoreType::Bool), [INFO] [stdout] 76 | | .. [INFO] [stdout] 77 | | }) = regs.get(reg) [INFO] [stdout] ... | [INFO] [stdout] 81 | | false [INFO] [stdout] 82 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 74 ~ matches!(regs.get(reg), Some(Register { [INFO] [stdout] 75 ~ ty: DataType::Score(ScoreType::Bool), [INFO] [stdout] 76 ~ .. [INFO] [stdout] 77 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/passes/util/usage_analysis.rs:29:26 [INFO] [stdout] | [INFO] [stdout] 29 | for (_, existing) in &copies { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 29 - for (_, existing) in &copies { [INFO] [stdout] 29 + for existing in copies.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RunAgain` [INFO] [stdout] --> src/passes/util/mod.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | / pub fn new() -> Self { [INFO] [stdout] 11 | | Self(false) [INFO] [stdout] 12 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 9 + impl Default for RunAgain { [INFO] [stdout] 10 + fn default() -> Self { [INFO] [stdout] 11 + Self::new() [INFO] [stdout] 12 + } [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/common/mod.rs:110:14 [INFO] [stdout] | [INFO] [stdout] 110 | fn iter_fns(&self) -> std::collections::hash_map::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 110 | fn iter_fns(&self) -> std::collections::hash_map::Iter<'_, ResourceLocation, Self::FunctionType> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/common/mod.rs:115:3 [INFO] [stdout] | [INFO] [stdout] 115 | &mut self, [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 116 | ) -> std::collections::hash_map::IterMut { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 116 | ) -> std::collections::hash_map::IterMut<'_, ResourceLocation, Self::FunctionType> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking dpc_py v0.2.5 (/opt/rustwide/workdir/bind/py) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> test/codegen/mod.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | run_test(&test, generate) [INFO] [stdout] | ^^^^^ help: change this to: `test` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> bind/py/src/lib.rs:67:1 [INFO] [stdout] | [INFO] [stdout] 67 | #[pymethods] [INFO] [stdout] | -^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `PyClassImplCollector` is not local [INFO] [stdout] | `PyClassNewTextSignature` is not local [INFO] [stdout] | move the `impl` block outside of this function `trampoline` and up 4 bodies [INFO] [stdout] 68 | impl PyCodegenIRSettings { [INFO] [stdout] | ------------------- [INFO] [stdout] | | [INFO] [stdout] | `PyCodegenIRSettings` is not local [INFO] [stdout] | `PyCodegenIRSettings` is not local [INFO] [stdout] | [INFO] [stdout] = note: the attribute macro `pymethods` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the attribute macro `pymethods` may come from an old version of the `pyo3_macros` crate, try updating your dependency with `cargo update -p pyo3_macros` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> bind/py/src/lib.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | #[pymethods] [INFO] [stdout] | -^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `PyClassImplCollector` is not local [INFO] [stdout] | `PyClassNewTextSignature` is not local [INFO] [stdout] | move the `impl` block outside of this function `trampoline` and up 4 bodies [INFO] [stdout] 104 | impl PyProjectSettings { [INFO] [stdout] | ----------------- [INFO] [stdout] | | [INFO] [stdout] | `PyProjectSettings` is not local [INFO] [stdout] | `PyProjectSettings` is not local [INFO] [stdout] | [INFO] [stdout] = note: the attribute macro `pymethods` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the attribute macro `pymethods` may come from an old version of the `pyo3_macros` crate, try updating your dependency with `cargo update -p pyo3_macros` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> bind/py/src/lib.rs:67:1 [INFO] [stdout] | [INFO] [stdout] 67 | #[pymethods] [INFO] [stdout] | -^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `PyClassImplCollector` is not local [INFO] [stdout] | `PyClassNewTextSignature` is not local [INFO] [stdout] | move the `impl` block outside of this function `trampoline` and up 4 bodies [INFO] [stdout] 68 | impl PyCodegenIRSettings { [INFO] [stdout] | ------------------- [INFO] [stdout] | | [INFO] [stdout] | `PyCodegenIRSettings` is not local [INFO] [stdout] | `PyCodegenIRSettings` is not local [INFO] [stdout] | [INFO] [stdout] = note: the attribute macro `pymethods` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the attribute macro `pymethods` may come from an old version of the `pyo3_macros` crate, try updating your dependency with `cargo update -p pyo3_macros` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> bind/py/src/lib.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | #[pymethods] [INFO] [stdout] | -^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `PyClassImplCollector` is not local [INFO] [stdout] | `PyClassNewTextSignature` is not local [INFO] [stdout] | move the `impl` block outside of this function `trampoline` and up 4 bodies [INFO] [stdout] 104 | impl PyProjectSettings { [INFO] [stdout] | ----------------- [INFO] [stdout] | | [INFO] [stdout] | `PyProjectSettings` is not local [INFO] [stdout] | `PyProjectSettings` is not local [INFO] [stdout] | [INFO] [stdout] = note: the attribute macro `pymethods` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the attribute macro `pymethods` may come from an old version of the `pyo3_macros` crate, try updating your dependency with `cargo update -p pyo3_macros` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.64s [INFO] running `Command { std: "docker" "inspect" "585a84ead99d7aecfd3cf38b9977a83e3456302f1544f36b3c8b93c8d5e2bc46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "585a84ead99d7aecfd3cf38b9977a83e3456302f1544f36b3c8b93c8d5e2bc46", kill_on_drop: false }` [INFO] [stdout] 585a84ead99d7aecfd3cf38b9977a83e3456302f1544f36b3c8b93c8d5e2bc46