[INFO] fetching crate dpc 0.2.5... [INFO] linting dpc-0.2.5 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate dpc 0.2.5 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate dpc 0.2.5 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate dpc 0.2.5 [INFO] tweaked toml for crates.io crate dpc 0.2.5 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate dpc 0.2.5 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 crates.io crate dpc 0.2.5 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded intset v1.0.2 [INFO] [stderr] Downloaded include_dir v0.7.3 [INFO] [stderr] Downloaded include_dir_macros v0.7.3 [INFO] [stderr] Downloaded color-print v0.3.5 [INFO] [stderr] Downloaded color-print-proc-macro v0.3.5 [INFO] [stderr] Downloaded serde_derive v1.0.196 [INFO] [stderr] Downloaded serde v1.0.196 [INFO] [stderr] Downloaded serde_json v1.0.112 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] f648fa146b153936fe9b7c489c8b9fd335a16ac3318864fd8893e36ecb72d8c8 [INFO] running `Command { std: "docker" "start" "-a" "f648fa146b153936fe9b7c489c8b9fd335a16ac3318864fd8893e36ecb72d8c8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f648fa146b153936fe9b7c489c8b9fd335a16ac3318864fd8893e36ecb72d8c8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f648fa146b153936fe9b7c489c8b9fd335a16ac3318864fd8893e36ecb72d8c8", kill_on_drop: false }` [INFO] [stdout] f648fa146b153936fe9b7c489c8b9fd335a16ac3318864fd8893e36ecb72d8c8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 8aa2490740aff3ed619b75e3124e0e00508267ed7f871c848413ec81dad657e0 [INFO] running `Command { std: "docker" "start" "-a" "8aa2490740aff3ed619b75e3124e0e00508267ed7f871c848413ec81dad657e0", 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] Compiling serde_json v1.0.112 [INFO] [stderr] Compiling anyhow v1.0.79 [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Checking ryu v1.0.16 [INFO] [stderr] Checking itoa v1.0.10 [INFO] [stderr] Checking intset v1.0.2 [INFO] [stderr] Checking anstream v0.6.11 [INFO] [stderr] Compiling memchr v2.7.1 [INFO] [stderr] Checking clap_builder v4.4.18 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling syn v2.0.48 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling include_dir_macros v0.7.3 [INFO] [stderr] Checking include_dir v0.7.3 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling color-print-proc-macro v0.3.5 [INFO] [stderr] Checking color-print v0.3.5 [INFO] [stderr] Compiling serde_derive v1.0.196 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking clap v4.4.18 [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: 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:209:3 [INFO] [stdout] | [INFO] [stdout] 209 | / match self { [INFO] [stdout] 210 | | Self::Reg(reg, ..) => f(reg), [INFO] [stdout] 211 | | _ => {} [INFO] [stdout] 212 | | } [INFO] [stdout] | |_________^ help: try: `if let Self::Reg(reg, ..) = self { f(reg) }` [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] [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/common/mc/modifier.rs:209:3 [INFO] [stdout] | [INFO] [stdout] 209 | / match self { [INFO] [stdout] 210 | | Self::Reg(reg, ..) => f(reg), [INFO] [stdout] 211 | | _ => {} [INFO] [stdout] 212 | | } [INFO] [stdout] | |_________^ help: try: `if let Self::Reg(reg, ..) = self { f(reg) }` [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] [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: 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: 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/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:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | 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] 42 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 42 + 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:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 47 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 48 | ) -> &'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] 46 ~ fn get_fns_mut( [INFO] [stdout] 47 ~ &mut self, [INFO] [stdout] 48 ~ ) -> &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:349:4 [INFO] [stdout] | [INFO] [stdout] 349 | / match modi { [INFO] [stdout] 350 | | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] 351 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 352 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] ... | [INFO] [stdout] 382 | | _ => {} [INFO] [stdout] 383 | | } [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] 349 ~ if let Modifier::If { condition, .. } = modi { match condition.as_mut() { [INFO] [stdout] 350 ~ IfModCondition::Score(cond) => match cond { [INFO] [stdout] 351 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 352 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 353 ~ f(left); [INFO] [stdout] 354 ~ } [INFO] [stdout] 355 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 356 ~ f(right); [INFO] [stdout] 357 ~ } [INFO] [stdout] 358 ~ } [INFO] [stdout] 359 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 360 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 361 ~ f(score); [INFO] [stdout] 362 ~ } [INFO] [stdout] 363 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 364 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 365 ~ .. [INFO] [stdout] 366 ~ } = left [INFO] [stdout] 367 ~ { [INFO] [stdout] 368 ~ f(left); [INFO] [stdout] 369 ~ } [INFO] [stdout] 370 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 371 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 372 ~ .. [INFO] [stdout] 373 ~ } = right [INFO] [stdout] 374 ~ { [INFO] [stdout] 375 ~ f(right); [INFO] [stdout] 376 ~ } [INFO] [stdout] 377 ~ } [INFO] [stdout] 378 ~ }, [INFO] [stdout] 379 ~ _ => {} [INFO] [stdout] 380 ~ } } [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:350:39 [INFO] [stdout] | [INFO] [stdout] 350 | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 351 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 352 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] 353 | | if let ScoreValue::Mutable(left) = left { [INFO] [stdout] ... | [INFO] [stdout] 380 | | _ => {} [INFO] [stdout] 381 | | }, [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] 350 ~ Modifier::If { condition, .. } => if let IfModCondition::Score(cond) = condition.as_mut() { match cond { [INFO] [stdout] 351 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 352 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 353 ~ f(left); [INFO] [stdout] 354 ~ } [INFO] [stdout] 355 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 356 ~ f(right); [INFO] [stdout] 357 ~ } [INFO] [stdout] 358 ~ } [INFO] [stdout] 359 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 360 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 361 ~ f(score); [INFO] [stdout] 362 ~ } [INFO] [stdout] 363 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 364 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 365 ~ .. [INFO] [stdout] 366 ~ } = left [INFO] [stdout] 367 ~ { [INFO] [stdout] 368 ~ f(left); [INFO] [stdout] 369 ~ } [INFO] [stdout] 370 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 371 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 372 ~ .. [INFO] [stdout] 373 ~ } = right [INFO] [stdout] 374 ~ { [INFO] [stdout] 375 ~ f(right); [INFO] [stdout] 376 ~ } [INFO] [stdout] 377 ~ } [INFO] [stdout] 378 ~ } }, [INFO] [stdout] | [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: 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:524:19 [INFO] [stdout] | [INFO] [stdout] 524 | 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: 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: 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/91021ccc790478a1a89c003e7d32b8d155ae6aae/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: 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:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | 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] 44 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 44 + 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:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 49 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 50 | ) -> &'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] 48 ~ fn get_fns_mut( [INFO] [stdout] 49 ~ &mut self, [INFO] [stdout] 50 ~ ) -> &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:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | 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] 42 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 42 + 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:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 47 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 48 | ) -> &'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] 46 ~ fn get_fns_mut( [INFO] [stdout] 47 ~ &mut self, [INFO] [stdout] 48 ~ ) -> &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:349:4 [INFO] [stdout] | [INFO] [stdout] 349 | / match modi { [INFO] [stdout] 350 | | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] 351 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 352 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] ... | [INFO] [stdout] 382 | | _ => {} [INFO] [stdout] 383 | | } [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] 349 ~ if let Modifier::If { condition, .. } = modi { match condition.as_mut() { [INFO] [stdout] 350 ~ IfModCondition::Score(cond) => match cond { [INFO] [stdout] 351 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 352 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 353 ~ f(left); [INFO] [stdout] 354 ~ } [INFO] [stdout] 355 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 356 ~ f(right); [INFO] [stdout] 357 ~ } [INFO] [stdout] 358 ~ } [INFO] [stdout] 359 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 360 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 361 ~ f(score); [INFO] [stdout] 362 ~ } [INFO] [stdout] 363 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 364 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 365 ~ .. [INFO] [stdout] 366 ~ } = left [INFO] [stdout] 367 ~ { [INFO] [stdout] 368 ~ f(left); [INFO] [stdout] 369 ~ } [INFO] [stdout] 370 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 371 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 372 ~ .. [INFO] [stdout] 373 ~ } = right [INFO] [stdout] 374 ~ { [INFO] [stdout] 375 ~ f(right); [INFO] [stdout] 376 ~ } [INFO] [stdout] 377 ~ } [INFO] [stdout] 378 ~ }, [INFO] [stdout] 379 ~ _ => {} [INFO] [stdout] 380 ~ } } [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:350:39 [INFO] [stdout] | [INFO] [stdout] 350 | Modifier::If { condition, .. } => match condition.as_mut() { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 351 | | IfModCondition::Score(cond) => match cond { [INFO] [stdout] 352 | | IfScoreCondition::Single { left, right } => { [INFO] [stdout] 353 | | if let ScoreValue::Mutable(left) = left { [INFO] [stdout] ... | [INFO] [stdout] 380 | | _ => {} [INFO] [stdout] 381 | | }, [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] 350 ~ Modifier::If { condition, .. } => if let IfModCondition::Score(cond) = condition.as_mut() { match cond { [INFO] [stdout] 351 ~ IfScoreCondition::Single { left, right } => { [INFO] [stdout] 352 ~ if let ScoreValue::Mutable(left) = left { [INFO] [stdout] 353 ~ f(left); [INFO] [stdout] 354 ~ } [INFO] [stdout] 355 ~ if let ScoreValue::Mutable(right) = right { [INFO] [stdout] 356 ~ f(right); [INFO] [stdout] 357 ~ } [INFO] [stdout] 358 ~ } [INFO] [stdout] 359 ~ IfScoreCondition::Range { score, left, right } => { [INFO] [stdout] 360 ~ if let ScoreValue::Mutable(score) = score { [INFO] [stdout] 361 ~ f(score); [INFO] [stdout] 362 ~ } [INFO] [stdout] 363 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 364 ~ value: ScoreValue::Mutable(left), [INFO] [stdout] 365 ~ .. [INFO] [stdout] 366 ~ } = left [INFO] [stdout] 367 ~ { [INFO] [stdout] 368 ~ f(left); [INFO] [stdout] 369 ~ } [INFO] [stdout] 370 ~ if let IfScoreRangeEnd::Fixed { [INFO] [stdout] 371 ~ value: ScoreValue::Mutable(right), [INFO] [stdout] 372 ~ .. [INFO] [stdout] 373 ~ } = right [INFO] [stdout] 374 ~ { [INFO] [stdout] 375 ~ f(right); [INFO] [stdout] 376 ~ } [INFO] [stdout] 377 ~ } [INFO] [stdout] 378 ~ } }, [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:524:19 [INFO] [stdout] | [INFO] [stdout] 524 | 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/91021ccc790478a1a89c003e7d32b8d155ae6aae/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:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | 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] 44 - fn get_fns<'this>(&'this self) -> &'this FxHashMap { [INFO] [stdout] 44 + 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:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_fns_mut<'this>( [INFO] [stdout] | ^^^^^ [INFO] [stdout] 49 | &'this mut self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 50 | ) -> &'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] 48 ~ fn get_fns_mut( [INFO] [stdout] 49 ~ &mut self, [INFO] [stdout] 50 ~ ) -> &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:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | / if !right [INFO] [stdout] 85 | | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 86 | | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [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] 83 ~ InstrKind::Swap { left, right } [INFO] [stdout] 84 | if !right [INFO] [stdout] 85 | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 86 | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] 87 ~ => { [INFO] [stdout] 88 | bail!("Incompatible types in instruction at {i}"); [INFO] [stdout] 89 ~ } [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:93:5 [INFO] [stdout] | [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] | |_________________^ [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] 92 ~ DataType::Score(..) [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] | [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:91:38 [INFO] [stdout] | [INFO] [stdout] 91 | InstrKind::Get { value, scale } => match value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 92 | | DataType::Score(..) => { [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] ... | [INFO] [stdout] 97 | | _ => {} [INFO] [stdout] 98 | | }, [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] 91 ~ InstrKind::Get { value, scale } => if let DataType::Score(..) = value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] 92 ~ if *scale != 1.0 { [INFO] [stdout] 93 ~ bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 94 ~ } [INFO] [stdout] 95 ~ }, [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:110:4 [INFO] [stdout] | [INFO] [stdout] 110 | / if let MutableValue::Reg(reg) = value { [INFO] [stdout] 111 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 112 | | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 113 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [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:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | MIRInstrKind::Get { value, scale } => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 110 | 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:101:6 [INFO] [stdout] | [INFO] [stdout] 101 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 102 | | *right = Value::Constant(val.clone()); [INFO] [stdout] 103 | | *run_again = true; [INFO] [stdout] 104 | | } [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:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 101 | 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:112:6 [INFO] [stdout] | [INFO] [stdout] 112 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 113 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] 114 | | let scaled = ((val as f64) * *scale) as i32; [INFO] [stdout] 115 | | *instr = MIRInstrKind::GetConst { value: scaled }; [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | } [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:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 112 | 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:215:4 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Value::Mutable(MutableValue::Reg(reg)) = val { [INFO] [stdout] 216 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 217 | | match val { [INFO] [stdout] 218 | | ConstAnalyzerValue::Reset(..) => { [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [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:214:21 [INFO] [stdout] | [INFO] [stdout] 214 | Condition::Exists(val) => { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 215 | 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:189:6 [INFO] [stdout] | [INFO] [stdout] 189 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 190 | | *l = Value::Constant(val.clone()); [INFO] [stdout] 191 | | *run_again = true; [INFO] [stdout] 192 | | } [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:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 189 | 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:197:6 [INFO] [stdout] | [INFO] [stdout] 197 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 198 | | *r = Value::Constant(val.clone()); [INFO] [stdout] 199 | | *run_again = true; [INFO] [stdout] 200 | | } [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:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 197 | 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:207:6 [INFO] [stdout] | [INFO] [stdout] 207 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 208 | | *b = Value::Constant(val.clone()); [INFO] [stdout] 209 | | *run_again = true; [INFO] [stdout] 210 | | } [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:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 207 | 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:195:6 [INFO] [stdout] | [INFO] [stdout] 195 | 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] 194 - *run_again_2.borrow_mut() = true; [INFO] [stdout] 195 - return; [INFO] [stdout] 194 + *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:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | / if !right [INFO] [stdout] 85 | | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 86 | | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [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] 83 ~ InstrKind::Swap { left, right } [INFO] [stdout] 84 | if !right [INFO] [stdout] 85 | .get_ty(regs, &func.interface.sig)? [INFO] [stdout] 86 | .is_trivially_castable(&left.get_ty(regs, &func.interface.sig)?) [INFO] [stdout] 87 ~ => { [INFO] [stdout] 88 | bail!("Incompatible types in instruction at {i}"); [INFO] [stdout] 89 ~ } [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:93:5 [INFO] [stdout] | [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] | |_________________^ [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] 92 ~ DataType::Score(..) [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] | [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:91:38 [INFO] [stdout] | [INFO] [stdout] 91 | InstrKind::Get { value, scale } => match value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 92 | | DataType::Score(..) => { [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] ... | [INFO] [stdout] 97 | | _ => {} [INFO] [stdout] 98 | | }, [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] 91 ~ InstrKind::Get { value, scale } => if let DataType::Score(..) = value.get_ty(regs, &func.interface.sig)? { [INFO] [stdout] 92 ~ if *scale != 1.0 { [INFO] [stdout] 93 ~ bail!("Scale that is not 1.0 cannot be used for getting a value of score type"); [INFO] [stdout] 94 ~ } [INFO] [stdout] 95 ~ }, [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:110:4 [INFO] [stdout] | [INFO] [stdout] 110 | / if let MutableValue::Reg(reg) = value { [INFO] [stdout] 111 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 112 | | if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 113 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [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:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | MIRInstrKind::Get { value, scale } => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 110 | 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:101:6 [INFO] [stdout] | [INFO] [stdout] 101 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 102 | | *right = Value::Constant(val.clone()); [INFO] [stdout] 103 | | *run_again = true; [INFO] [stdout] 104 | | } [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:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 101 | 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:112:6 [INFO] [stdout] | [INFO] [stdout] 112 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 113 | | if let Some(val) = val.try_get_i32() { [INFO] [stdout] 114 | | let scaled = ((val as f64) * *scale) as i32; [INFO] [stdout] 115 | | *instr = MIRInstrKind::GetConst { value: scaled }; [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | } [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:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 112 | 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: `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: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/passes/opt/constant/prop.rs:215:4 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Value::Mutable(MutableValue::Reg(reg)) = val { [INFO] [stdout] 216 | | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] 217 | | match val { [INFO] [stdout] 218 | | ConstAnalyzerValue::Reset(..) => { [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [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:214:21 [INFO] [stdout] | [INFO] [stdout] 214 | Condition::Exists(val) => { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 215 | 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:189:6 [INFO] [stdout] | [INFO] [stdout] 189 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 190 | | *l = Value::Constant(val.clone()); [INFO] [stdout] 191 | | *run_again = true; [INFO] [stdout] 192 | | } [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:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 189 | 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:197:6 [INFO] [stdout] | [INFO] [stdout] 197 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 198 | | *r = Value::Constant(val.clone()); [INFO] [stdout] 199 | | *run_again = true; [INFO] [stdout] 200 | | } [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:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 197 | 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:207:6 [INFO] [stdout] | [INFO] [stdout] 207 | / if let ConstAnalyzerValue::Value(val) = val { [INFO] [stdout] 208 | | *b = Value::Constant(val.clone()); [INFO] [stdout] 209 | | *run_again = true; [INFO] [stdout] 210 | | } [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:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | if let Some(val) = an.vals.get(reg) { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 207 | 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: you should consider adding a `Default` implementation for `RunAgain` [INFO] [stdout] --> src/passes/util.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | / pub fn new() -> Self { [INFO] [stdout] 9 | | Self(false) [INFO] [stdout] 10 | | } [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] 7 + impl Default for RunAgain { [INFO] [stdout] 8 + fn default() -> Self { [INFO] [stdout] 9 + Self::new() [INFO] [stdout] 10 + } [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/passes/opt/dataflow/copy_elide.rs:195:6 [INFO] [stdout] | [INFO] [stdout] 195 | 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] 194 - *run_again_2.borrow_mut() = true; [INFO] [stdout] 195 - return; [INFO] [stdout] 194 + *run_again_2.borrow_mut() = true; [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] [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 should consider adding a `Default` implementation for `RunAgain` [INFO] [stdout] --> src/passes/util.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | / pub fn new() -> Self { [INFO] [stdout] 9 | | Self(false) [INFO] [stdout] 10 | | } [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] 7 + impl Default for RunAgain { [INFO] [stdout] 8 + fn default() -> Self { [INFO] [stdout] 9 + Self::new() [INFO] [stdout] 10 + } [INFO] [stdout] 11 + } [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] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> test/parse/mod.rs:61:23 [INFO] [stdout] | [INFO] [stdout] 61 | let name = test.name.clone(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 22.02s [INFO] running `Command { std: "docker" "inspect" "8aa2490740aff3ed619b75e3124e0e00508267ed7f871c848413ec81dad657e0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8aa2490740aff3ed619b75e3124e0e00508267ed7f871c848413ec81dad657e0", kill_on_drop: false }` [INFO] [stdout] 8aa2490740aff3ed619b75e3124e0e00508267ed7f871c848413ec81dad657e0