[INFO] cloning repository https://github.com/djava/toy_compiler [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/djava/toy_compiler" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdjava%2Ftoy_compiler", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdjava%2Ftoy_compiler'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4be9f8a13b84ec437fff6e080684b66009ccd115 [INFO] linting djava/toy_compiler against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdjava%2Ftoy_compiler" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/djava/toy_compiler [INFO] finished tweaking git repo https://github.com/djava/toy_compiler [INFO] tweaked toml for git repo https://github.com/djava/toy_compiler written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/djava/toy_compiler on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/djava/toy_compiler already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded peg-macros v0.8.5 [INFO] [stderr] Downloaded nom_locate v5.0.0 [INFO] [stderr] Downloaded peg v0.8.5 [INFO] [stderr] Downloaded bitfield-struct v0.12.1 [INFO] [stderr] Downloaded peg-runtime v0.8.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 930456a2866079090eed59b0e7eb06f02fca123203831cc0074f4ccb78df48f7 [INFO] running `Command { std: "docker" "start" "-a" "930456a2866079090eed59b0e7eb06f02fca123203831cc0074f4ccb78df48f7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "930456a2866079090eed59b0e7eb06f02fca123203831cc0074f4ccb78df48f7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "930456a2866079090eed59b0e7eb06f02fca123203831cc0074f4ccb78df48f7", kill_on_drop: false }` [INFO] [stdout] 930456a2866079090eed59b0e7eb06f02fca123203831cc0074f4ccb78df48f7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 932741a839514fa1bacff28926f543b012514a79420e4209172925f506f4451e [INFO] running `Command { std: "docker" "start" "-a" "932741a839514fa1bacff28926f543b012514a79420e4209172925f506f4451e", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Compiling peg-runtime v0.8.5 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking fixedbitset v0.5.7 [INFO] [stderr] Checking bytecount v0.6.9 [INFO] [stderr] Checking rustix v1.1.4 [INFO] [stderr] Compiling peg-macros v0.8.5 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Checking petgraph v0.8.3 [INFO] [stderr] Checking peg v0.8.5 [INFO] [stderr] Checking tempfile v3.26.0 [INFO] [stderr] Checking nom_locate v5.0.0 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Compiling enum_dispatch v0.3.13 [INFO] [stderr] Compiling bitfield-struct v0.12.1 [INFO] [stderr] Checking clap v4.5.57 [INFO] [stderr] Checking clio v0.3.5 [INFO] [stderr] Checking compiler v0.1.0 (/opt/rustwide/workdir/crates/compiler) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:794:6 [INFO] [stdout] | [INFO] [stdout] 794 | &'static str, [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/constant_folding.rs:226:39 [INFO] [stdout] | [INFO] [stdout] 226 | *e = Constant(op.eval(&val)); [INFO] [stdout] | ^^^^ help: change this to: `val` [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: manual implementation of `Option::map` [INFO] [stdout] --> crates/compiler/src/passes/constant_folding.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | / if let Some(val) = v { [INFO] [stdout] 308 | | Some((k, val)) [INFO] [stdout] 309 | | } else { [INFO] [stdout] 310 | | None [INFO] [stdout] 311 | | } [INFO] [stdout] | |_____________^ help: try: `v.map(|val| (k, val))` [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: call to `reserve` immediately after creation [INFO] [stdout] --> crates/compiler/src/passes/patch_instructions.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / let mut new_instrs = vec![]; [INFO] [stdout] 44 | | // Reserve for worst case because why not [INFO] [stdout] 45 | | new_instrs.reserve(instrs.len() * 2); [INFO] [stdout] | |_________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut new_instrs = Vec::with_capacity(instrs.len() * 2);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/prelude_conclusion.rs:139:24 [INFO] [stdout] | [INFO] [stdout] 139 | callee_saved_used: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - callee_saved_used: &Vec, [INFO] [stdout] 139 + callee_saved_used: &[Register], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:38:52 [INFO] [stdout] | [INFO] [stdout] 38 | let instrs = alive_after_instrs.iter().map(|(b, _)| &b.instrs).flatten(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(b, _)| &b.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | let instrs = alive_after_instrs.iter().map(|(b, _)| &b.instrs).flatten(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `alive_after_instrs.keys().map(|b| &b.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:42:18 [INFO] [stdout] | [INFO] [stdout] 42 | .map(|(_, v_hashset)| v_hashset) [INFO] [stdout] | __________________^ [INFO] [stdout] 43 | | .flatten(); [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(_, v_hashset)| v_hashset)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:40:32 [INFO] [stdout] | [INFO] [stdout] 40 | let alive_afters = alive_after_instrs [INFO] [stdout] | ________________________________^ [INFO] [stdout] 41 | | .iter() [INFO] [stdout] 42 | | .map(|(_, v_hashset)| v_hashset) [INFO] [stdout] | |________________________________________________^ help: try: `alive_after_instrs.values()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:216:83 [INFO] [stdout] | [INFO] [stdout] 216 | matches!(loc, Location::Reg(r) if CALLEE_SAVED_REGISTERS.contains(&r) || CALLER_SAVED_REGISTERS.contains(&r)) [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:216:122 [INFO] [stdout] | [INFO] [stdout] 216 | matches!(loc, Location::Reg(r) if CALLEE_SAVED_REGISTERS.contains(&r) || CALLER_SAVED_REGISTERS.contains(&r)) [INFO] [stdout] | ^^ help: change this to: `r` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:299:24 [INFO] [stdout] | [INFO] [stdout] 299 | all_locations: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 299 - all_locations: &Vec, [INFO] [stdout] 299 + all_locations: &[Location], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:358:10 [INFO] [stdout] | [INFO] [stdout] 358 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:54:29 [INFO] [stdout] | [INFO] [stdout] 54 | pub fn color_location_graph<'a>(dataflow: &'a DataflowAnalysis) -> HashMap<&'a Location, i32> { [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] 54 - pub fn color_location_graph<'a>(dataflow: &'a DataflowAnalysis) -> HashMap<&'a Location, i32> { [INFO] [stdout] 54 + pub fn color_location_graph(dataflow: &DataflowAnalysis) -> HashMap<&Location, i32> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(&color1) = color_map.get(&node_idx1) { [INFO] [stdout] 76 | | if let Some(set) = unavailable_colors_map.get_mut(&node_idx2) { [INFO] [stdout] 77 | | set.insert(color1); [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [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] 75 ~ if let Some(&color1) = color_map.get(&node_idx1) [INFO] [stdout] 76 ~ && let Some(set) = unavailable_colors_map.get_mut(&node_idx2) { [INFO] [stdout] 77 | set.insert(color1); [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / if let Some(&color2) = color_map.get(&node_idx2) { [INFO] [stdout] 81 | | if let Some(set) = unavailable_colors_map.get_mut(&node_idx1) { [INFO] [stdout] 82 | | set.insert(color2); [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [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] 80 ~ if let Some(&color2) = color_map.get(&node_idx2) [INFO] [stdout] 81 ~ && let Some(set) = unavailable_colors_map.get_mut(&node_idx1) { [INFO] [stdout] 82 | set.insert(color2); [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:133:73 [INFO] [stdout] | [INFO] [stdout] 133 | let bsat = BiasedSaturation::calculate(*idx, set, move_rel, &color_map, use_count); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `color_map` [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:199:1 [INFO] [stdout] | [INFO] [stdout] 199 | / impl PartialOrd for BiasedSaturation { [INFO] [stdout] 200 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 | | if self.num_unavail == other.num_unavail { [INFO] [stdout] 202 | | match ( [INFO] [stdout] ... | [INFO] [stdout] 216 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 200 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 - if self.num_unavail == other.num_unavail { [INFO] [stdout] 202 - match ( [INFO] [stdout] 203 - self.avail_move_related_node_idx, [INFO] [stdout] 204 - other.avail_move_related_node_idx, [INFO] [stdout] 205 - ) { [INFO] [stdout] 206 - (Some(_), Some(_)) | (None, None) => { [INFO] [stdout] 207 - self.loc_use_count.partial_cmp(&other.loc_use_count) [INFO] [stdout] 208 - } [INFO] [stdout] 209 - (Some(_), None) => Some(std::cmp::Ordering::Greater), [INFO] [stdout] 210 - (None, Some(_)) => Some(std::cmp::Ordering::Less), [INFO] [stdout] 211 - } [INFO] [stdout] 212 - } else { [INFO] [stdout] 213 - Some(self.num_unavail.cmp(&other.num_unavail)) [INFO] [stdout] 214 - } [INFO] [stdout] 215 - } [INFO] [stdout] 200 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:56:52 [INFO] [stdout] | [INFO] [stdout] 56 | let liveness = DataflowAnalysis::from_function(&f); [INFO] [stdout] | ^^ help: change this to: `f` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:139:26 [INFO] [stdout] | [INFO] [stdout] 139 | fn run_for_block(instrs: &mut Vec, id_to_storage: &HashMap) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - fn run_for_block(instrs: &mut Vec, id_to_storage: &HashMap) { [INFO] [stdout] 139 + fn run_for_block(instrs: &mut [Instr], id_to_storage: &HashMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:185:21 [INFO] [stdout] | [INFO] [stdout] 185 | fn allocate_storage<'a>(dataflow: &'a DataflowAnalysis, types: &TypeEnv) -> AllocateStorageResult { [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] 185 - fn allocate_storage<'a>(dataflow: &'a DataflowAnalysis, types: &TypeEnv) -> AllocateStorageResult { [INFO] [stdout] 185 + fn allocate_storage(dataflow: &DataflowAnalysis, types: &TypeEnv) -> AllocateStorageResult { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:50:38 [INFO] [stdout] | [INFO] [stdout] 50 | let transform = rco_expr(&expr, false); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:69:38 [INFO] [stdout] | [INFO] [stdout] 69 | let transform = rco_expr(&expr, false); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:129:38 [INFO] [stdout] | [INFO] [stdout] 129 | let transform = rco_expr(&expr, false); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [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: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:150:43 [INFO] [stdout] | [INFO] [stdout] 150 | let left_transform = rco_expr(&*left, true); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 150 - let left_transform = rco_expr(&*left, true); [INFO] [stdout] 150 + let left_transform = rco_expr(left, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 150 | let left_transform = rco_expr(&**left, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:151:44 [INFO] [stdout] | [INFO] [stdout] 151 | let right_transform = rco_expr(&*right, true); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 151 - let right_transform = rco_expr(&*right, true); [INFO] [stdout] 151 + let right_transform = rco_expr(right, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 151 | let right_transform = rco_expr(&**right, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:182:42 [INFO] [stdout] | [INFO] [stdout] 182 | let val_transform = rco_expr(&*val, true); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 182 - let val_transform = rco_expr(&*val, true); [INFO] [stdout] 182 + let val_transform = rco_expr(val, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 182 | let val_transform = rco_expr(&**val, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:211:46 [INFO] [stdout] | [INFO] [stdout] 211 | let arg_transform = rco_expr(&*arg, true); [INFO] [stdout] | ^^^^^ help: if you would like to reborrow, try removing `&*`: `arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:216:43 [INFO] [stdout] | [INFO] [stdout] 216 | let func_transform = rco_expr(&**func, true); [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:321:47 [INFO] [stdout] | [INFO] [stdout] 321 | let elem_transform = rco_expr(&*elem, true); [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `elem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:346:47 [INFO] [stdout] | [INFO] [stdout] 346 | let elem_transform = rco_expr(&*elem, true); [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `elem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:367:42 [INFO] [stdout] | [INFO] [stdout] 367 | let tup_transform = rco_expr(&*tup, true); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 367 - let tup_transform = rco_expr(&*tup, true); [INFO] [stdout] 367 + let tup_transform = rco_expr(tup, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 367 | let tup_transform = rco_expr(&**tup, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:114:27 [INFO] [stdout] | [INFO] [stdout] 114 | .find(|n| &ir::AtomValue::GlobalSymbol(global!(**n)) == &func.value) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 114 - .find(|n| &ir::AtomValue::GlobalSymbol(global!(**n)) == &func.value) [INFO] [stdout] 114 + .find(|n| ir::AtomValue::GlobalSymbol(global!(**n)) == func.value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:793:26 [INFO] [stdout] | [INFO] [stdout] 793 | const SPECIAL_FUNCTIONS: [( [INFO] [stdout] | __________________________^ [INFO] [stdout] 794 | | &'static str, [INFO] [stdout] 795 | | usize, [INFO] [stdout] 796 | | fn(Vec, Option>) -> Vec, [INFO] [stdout] 797 | | ); 1] = [(FN_GC_COLLECT, 1, |mut args, _dest| { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:936:38 [INFO] [stdout] | [INFO] [stdout] 936 | (POINTER_SIZE * (1 + offset as i64)) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `offset` [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: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:149:36 [INFO] [stdout] | [INFO] [stdout] 149 | generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 149 - generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] 149 + generate_for_predicate(cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 149 | generate_for_predicate(&**cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:162:30 [INFO] [stdout] | [INFO] [stdout] 162 | expr_to_atom(&**func, env), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:192:30 [INFO] [stdout] | [INFO] [stdout] 192 | expr_to_atom(&**func, env), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:264:39 [INFO] [stdout] | [INFO] [stdout] 264 | let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 264 - let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] 264 + let l_atom = expr_to_atom(left, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 264 | let l_atom = expr_to_atom(&**left, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:265:39 [INFO] [stdout] | [INFO] [stdout] 265 | let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 265 - let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] 265 + let r_atom = expr_to_atom(right, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 265 | let r_atom = expr_to_atom(&**right, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:275:37 [INFO] [stdout] | [INFO] [stdout] 275 | let atom = expr_to_atom(&*expr, env); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 275 - let atom = expr_to_atom(&*expr, env); [INFO] [stdout] 275 + let atom = expr_to_atom(expr, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 275 | let atom = expr_to_atom(&**expr, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:289:45 [INFO] [stdout] | [INFO] [stdout] 289 | ir::Expr::Call(expr_to_atom(&**func, env), args), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:322:36 [INFO] [stdout] | [INFO] [stdout] 322 | generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 322 - generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] 322 + generate_for_predicate(cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 322 | generate_for_predicate(&**cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:333:80 [INFO] [stdout] | [INFO] [stdout] 333 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 333 - if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] 333 + if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(idx, env).value { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 333 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&**idx, env).value { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:396:39 [INFO] [stdout] | [INFO] [stdout] 396 | let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 396 - let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] 396 + let l_atom = expr_to_atom(left, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 396 | let l_atom = expr_to_atom(&**left, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:397:39 [INFO] [stdout] | [INFO] [stdout] 397 | let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 397 - let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] 397 + let r_atom = expr_to_atom(right, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 397 | let r_atom = expr_to_atom(&**right, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:414:53 [INFO] [stdout] | [INFO] [stdout] 414 | ir::Expr::UnaryOp(*op, expr_to_atom(&*val, env)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 414 - ir::Expr::UnaryOp(*op, expr_to_atom(&*val, env)), [INFO] [stdout] 414 + ir::Expr::UnaryOp(*op, expr_to_atom(val, env)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 414 | ir::Expr::UnaryOp(*op, expr_to_atom(&**val, env)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:443:34 [INFO] [stdout] | [INFO] [stdout] 443 | expr_to_atom(&**func, env), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:459:80 [INFO] [stdout] | [INFO] [stdout] 459 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 459 - if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] 459 + if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(idx, env).value { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 459 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&**idx, env).value { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:466:55 [INFO] [stdout] | [INFO] [stdout] 466 | ir::Expr::TupleSubscript(expr_to_atom(&*tup, env), idx_i64), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 466 - ir::Expr::TupleSubscript(expr_to_atom(&*tup, env), idx_i64), [INFO] [stdout] 466 + ir::Expr::TupleSubscript(expr_to_atom(tup, env), idx_i64), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 466 | ir::Expr::TupleSubscript(expr_to_atom(&**tup, env), idx_i64), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec` [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:53:16 [INFO] [stdout] | [INFO] [stdout] 53 | es.into_iter().for_each(shortcircuit_expr); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/inject_allocations.rs:139:12 [INFO] [stdout] | [INFO] [stdout] 139 | elems: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - elems: &mut Vec, [INFO] [stdout] 139 + elems: &mut [Expr], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/compiler/src/passes/tupleize_excess_args.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | /// function signatures) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/compiler/src/passes/declosurize_calls.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | /// never get added) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/compiler/src/passes/optimize_fallthrough.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | /// opportunities will be lost) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/disambiguate_subscript.rs:176:71 [INFO] [stdout] | [INFO] [stdout] 176 | fn simplify_subscript_assign_for_tuple(s: &mut Statement, elem_types: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 176 ~ fn simplify_subscript_assign_for_tuple(s: &mut Statement, elem_types: &[ValueType]) { [INFO] [stdout] 177 | match s { [INFO] [stdout] ... [INFO] [stdout] 201 | complex.container.clone(), [INFO] [stdout] 202 ~ Some(ValueType::TupleType(elem_types.to_owned())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> crates/compiler/src/passes/resolve_width.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | let old_instrs = std::mem::replace(&mut b.instrs, vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut b.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/compiler/src/pipeline.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 27 | / let final_x86 = self.x86_passes.into_iter().fold(initial_x86, |p, pass| { [INFO] [stdout] 28 | | println!("Pass: {pass:?}"); [INFO] [stdout] 29 | | pass.run_pass(p) [INFO] [stdout] 30 | | }); [INFO] [stdout] | |___________- unnecessary `let` binding [INFO] [stdout] 31 | [INFO] [stdout] 32 | final_x86 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 27 ~ [INFO] [stdout] 28 | [INFO] [stdout] 29 ~ self.x86_passes.into_iter().fold(initial_x86, |p, pass| { [INFO] [stdout] 30 + println!("Pass: {pass:?}"); [INFO] [stdout] 31 + pass.run_pass(p) [INFO] [stdout] 32 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/compiler/src/syntax_trees/ast.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / pub enum Statement { [INFO] [stdout] 25 | | Assign(AssignDest, Expr, Option), [INFO] [stdout] | | ------------------------------------------------- the largest variant contains at least 656 bytes [INFO] [stdout] 26 | | Expr(Expr), [INFO] [stdout] 27 | | Conditional(Expr, Vec, Vec), [INFO] [stdout] | | ------------------------------------------------- the second-largest variant contains at least 256 bytes [INFO] [stdout] 28 | | WhileLoop(Expr, Vec), [INFO] [stdout] 29 | | Return(Expr), [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ the entire enum is at least 656 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 25 - Assign(AssignDest, Expr, Option), [INFO] [stdout] 25 + Assign(Box>, Expr, Option), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenValue<'_>` which implements the `Copy` trait [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/parse_tree.rs:279:19 [INFO] [stdout] | [INFO] [stdout] 279 | let got = (tokens [INFO] [stdout] | ___________________^ [INFO] [stdout] 280 | | .get(e.location) [INFO] [stdout] 281 | | .unwrap_or(&TokenValue::Identifier("===EOF==="))) [INFO] [stdout] 282 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 279 ~ let got = *(tokens [INFO] [stdout] 280 + .get(e.location) [INFO] [stdout] 281 ~ .unwrap_or(&TokenValue::Identifier("===EOF==="))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/to_ast.rs:227:15 [INFO] [stdout] | [INFO] [stdout] 227 | while let Some(_) = pt_iter.peek() { [INFO] [stdout] | ----------^^^^^^^----------------- help: try: `while pt_iter.peek().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `LocatedSpan<&str>` which implements the `Copy` trait [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:179:19 [INFO] [stdout] | [INFO] [stdout] 179 | let int_val = token_span [INFO] [stdout] | ___________________^ [INFO] [stdout] 180 | | .clone() [INFO] [stdout] | |________________^ help: try removing the `clone` call: `token_span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `LocatedSpan<&str>` which implements the `Copy` trait [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:205:43 [INFO] [stdout] | [INFO] [stdout] 205 | token: TokenValue::Identifier(id_span.clone().into_fragment()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `id_span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:240:17 [INFO] [stdout] | [INFO] [stdout] 240 | contents.into_fragment().chars().nth(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `contents.into_fragment().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 250 | / let tok = alt(( [INFO] [stdout] 251 | | newline, [INFO] [stdout] 252 | | keyword_parser, [INFO] [stdout] 253 | | int_parser, [INFO] [stdout] ... | [INFO] [stdout] 258 | | )) [INFO] [stdout] 259 | | .parse(rem); [INFO] [stdout] | |________________- unnecessary `let` binding [INFO] [stdout] 260 | [INFO] [stdout] 261 | tok [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 250 ~ [INFO] [stdout] 251 | [INFO] [stdout] 252 ~ alt(( [INFO] [stdout] 253 + newline, [INFO] [stdout] 254 + keyword_parser, [INFO] [stdout] 255 + int_parser, [INFO] [stdout] 256 + string_literal_parser, [INFO] [stdout] 257 + char_literal_parser, [INFO] [stdout] 258 + punctuation_parser, [INFO] [stdout] 259 + id_parser, [INFO] [stdout] 260 + )) [INFO] [stdout] 261 + .parse(rem) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/mod.rs:18:53 [INFO] [stdout] | [INFO] [stdout] 18 | let tokens = tokenizer::tokenize(input).map_err(|e| ParserError::Tokenizer(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ParserError::Tokenizer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/compiler/src/syntax_trees/x86.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | / match self { [INFO] [stdout] 206 | | ah | bh | ch | dh => true, [INFO] [stdout] 207 | | _ => false, [INFO] [stdout] 208 | | } [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] 205 - match self { [INFO] [stdout] 206 - ah | bh | ch | dh => true, [INFO] [stdout] 207 - _ => false, [INFO] [stdout] 208 - } [INFO] [stdout] 205 + matches!(self, ah | bh | ch | dh) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | / elems [INFO] [stdout] 99 | | .get(0) [INFO] [stdout] | |_______________________________^ help: try: `elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `l_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:117:71 [INFO] [stdout] | [INFO] [stdout] 117 | if let Some(ValueType::FunctionType(l_args, l_ret)) = l_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `l_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `l_args.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:118:60 [INFO] [stdout] | [INFO] [stdout] 118 | && let Some(ValueType::TupleType(_)) = l_args.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `l_args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `r_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:119:75 [INFO] [stdout] | [INFO] [stdout] 119 | && let Some(ValueType::FunctionType(r_args, r_ret)) = r_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `r_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `r_args.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:120:60 [INFO] [stdout] | [INFO] [stdout] 120 | && let Some(ValueType::TupleType(_)) = r_args.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `r_args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `clos_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:130:77 [INFO] [stdout] | [INFO] [stdout] 130 | if let Some(ValueType::FunctionType(clos_args, clos_ret)) = clos_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `clos_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `clos_args.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:131:60 [INFO] [stdout] | [INFO] [stdout] 131 | && let Some(ValueType::TupleType(_)) = clos_args.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `clos_args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:157:1 [INFO] [stdout] | [INFO] [stdout] 157 | impl Into for Value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: replace the `Into` implementation with `From` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:171:1 [INFO] [stdout] | [INFO] [stdout] 171 | impl Into for Value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: replace the `Into` implementation with `From` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:184:1 [INFO] [stdout] | [INFO] [stdout] 184 | impl Into for &Value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: replace the `Into` implementation with `From<&syntax_trees::shared::Value>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/compiler/src/type_check.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 20 | / let result_type = op.type_of(&l_type, &r_type).expect( [INFO] [stdout] 21 | | format!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}") [INFO] [stdout] 22 | | .as_str(), [INFO] [stdout] 23 | | ); [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 24 | result_type [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 20 ~ [INFO] [stdout] 21 ~ op.type_of(&l_type, &r_type).expect( [INFO] [stdout] 22 + format!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}") [INFO] [stdout] 23 + .as_str(), [INFO] [stdout] 24 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/type_check.rs:20:64 [INFO] [stdout] | [INFO] [stdout] 20 | let result_type = op.type_of(&l_type, &r_type).expect( [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 21 | | format!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}") [INFO] [stdout] 22 | | .as_str(), [INFO] [stdout] 23 | | ); [INFO] [stdout] | |_________________^ help: try: `unwrap_or_else(|| panic!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/type_check.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | .expect(format!("Unknown Identifier: {id:?}").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown Identifier: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `closure_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/type_check.rs:66:81 [INFO] [stdout] | [INFO] [stdout] 66 | if let Some(ValueType::FunctionType(arg_types, ret_type)) = closure_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `closure_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map_or(None, ..)` on an `Option` value [INFO] [stdout] --> crates/compiler/src/type_check.rs:129:42 [INFO] [stdout] | [INFO] [stdout] 129 | let expected_elem_type = expected_type.clone().map_or(None, |t| { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 130 | | if let ValueType::ArrayType(e) = t { [INFO] [stdout] 131 | | Some(*e) [INFO] [stdout] 132 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 135 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_or_none [INFO] [stdout] = note: `#[warn(clippy::option_map_or_none)]` on by default [INFO] [stdout] help: consider using `and_then` [INFO] [stdout] | [INFO] [stdout] 129 ~ let expected_elem_type = expected_type.clone().and_then(|t| { [INFO] [stdout] 130 + if let ValueType::ArrayType(e) = t { [INFO] [stdout] 131 + Some(*e) [INFO] [stdout] 132 + } else { [INFO] [stdout] 133 + None [INFO] [stdout] 134 + } [INFO] [stdout] 135 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/type_check.rs:197:22 [INFO] [stdout] | [INFO] [stdout] 197 | .expect(format!("Unknown closure id: {id:?}").as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown closure id: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `param_types.get(0)` [INFO] [stdout] --> crates/compiler/src/type_check.rs:200:72 [INFO] [stdout] | [INFO] [stdout] 200 | if let Some(ValueType::TupleType(capture_types)) = param_types.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `param_types.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `exprs.get(0)` [INFO] [stdout] --> crates/compiler/src/type_check.rs:282:21 [INFO] [stdout] | [INFO] [stdout] 282 | / exprs [INFO] [stdout] 283 | | .get(0) [INFO] [stdout] | |_______________________________^ help: try: `exprs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/type_check.rs:310:11 [INFO] [stdout] | [INFO] [stdout] 310 | args: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 310 - args: &mut Vec, [INFO] [stdout] 310 + args: &mut [ast::Expr], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/compiler/src/utils.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn x86_block_adj_graph<'a>(blocks: &'a [Block]) -> DiGraph<&'a Block, JumpType> { [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] 12 - pub fn x86_block_adj_graph<'a>(blocks: &'a [Block]) -> DiGraph<&'a Block, JumpType> { [INFO] [stdout] 12 + pub fn x86_block_adj_graph(blocks: &[Block]) -> DiGraph<&Block, JumpType> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | const SUFFIX_MAP: LazyLock> = LazyLock::new(|| { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:105:45 [INFO] [stdout] | [INFO] [stdout] 105 | let width_suffix = width.map_or("", |w| SUFFIX_MAP[&w]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:111:28 [INFO] [stdout] | [INFO] [stdout] 111 | I::jmp_tail(..) => format!("jmp"), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"jmp".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:113:34 [INFO] [stdout] | [INFO] [stdout] 113 | Some(Width::Quad) => format!("cqto"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"cqto".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:114:36 [INFO] [stdout] | [INFO] [stdout] 114 | Some(Width::Double) => format!("cdtq"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"cdtq".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:115:34 [INFO] [stdout] | [INFO] [stdout] 115 | Some(Width::Word) => format!("cwtd"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"cwtd".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:119:33 [INFO] [stdout] | [INFO] [stdout] 119 | format!("movz{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:119:55 [INFO] [stdout] | [INFO] [stdout] 119 | format!("movz{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:122:33 [INFO] [stdout] | [INFO] [stdout] 122 | format!("movs{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:122:55 [INFO] [stdout] | [INFO] [stdout] 122 | format!("movs{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking test-support v0.1.0 (/opt/rustwide/workdir/crates/test-support) [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | .expect(format!("Error on reading input file: `{}`", args.input.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on reading input file: `{}`", args.input.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:57:14 [INFO] [stdout] | [INFO] [stdout] 57 | .expect(format!("Error on writing output file: `{}`", args.output.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on writing output file: `{}`", args.output.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .expect(format!("Error on writing output file: {}`", args.output.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on writing output file: {}`", args.output.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .expect(format!("Error on writing output file: `{}`", args.output.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on writing output file: `{}`", args.output.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:19:49 [INFO] [stdout] | [INFO] [stdout] 19 | if let Some(l_val) = interpret_expr(&*left, inputs, outputs, val_env, func_env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 19 - if let Some(l_val) = interpret_expr(&*left, inputs, outputs, val_env, func_env) [INFO] [stdout] 19 + if let Some(l_val) = interpret_expr(left, inputs, outputs, val_env, func_env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 19 | if let Some(l_val) = interpret_expr(&**left, inputs, outputs, val_env, func_env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:20:53 [INFO] [stdout] | [INFO] [stdout] 20 | && let Some(r_val) = interpret_expr(&*right, inputs, outputs, val_env, func_env) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 20 - && let Some(r_val) = interpret_expr(&*right, inputs, outputs, val_env, func_env) [INFO] [stdout] 20 + && let Some(r_val) = interpret_expr(right, inputs, outputs, val_env, func_env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 20 | && let Some(r_val) = interpret_expr(&**right, inputs, outputs, val_env, func_env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:28:45 [INFO] [stdout] | [INFO] [stdout] 28 | if let Some(v) = interpret_expr(&*expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 28 - if let Some(v) = interpret_expr(&*expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] 28 + if let Some(v) = interpret_expr(expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 28 | if let Some(v) = interpret_expr(&**expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:57:47 [INFO] [stdout] | [INFO] [stdout] 57 | let func_val = interpret_expr(&**func, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:93:18 [INFO] [stdout] | [INFO] [stdout] 93 | .expect(format!("Unknown variable name: {id:?}").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown variable name: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:99:32 [INFO] [stdout] | [INFO] [stdout] 99 | interpret_expr(&*cond, inputs, outputs, val_env, func_env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 99 - interpret_expr(&*cond, inputs, outputs, val_env, func_env) [INFO] [stdout] 99 + interpret_expr(cond, inputs, outputs, val_env, func_env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 99 | interpret_expr(&**cond, inputs, outputs, val_env, func_env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:132:30 [INFO] [stdout] | [INFO] [stdout] 132 | fn interpret_statement_chain<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 133 | statements: &mut dyn Iterator, [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] 132 ~ fn interpret_statement_chain( [INFO] [stdout] 133 ~ statements: &mut dyn Iterator, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | return interpret_statement_chain(statements, inputs, outputs, val_env, func_env); [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] 147 ~ interpret_statement_chain(statements, inputs, outputs, val_env, func_env) [INFO] [stdout] 148 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | return interpret_statement_chain(statements, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 168 ~ interpret_statement_chain(statements, inputs, outputs, val_env, func_env) [INFO] [stdout] 169 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | / return interpret_statement_chain( [INFO] [stdout] 176 | | &mut exec_next.into_iter().chain(statements), [INFO] [stdout] 177 | | inputs, [INFO] [stdout] 178 | | outputs, [INFO] [stdout] 179 | | val_env, [INFO] [stdout] 180 | | func_env, [INFO] [stdout] 181 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 ~ interpret_statement_chain( [INFO] [stdout] 176 + &mut exec_next.into_iter().chain(statements), [INFO] [stdout] 177 + inputs, [INFO] [stdout] 178 + outputs, [INFO] [stdout] 179 + val_env, [INFO] [stdout] 180 + func_env, [INFO] [stdout] 181 ~ ) [INFO] [stdout] 182 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | return interpret_statement_chain(statements, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 ~ interpret_statement_chain(statements, inputs, outputs, val_env, func_env) [INFO] [stdout] 198 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:201:13 [INFO] [stdout] | [INFO] [stdout] 201 | return interpret_expr(&e, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 201 ~ interpret_expr(&e, inputs, outputs, val_env, func_env) [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | / if s.is_none() { [INFO] [stdout] 141 | | return None; [INFO] [stdout] 142 | | } [INFO] [stdout] | |_____^ help: replace it with: `s?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:171:41 [INFO] [stdout] | [INFO] [stdout] 171 | let result = interpret_expr(&cond, inputs, outputs, val_env, func_env).coerce_bool(); [INFO] [stdout] | ^^^^^ help: change this to: `cond` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:176:32 [INFO] [stdout] | [INFO] [stdout] 176 | &mut exec_next.into_iter().chain(statements), [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:185:34 [INFO] [stdout] | [INFO] [stdout] 185 | while interpret_expr(&cond, inputs, outputs, val_env, func_env).expect_bool() { [INFO] [stdout] | ^^^^^ help: change this to: `cond` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:201:35 [INFO] [stdout] | [INFO] [stdout] 201 | return interpret_expr(&e, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^ help: change this to: `e` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:18:62 [INFO] [stdout] | [INFO] [stdout] 18 | fn interpret_atom(atom: &Atom, env: &mut ValueEnv, func_env: &Vec) -> Value { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - fn interpret_atom(atom: &Atom, env: &mut ValueEnv, func_env: &Vec) -> Value { [INFO] [stdout] 18 + fn interpret_atom(atom: &Atom, env: &mut ValueEnv, func_env: &[Function]) -> Value { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:109:21 [INFO] [stdout] | [INFO] [stdout] 109 | return interpret_func(func, arg_vals, inputs, outputs, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 109 - return interpret_func(func, arg_vals, inputs, outputs, func_env); [INFO] [stdout] 109 + interpret_func(func, arg_vals, inputs, outputs, func_env) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:56:38 [INFO] [stdout] | [INFO] [stdout] 56 | let val = interpret_atom(&atom, val_env, func_env); [INFO] [stdout] | ^^^^^ help: change this to: `atom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:60:40 [INFO] [stdout] | [INFO] [stdout] 60 | let l_val = interpret_atom(&l_atom, val_env, func_env); [INFO] [stdout] | ^^^^^^^ help: change this to: `l_atom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:61:40 [INFO] [stdout] | [INFO] [stdout] 61 | let r_val = interpret_atom(&r_atom, val_env, func_env); [INFO] [stdout] | ^^^^^^^ help: change this to: `r_atom` [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: length comparison to zero [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:79:20 [INFO] [stdout] | [INFO] [stdout] 79 | if args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:19:49 [INFO] [stdout] | [INFO] [stdout] 19 | if let Some(l_val) = interpret_expr(&*left, inputs, outputs, val_env, func_env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 19 - if let Some(l_val) = interpret_expr(&*left, inputs, outputs, val_env, func_env) [INFO] [stdout] 19 + if let Some(l_val) = interpret_expr(left, inputs, outputs, val_env, func_env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 19 | if let Some(l_val) = interpret_expr(&**left, inputs, outputs, val_env, func_env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:258:13 [INFO] [stdout] | [INFO] [stdout] 258 | Some(Continuation::Exit) | _ => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:20:53 [INFO] [stdout] | [INFO] [stdout] 20 | && let Some(r_val) = interpret_expr(&*right, inputs, outputs, val_env, func_env) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 20 - && let Some(r_val) = interpret_expr(&*right, inputs, outputs, val_env, func_env) [INFO] [stdout] 20 + && let Some(r_val) = interpret_expr(right, inputs, outputs, val_env, func_env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 20 | && let Some(r_val) = interpret_expr(&**right, inputs, outputs, val_env, func_env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:28:45 [INFO] [stdout] | [INFO] [stdout] 28 | if let Some(v) = interpret_expr(&*expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 28 - if let Some(v) = interpret_expr(&*expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] 28 + if let Some(v) = interpret_expr(expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 28 | if let Some(v) = interpret_expr(&**expr, inputs, outputs, val_env, func_env) { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:57:47 [INFO] [stdout] | [INFO] [stdout] 57 | let func_val = interpret_expr(&**func, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:93:18 [INFO] [stdout] | [INFO] [stdout] 93 | .expect(format!("Unknown variable name: {id:?}").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown variable name: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:99:32 [INFO] [stdout] | [INFO] [stdout] 99 | interpret_expr(&*cond, inputs, outputs, val_env, func_env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 99 - interpret_expr(&*cond, inputs, outputs, val_env, func_env) [INFO] [stdout] 99 + interpret_expr(cond, inputs, outputs, val_env, func_env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 99 | interpret_expr(&**cond, inputs, outputs, val_env, func_env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:132:30 [INFO] [stdout] | [INFO] [stdout] 132 | fn interpret_statement_chain<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 133 | statements: &mut dyn Iterator, [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] 132 ~ fn interpret_statement_chain( [INFO] [stdout] 133 ~ statements: &mut dyn Iterator, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | return interpret_statement_chain(statements, inputs, outputs, val_env, func_env); [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] 147 ~ interpret_statement_chain(statements, inputs, outputs, val_env, func_env) [INFO] [stdout] 148 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | return interpret_statement_chain(statements, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 168 ~ interpret_statement_chain(statements, inputs, outputs, val_env, func_env) [INFO] [stdout] 169 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | / return interpret_statement_chain( [INFO] [stdout] 176 | | &mut exec_next.into_iter().chain(statements), [INFO] [stdout] 177 | | inputs, [INFO] [stdout] 178 | | outputs, [INFO] [stdout] 179 | | val_env, [INFO] [stdout] 180 | | func_env, [INFO] [stdout] 181 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 ~ interpret_statement_chain( [INFO] [stdout] 176 + &mut exec_next.into_iter().chain(statements), [INFO] [stdout] 177 + inputs, [INFO] [stdout] 178 + outputs, [INFO] [stdout] 179 + val_env, [INFO] [stdout] 180 + func_env, [INFO] [stdout] 181 ~ ) [INFO] [stdout] 182 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | return interpret_statement_chain(statements, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 ~ interpret_statement_chain(statements, inputs, outputs, val_env, func_env) [INFO] [stdout] 198 | } [INFO] [stdout] ... [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:201:13 [INFO] [stdout] | [INFO] [stdout] 201 | return interpret_expr(&e, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 201 ~ interpret_expr(&e, inputs, outputs, val_env, func_env) [INFO] [stdout] 202 | } [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | / if s.is_none() { [INFO] [stdout] 141 | | return None; [INFO] [stdout] 142 | | } [INFO] [stdout] | |_____^ help: replace it with: `s?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:171:41 [INFO] [stdout] | [INFO] [stdout] 171 | let result = interpret_expr(&cond, inputs, outputs, val_env, func_env).coerce_bool(); [INFO] [stdout] | ^^^^^ help: change this to: `cond` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:176:32 [INFO] [stdout] | [INFO] [stdout] 176 | &mut exec_next.into_iter().chain(statements), [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:185:34 [INFO] [stdout] | [INFO] [stdout] 185 | while interpret_expr(&cond, inputs, outputs, val_env, func_env).expect_bool() { [INFO] [stdout] | ^^^^^ help: change this to: `cond` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ast_interpreter.rs:201:35 [INFO] [stdout] | [INFO] [stdout] 201 | return interpret_expr(&e, inputs, outputs, val_env, func_env); [INFO] [stdout] | ^^ help: change this to: `e` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:18:62 [INFO] [stdout] | [INFO] [stdout] 18 | fn interpret_atom(atom: &Atom, env: &mut ValueEnv, func_env: &Vec) -> Value { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - fn interpret_atom(atom: &Atom, env: &mut ValueEnv, func_env: &Vec) -> Value { [INFO] [stdout] 18 + fn interpret_atom(atom: &Atom, env: &mut ValueEnv, func_env: &[Function]) -> Value { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:109:21 [INFO] [stdout] | [INFO] [stdout] 109 | return interpret_func(func, arg_vals, inputs, outputs, func_env); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 109 - return interpret_func(func, arg_vals, inputs, outputs, func_env); [INFO] [stdout] 109 + interpret_func(func, arg_vals, inputs, outputs, func_env) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:56:38 [INFO] [stdout] | [INFO] [stdout] 56 | let val = interpret_atom(&atom, val_env, func_env); [INFO] [stdout] | ^^^^^ help: change this to: `atom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:60:40 [INFO] [stdout] | [INFO] [stdout] 60 | let l_val = interpret_atom(&l_atom, val_env, func_env); [INFO] [stdout] | ^^^^^^^ help: change this to: `l_atom` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:61:40 [INFO] [stdout] | [INFO] [stdout] 61 | let r_val = interpret_atom(&r_atom, val_env, func_env); [INFO] [stdout] | ^^^^^^^ help: change this to: `r_atom` [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: length comparison to zero [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:79:20 [INFO] [stdout] | [INFO] [stdout] 79 | if args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> crates/test-support/src/ir_interpreter.rs:258:13 [INFO] [stdout] | [INFO] [stdout] 258 | Some(Continuation::Exit) | _ => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:157:18 [INFO] [stdout] | [INFO] [stdout] 157 | .expect(format!("Unknown x86var identifier: {id:?}").as_str()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown x86var identifier: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:157:18 [INFO] [stdout] | [INFO] [stdout] 157 | .expect(format!("Unknown x86var identifier: {id:?}").as_str()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown x86var identifier: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:220:17 [INFO] [stdout] | [INFO] [stdout] 220 | !(self.eflags.negative != self.eflags.overflow) && !self.eflags.zero [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.eflags.negative == self.eflags.overflow)` [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 boolean expression can be simplified [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:222:42 [INFO] [stdout] | [INFO] [stdout] 222 | Comparison::GreaterEquals => !(self.eflags.negative != self.eflags.overflow), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.eflags.negative == self.eflags.overflow)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 243 - return true; [INFO] [stdout] 243 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:260:9 [INFO] [stdout] | [INFO] [stdout] 260 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 260 - return true; [INFO] [stdout] 260 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 268 - return true; [INFO] [stdout] 268 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 271 - return true; [INFO] [stdout] 271 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 274 - return true; [INFO] [stdout] 274 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:292:9 [INFO] [stdout] | [INFO] [stdout] 292 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 292 - return true; [INFO] [stdout] 292 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:220:17 [INFO] [stdout] | [INFO] [stdout] 220 | !(self.eflags.negative != self.eflags.overflow) && !self.eflags.zero [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.eflags.negative == self.eflags.overflow)` [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 boolean expression can be simplified [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:222:42 [INFO] [stdout] | [INFO] [stdout] 222 | Comparison::GreaterEquals => !(self.eflags.negative != self.eflags.overflow), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.eflags.negative == self.eflags.overflow)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 311 - return true; [INFO] [stdout] 311 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:367:9 [INFO] [stdout] | [INFO] [stdout] 367 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 367 - return true; [INFO] [stdout] 367 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:370:9 [INFO] [stdout] | [INFO] [stdout] 370 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 370 - return false; [INFO] [stdout] 370 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:269:41 [INFO] [stdout] | [INFO] [stdout] 269 | } else if label == FN_GC_INITIALIZE { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 270 | | // Don't need to do anything in sim [INFO] [stdout] 271 | | return true; [INFO] [stdout] 272 | | } else if label == FN_GC_COLLECT { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:272:38 [INFO] [stdout] | [INFO] [stdout] 272 | } else if label == FN_GC_COLLECT { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 273 | | // Don't need to do anything in sim [INFO] [stdout] 274 | | return true; [INFO] [stdout] 275 | | } else if label == FN_SUBSCRIPT_ARRAY { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 243 - return true; [INFO] [stdout] 243 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:260:9 [INFO] [stdout] | [INFO] [stdout] 260 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 260 - return true; [INFO] [stdout] 260 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 268 - return true; [INFO] [stdout] 268 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 271 - return true; [INFO] [stdout] 271 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 274 - return true; [INFO] [stdout] 274 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:292:9 [INFO] [stdout] | [INFO] [stdout] 292 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 292 - return true; [INFO] [stdout] 292 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 311 - return true; [INFO] [stdout] 311 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:367:9 [INFO] [stdout] | [INFO] [stdout] 367 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 367 - return true; [INFO] [stdout] 367 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:370:9 [INFO] [stdout] | [INFO] [stdout] 370 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 370 - return false; [INFO] [stdout] 370 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:269:41 [INFO] [stdout] | [INFO] [stdout] 269 | } else if label == FN_GC_INITIALIZE { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 270 | | // Don't need to do anything in sim [INFO] [stdout] 271 | | return true; [INFO] [stdout] 272 | | } else if label == FN_GC_COLLECT { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/test-support/src/x86_interpreter.rs:272:38 [INFO] [stdout] | [INFO] [stdout] 272 | } else if label == FN_GC_COLLECT { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 273 | | // Don't need to do anything in sim [INFO] [stdout] 274 | | return true; [INFO] [stdout] 275 | | } else if label == FN_SUBSCRIPT_ARRAY { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | .expect(format!("Error on reading input file: `{}`", args.input.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on reading input file: `{}`", args.input.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:57:14 [INFO] [stdout] | [INFO] [stdout] 57 | .expect(format!("Error on writing output file: `{}`", args.output.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on writing output file: `{}`", args.output.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .expect(format!("Error on writing output file: {}`", args.output.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on writing output file: {}`", args.output.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/main.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .expect(format!("Error on writing output file: `{}`", args.output.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error on writing output file: `{}`", args.output.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:794:6 [INFO] [stdout] | [INFO] [stdout] 794 | &'static str, [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/constant_folding.rs:226:39 [INFO] [stdout] | [INFO] [stdout] 226 | *e = Constant(op.eval(&val)); [INFO] [stdout] | ^^^^ help: change this to: `val` [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: manual implementation of `Option::map` [INFO] [stdout] --> crates/compiler/src/passes/constant_folding.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | / if let Some(val) = v { [INFO] [stdout] 308 | | Some((k, val)) [INFO] [stdout] 309 | | } else { [INFO] [stdout] 310 | | None [INFO] [stdout] 311 | | } [INFO] [stdout] | |_____________^ help: try: `v.map(|val| (k, val))` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/constant_folding.rs:707:48 [INFO] [stdout] | [INFO] [stdout] 707 | check_statement_invariants(&s); [INFO] [stdout] | ^^ help: change this to: `s` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/constant_folding.rs:748:14 [INFO] [stdout] | [INFO] [stdout] 748 | .map(|f| &f.body) [INFO] [stdout] | ______________^ [INFO] [stdout] 749 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|f| &f.body)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> crates/compiler/src/passes/patch_instructions.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / let mut new_instrs = vec![]; [INFO] [stdout] 44 | | // Reserve for worst case because why not [INFO] [stdout] 45 | | new_instrs.reserve(instrs.len() * 2); [INFO] [stdout] | |_________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut new_instrs = Vec::with_capacity(instrs.len() * 2);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/patch_instructions.rs:163:14 [INFO] [stdout] | [INFO] [stdout] 163 | .map(|x| &x.instrs) [INFO] [stdout] | ______________^ [INFO] [stdout] 164 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| &x.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/patch_instructions.rs:161:14 [INFO] [stdout] | [INFO] [stdout] 161 | .map(|f| &f.blocks) [INFO] [stdout] | ______________^ [INFO] [stdout] 162 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|f| &f.blocks)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/compiler/src/passes/patch_instructions.rs:663:34 [INFO] [stdout] | [INFO] [stdout] 663 | inputs: (1..=15).map(|i| Value::I64(i)).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Value::I64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/prelude_conclusion.rs:139:24 [INFO] [stdout] | [INFO] [stdout] 139 | callee_saved_used: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - callee_saved_used: &Vec, [INFO] [stdout] 139 + callee_saved_used: &[Register], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:38:52 [INFO] [stdout] | [INFO] [stdout] 38 | let instrs = alive_after_instrs.iter().map(|(b, _)| &b.instrs).flatten(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(b, _)| &b.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | let instrs = alive_after_instrs.iter().map(|(b, _)| &b.instrs).flatten(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `alive_after_instrs.keys().map(|b| &b.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:42:18 [INFO] [stdout] | [INFO] [stdout] 42 | .map(|(_, v_hashset)| v_hashset) [INFO] [stdout] | __________________^ [INFO] [stdout] 43 | | .flatten(); [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(_, v_hashset)| v_hashset)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:40:32 [INFO] [stdout] | [INFO] [stdout] 40 | let alive_afters = alive_after_instrs [INFO] [stdout] | ________________________________^ [INFO] [stdout] 41 | | .iter() [INFO] [stdout] 42 | | .map(|(_, v_hashset)| v_hashset) [INFO] [stdout] | |________________________________________________^ help: try: `alive_after_instrs.values()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:216:83 [INFO] [stdout] | [INFO] [stdout] 216 | matches!(loc, Location::Reg(r) if CALLEE_SAVED_REGISTERS.contains(&r) || CALLER_SAVED_REGISTERS.contains(&r)) [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:216:122 [INFO] [stdout] | [INFO] [stdout] 216 | matches!(loc, Location::Reg(r) if CALLEE_SAVED_REGISTERS.contains(&r) || CALLER_SAVED_REGISTERS.contains(&r)) [INFO] [stdout] | ^^ help: change this to: `r` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:299:24 [INFO] [stdout] | [INFO] [stdout] 299 | all_locations: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 299 - all_locations: &Vec, [INFO] [stdout] 299 + all_locations: &[Location], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/dataflow_analysis.rs:358:10 [INFO] [stdout] | [INFO] [stdout] 358 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:54:29 [INFO] [stdout] | [INFO] [stdout] 54 | pub fn color_location_graph<'a>(dataflow: &'a DataflowAnalysis) -> HashMap<&'a Location, i32> { [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] 54 - pub fn color_location_graph<'a>(dataflow: &'a DataflowAnalysis) -> HashMap<&'a Location, i32> { [INFO] [stdout] 54 + pub fn color_location_graph(dataflow: &DataflowAnalysis) -> HashMap<&Location, i32> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(&color1) = color_map.get(&node_idx1) { [INFO] [stdout] 76 | | if let Some(set) = unavailable_colors_map.get_mut(&node_idx2) { [INFO] [stdout] 77 | | set.insert(color1); [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [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] 75 ~ if let Some(&color1) = color_map.get(&node_idx1) [INFO] [stdout] 76 ~ && let Some(set) = unavailable_colors_map.get_mut(&node_idx2) { [INFO] [stdout] 77 | set.insert(color1); [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / if let Some(&color2) = color_map.get(&node_idx2) { [INFO] [stdout] 81 | | if let Some(set) = unavailable_colors_map.get_mut(&node_idx1) { [INFO] [stdout] 82 | | set.insert(color2); [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [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] 80 ~ if let Some(&color2) = color_map.get(&node_idx2) [INFO] [stdout] 81 ~ && let Some(set) = unavailable_colors_map.get_mut(&node_idx1) { [INFO] [stdout] 82 | set.insert(color2); [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:133:73 [INFO] [stdout] | [INFO] [stdout] 133 | let bsat = BiasedSaturation::calculate(*idx, set, move_rel, &color_map, use_count); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `color_map` [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/graph_coloring.rs:199:1 [INFO] [stdout] | [INFO] [stdout] 199 | / impl PartialOrd for BiasedSaturation { [INFO] [stdout] 200 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 | | if self.num_unavail == other.num_unavail { [INFO] [stdout] 202 | | match ( [INFO] [stdout] ... | [INFO] [stdout] 216 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 200 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 - if self.num_unavail == other.num_unavail { [INFO] [stdout] 202 - match ( [INFO] [stdout] 203 - self.avail_move_related_node_idx, [INFO] [stdout] 204 - other.avail_move_related_node_idx, [INFO] [stdout] 205 - ) { [INFO] [stdout] 206 - (Some(_), Some(_)) | (None, None) => { [INFO] [stdout] 207 - self.loc_use_count.partial_cmp(&other.loc_use_count) [INFO] [stdout] 208 - } [INFO] [stdout] 209 - (Some(_), None) => Some(std::cmp::Ordering::Greater), [INFO] [stdout] 210 - (None, Some(_)) => Some(std::cmp::Ordering::Less), [INFO] [stdout] 211 - } [INFO] [stdout] 212 - } else { [INFO] [stdout] 213 - Some(self.num_unavail.cmp(&other.num_unavail)) [INFO] [stdout] 214 - } [INFO] [stdout] 215 - } [INFO] [stdout] 200 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:56:52 [INFO] [stdout] | [INFO] [stdout] 56 | let liveness = DataflowAnalysis::from_function(&f); [INFO] [stdout] | ^^ help: change this to: `f` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:139:26 [INFO] [stdout] | [INFO] [stdout] 139 | fn run_for_block(instrs: &mut Vec, id_to_storage: &HashMap) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - fn run_for_block(instrs: &mut Vec, id_to_storage: &HashMap) { [INFO] [stdout] 139 + fn run_for_block(instrs: &mut [Instr], id_to_storage: &HashMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:185:21 [INFO] [stdout] | [INFO] [stdout] 185 | fn allocate_storage<'a>(dataflow: &'a DataflowAnalysis, types: &TypeEnv) -> AllocateStorageResult { [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] 185 - fn allocate_storage<'a>(dataflow: &'a DataflowAnalysis, types: &TypeEnv) -> AllocateStorageResult { [INFO] [stdout] 185 + fn allocate_storage(dataflow: &DataflowAnalysis, types: &TypeEnv) -> AllocateStorageResult { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:312:14 [INFO] [stdout] | [INFO] [stdout] 312 | .map(|x| &x.instrs) [INFO] [stdout] | ______________^ [INFO] [stdout] 313 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| &x.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:310:14 [INFO] [stdout] | [INFO] [stdout] 310 | .map(|f| &f.blocks) [INFO] [stdout] | ______________^ [INFO] [stdout] 311 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|f| &f.blocks)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/compiler/src/passes/register_allocation/mod.rs:751:29 [INFO] [stdout] | [INFO] [stdout] 751 | inputs: (0..23).map(|i| Value::I64(i)).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Value::I64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:50:38 [INFO] [stdout] | [INFO] [stdout] 50 | let transform = rco_expr(&expr, false); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:69:38 [INFO] [stdout] | [INFO] [stdout] 69 | let transform = rco_expr(&expr, false); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:129:38 [INFO] [stdout] | [INFO] [stdout] 129 | let transform = rco_expr(&expr, false); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [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: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:150:43 [INFO] [stdout] | [INFO] [stdout] 150 | let left_transform = rco_expr(&*left, true); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 150 - let left_transform = rco_expr(&*left, true); [INFO] [stdout] 150 + let left_transform = rco_expr(left, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 150 | let left_transform = rco_expr(&**left, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:151:44 [INFO] [stdout] | [INFO] [stdout] 151 | let right_transform = rco_expr(&*right, true); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 151 - let right_transform = rco_expr(&*right, true); [INFO] [stdout] 151 + let right_transform = rco_expr(right, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 151 | let right_transform = rco_expr(&**right, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:182:42 [INFO] [stdout] | [INFO] [stdout] 182 | let val_transform = rco_expr(&*val, true); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 182 - let val_transform = rco_expr(&*val, true); [INFO] [stdout] 182 + let val_transform = rco_expr(val, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 182 | let val_transform = rco_expr(&**val, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:211:46 [INFO] [stdout] | [INFO] [stdout] 211 | let arg_transform = rco_expr(&*arg, true); [INFO] [stdout] | ^^^^^ help: if you would like to reborrow, try removing `&*`: `arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:216:43 [INFO] [stdout] | [INFO] [stdout] 216 | let func_transform = rco_expr(&**func, true); [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:321:47 [INFO] [stdout] | [INFO] [stdout] 321 | let elem_transform = rco_expr(&*elem, true); [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `elem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:346:47 [INFO] [stdout] | [INFO] [stdout] 346 | let elem_transform = rco_expr(&*elem, true); [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `elem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/remove_complex_operands.rs:367:42 [INFO] [stdout] | [INFO] [stdout] 367 | let tup_transform = rco_expr(&*tup, true); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 367 - let tup_transform = rco_expr(&*tup, true); [INFO] [stdout] 367 + let tup_transform = rco_expr(tup, true); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 367 | let tup_transform = rco_expr(&**tup, true); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:114:27 [INFO] [stdout] | [INFO] [stdout] 114 | .find(|n| &ir::AtomValue::GlobalSymbol(global!(**n)) == &func.value) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 114 - .find(|n| &ir::AtomValue::GlobalSymbol(global!(**n)) == &func.value) [INFO] [stdout] 114 + .find(|n| ir::AtomValue::GlobalSymbol(global!(**n)) == func.value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:793:26 [INFO] [stdout] | [INFO] [stdout] 793 | const SPECIAL_FUNCTIONS: [( [INFO] [stdout] | __________________________^ [INFO] [stdout] 794 | | &'static str, [INFO] [stdout] 795 | | usize, [INFO] [stdout] 796 | | fn(Vec, Option>) -> Vec, [INFO] [stdout] 797 | | ); 1] = [(FN_GC_COLLECT, 1, |mut args, _dest| { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/compiler/src/passes/translate_ir_to_x86.rs:936:38 [INFO] [stdout] | [INFO] [stdout] 936 | (POINTER_SIZE * (1 + offset as i64)) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `offset` [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: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:149:36 [INFO] [stdout] | [INFO] [stdout] 149 | generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 149 - generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] 149 + generate_for_predicate(cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 149 | generate_for_predicate(&**cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:162:30 [INFO] [stdout] | [INFO] [stdout] 162 | expr_to_atom(&**func, env), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:192:30 [INFO] [stdout] | [INFO] [stdout] 192 | expr_to_atom(&**func, env), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:264:39 [INFO] [stdout] | [INFO] [stdout] 264 | let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 264 - let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] 264 + let l_atom = expr_to_atom(left, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 264 | let l_atom = expr_to_atom(&**left, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:265:39 [INFO] [stdout] | [INFO] [stdout] 265 | let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 265 - let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] 265 + let r_atom = expr_to_atom(right, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 265 | let r_atom = expr_to_atom(&**right, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:275:37 [INFO] [stdout] | [INFO] [stdout] 275 | let atom = expr_to_atom(&*expr, env); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 275 - let atom = expr_to_atom(&*expr, env); [INFO] [stdout] 275 + let atom = expr_to_atom(expr, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 275 | let atom = expr_to_atom(&**expr, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:289:45 [INFO] [stdout] | [INFO] [stdout] 289 | ir::Expr::Call(expr_to_atom(&**func, env), args), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:322:36 [INFO] [stdout] | [INFO] [stdout] 322 | generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 322 - generate_for_predicate(&*cond, pos_label, neg_label, blocks, env) [INFO] [stdout] 322 + generate_for_predicate(cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 322 | generate_for_predicate(&**cond, pos_label, neg_label, blocks, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:333:80 [INFO] [stdout] | [INFO] [stdout] 333 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 333 - if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] 333 + if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(idx, env).value { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 333 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&**idx, env).value { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:396:39 [INFO] [stdout] | [INFO] [stdout] 396 | let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 396 - let l_atom = expr_to_atom(&*left, env); [INFO] [stdout] 396 + let l_atom = expr_to_atom(left, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 396 | let l_atom = expr_to_atom(&**left, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:397:39 [INFO] [stdout] | [INFO] [stdout] 397 | let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 397 - let r_atom = expr_to_atom(&*right, env); [INFO] [stdout] 397 + let r_atom = expr_to_atom(right, env); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 397 | let r_atom = expr_to_atom(&**right, env); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:414:53 [INFO] [stdout] | [INFO] [stdout] 414 | ir::Expr::UnaryOp(*op, expr_to_atom(&*val, env)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 414 - ir::Expr::UnaryOp(*op, expr_to_atom(&*val, env)), [INFO] [stdout] 414 + ir::Expr::UnaryOp(*op, expr_to_atom(val, env)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 414 | ir::Expr::UnaryOp(*op, expr_to_atom(&**val, env)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:443:34 [INFO] [stdout] | [INFO] [stdout] 443 | expr_to_atom(&**func, env), [INFO] [stdout] | ^^^^^^^ help: try: `func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:459:80 [INFO] [stdout] | [INFO] [stdout] 459 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 459 - if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&*idx, env).value { [INFO] [stdout] 459 + if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(idx, env).value { [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 459 | if let ir::AtomValue::Constant(Value::I64(val)) = expr_to_atom(&**idx, env).value { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/translate_ast_to_ir.rs:466:55 [INFO] [stdout] | [INFO] [stdout] 466 | ir::Expr::TupleSubscript(expr_to_atom(&*tup, env), idx_i64), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 466 - ir::Expr::TupleSubscript(expr_to_atom(&*tup, env), idx_i64), [INFO] [stdout] 466 + ir::Expr::TupleSubscript(expr_to_atom(tup, env), idx_i64), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 466 | ir::Expr::TupleSubscript(expr_to_atom(&**tup, env), idx_i64), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec` [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:53:16 [INFO] [stdout] | [INFO] [stdout] 53 | es.into_iter().for_each(shortcircuit_expr); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | assert_expr_no_and_or(&*left); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 125 - assert_expr_no_and_or(&*left); [INFO] [stdout] 125 + assert_expr_no_and_or(left); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 125 | assert_expr_no_and_or(&**left); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:126:39 [INFO] [stdout] | [INFO] [stdout] 126 | assert_expr_no_and_or(&*right); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 126 - assert_expr_no_and_or(&*right); [INFO] [stdout] 126 + assert_expr_no_and_or(right); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 126 | assert_expr_no_and_or(&**right); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:129:39 [INFO] [stdout] | [INFO] [stdout] 129 | assert_expr_no_and_or(&*expr); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 129 - assert_expr_no_and_or(&*expr); [INFO] [stdout] 129 + assert_expr_no_and_or(expr); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 129 | assert_expr_no_and_or(&**expr); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:145:68 [INFO] [stdout] | [INFO] [stdout] 145 | Statement::Assign(_, expr, _) => assert_expr_no_and_or(&expr), [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:146:60 [INFO] [stdout] | [INFO] [stdout] 146 | Statement::Expr(expr) => assert_expr_no_and_or(&expr), [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:148:39 [INFO] [stdout] | [INFO] [stdout] 148 | assert_expr_no_and_or(&expr); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:153:39 [INFO] [stdout] | [INFO] [stdout] 153 | assert_expr_no_and_or(&expr); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/compiler/src/passes/short_circuiting.rs:157:39 [INFO] [stdout] | [INFO] [stdout] 157 | assert_expr_no_and_or(&expr); [INFO] [stdout] | ^^^^^ help: change this to: `expr` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/inject_allocations.rs:139:12 [INFO] [stdout] | [INFO] [stdout] 139 | elems: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - elems: &mut Vec, [INFO] [stdout] 139 + elems: &mut [Expr], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/compiler/src/passes/tupleize_excess_args.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | /// function signatures) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `captured_ids.get(0)` [INFO] [stdout] --> crates/compiler/src/passes/closurize_lambdas.rs:800:28 [INFO] [stdout] | [INFO] [stdout] 800 | assert_eq!(captured_ids.get(0), Some(&main_local!("val"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `captured_ids.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `captured_ids.get(0)` [INFO] [stdout] --> crates/compiler/src/passes/closurize_lambdas.rs:920:32 [INFO] [stdout] | [INFO] [stdout] 920 | assert_eq!(captured_ids.get(0), Some(&main_local!("n"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `captured_ids.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> crates/compiler/src/passes/closurize_functions.rs:339:28 [INFO] [stdout] | [INFO] [stdout] 339 | assert_eq!(args.get(0), Some(&Expr::Closure(foo_name, vec![]))); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `pos_body.get(0)` [INFO] [stdout] --> crates/compiler/src/passes/closurize_functions.rs:371:21 [INFO] [stdout] | [INFO] [stdout] 371 | pos_body.get(0), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `pos_body.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `loop_body.get(0)` [INFO] [stdout] --> crates/compiler/src/passes/closurize_functions.rs:404:21 [INFO] [stdout] | [INFO] [stdout] 404 | loop_body.get(0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `loop_body.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/compiler/src/passes/declosurize_calls.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | /// never get added) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/compiler/src/passes/optimize_fallthrough.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | /// opportunities will be lost) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/passes/disambiguate_subscript.rs:176:71 [INFO] [stdout] | [INFO] [stdout] 176 | fn simplify_subscript_assign_for_tuple(s: &mut Statement, elem_types: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 176 ~ fn simplify_subscript_assign_for_tuple(s: &mut Statement, elem_types: &[ValueType]) { [INFO] [stdout] 177 | match s { [INFO] [stdout] ... [INFO] [stdout] 201 | complex.container.clone(), [INFO] [stdout] 202 ~ Some(ValueType::TupleType(elem_types.to_owned())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> crates/compiler/src/passes/resolve_width.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | let old_instrs = std::mem::replace(&mut b.instrs, vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut b.instrs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/compiler/src/pipeline.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 27 | / let final_x86 = self.x86_passes.into_iter().fold(initial_x86, |p, pass| { [INFO] [stdout] 28 | | println!("Pass: {pass:?}"); [INFO] [stdout] 29 | | pass.run_pass(p) [INFO] [stdout] 30 | | }); [INFO] [stdout] | |___________- unnecessary `let` binding [INFO] [stdout] 31 | [INFO] [stdout] 32 | final_x86 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 27 ~ [INFO] [stdout] 28 | [INFO] [stdout] 29 ~ self.x86_passes.into_iter().fold(initial_x86, |p, pass| { [INFO] [stdout] 30 + println!("Pass: {pass:?}"); [INFO] [stdout] 31 + pass.run_pass(p) [INFO] [stdout] 32 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/compiler/src/syntax_trees/ast.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / pub enum Statement { [INFO] [stdout] 25 | | Assign(AssignDest, Expr, Option), [INFO] [stdout] | | ------------------------------------------------- the largest variant contains at least 656 bytes [INFO] [stdout] 26 | | Expr(Expr), [INFO] [stdout] 27 | | Conditional(Expr, Vec, Vec), [INFO] [stdout] | | ------------------------------------------------- the second-largest variant contains at least 256 bytes [INFO] [stdout] 28 | | WhileLoop(Expr, Vec), [INFO] [stdout] 29 | | Return(Expr), [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ the entire enum is at least 656 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 25 - Assign(AssignDest, Expr, Option), [INFO] [stdout] 25 + Assign(Box>, Expr, Option), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenValue<'_>` which implements the `Copy` trait [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/parse_tree.rs:279:19 [INFO] [stdout] | [INFO] [stdout] 279 | let got = (tokens [INFO] [stdout] | ___________________^ [INFO] [stdout] 280 | | .get(e.location) [INFO] [stdout] 281 | | .unwrap_or(&TokenValue::Identifier("===EOF==="))) [INFO] [stdout] 282 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 279 ~ let got = *(tokens [INFO] [stdout] 280 + .get(e.location) [INFO] [stdout] 281 ~ .unwrap_or(&TokenValue::Identifier("===EOF==="))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/to_ast.rs:227:15 [INFO] [stdout] | [INFO] [stdout] 227 | while let Some(_) = pt_iter.peek() { [INFO] [stdout] | ----------^^^^^^^----------------- help: try: `while pt_iter.peek().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `LocatedSpan<&str>` which implements the `Copy` trait [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:179:19 [INFO] [stdout] | [INFO] [stdout] 179 | let int_val = token_span [INFO] [stdout] | ___________________^ [INFO] [stdout] 180 | | .clone() [INFO] [stdout] | |________________^ help: try removing the `clone` call: `token_span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `LocatedSpan<&str>` which implements the `Copy` trait [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:205:43 [INFO] [stdout] | [INFO] [stdout] 205 | token: TokenValue::Identifier(id_span.clone().into_fragment()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `id_span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:240:17 [INFO] [stdout] | [INFO] [stdout] 240 | contents.into_fragment().chars().nth(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `contents.into_fragment().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/tokenizer.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 250 | / let tok = alt(( [INFO] [stdout] 251 | | newline, [INFO] [stdout] 252 | | keyword_parser, [INFO] [stdout] 253 | | int_parser, [INFO] [stdout] ... | [INFO] [stdout] 258 | | )) [INFO] [stdout] 259 | | .parse(rem); [INFO] [stdout] | |________________- unnecessary `let` binding [INFO] [stdout] 260 | [INFO] [stdout] 261 | tok [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 250 ~ [INFO] [stdout] 251 | [INFO] [stdout] 252 ~ alt(( [INFO] [stdout] 253 + newline, [INFO] [stdout] 254 + keyword_parser, [INFO] [stdout] 255 + int_parser, [INFO] [stdout] 256 + string_literal_parser, [INFO] [stdout] 257 + char_literal_parser, [INFO] [stdout] 258 + punctuation_parser, [INFO] [stdout] 259 + id_parser, [INFO] [stdout] 260 + )) [INFO] [stdout] 261 + .parse(rem) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/compiler/src/syntax_trees/parser/mod.rs:18:53 [INFO] [stdout] | [INFO] [stdout] 18 | let tokens = tokenizer::tokenize(input).map_err(|e| ParserError::Tokenizer(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ParserError::Tokenizer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/compiler/src/syntax_trees/x86.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | / match self { [INFO] [stdout] 206 | | ah | bh | ch | dh => true, [INFO] [stdout] 207 | | _ => false, [INFO] [stdout] 208 | | } [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] 205 - match self { [INFO] [stdout] 206 - ah | bh | ch | dh => true, [INFO] [stdout] 207 - _ => false, [INFO] [stdout] 208 - } [INFO] [stdout] 205 + matches!(self, ah | bh | ch | dh) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | / elems [INFO] [stdout] 99 | | .get(0) [INFO] [stdout] | |_______________________________^ help: try: `elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `l_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:117:71 [INFO] [stdout] | [INFO] [stdout] 117 | if let Some(ValueType::FunctionType(l_args, l_ret)) = l_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `l_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `l_args.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:118:60 [INFO] [stdout] | [INFO] [stdout] 118 | && let Some(ValueType::TupleType(_)) = l_args.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `l_args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `r_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:119:75 [INFO] [stdout] | [INFO] [stdout] 119 | && let Some(ValueType::FunctionType(r_args, r_ret)) = r_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `r_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `r_args.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:120:60 [INFO] [stdout] | [INFO] [stdout] 120 | && let Some(ValueType::TupleType(_)) = r_args.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `r_args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `clos_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:130:77 [INFO] [stdout] | [INFO] [stdout] 130 | if let Some(ValueType::FunctionType(clos_args, clos_ret)) = clos_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `clos_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `clos_args.get(0)` [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:131:60 [INFO] [stdout] | [INFO] [stdout] 131 | && let Some(ValueType::TupleType(_)) = clos_args.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `clos_args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:157:1 [INFO] [stdout] | [INFO] [stdout] 157 | impl Into for Value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: replace the `Into` implementation with `From` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:171:1 [INFO] [stdout] | [INFO] [stdout] 171 | impl Into for Value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: replace the `Into` implementation with `From` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/compiler/src/syntax_trees/shared.rs:184:1 [INFO] [stdout] | [INFO] [stdout] 184 | impl Into for &Value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: replace the `Into` implementation with `From<&syntax_trees::shared::Value>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/compiler/src/type_check.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 20 | / let result_type = op.type_of(&l_type, &r_type).expect( [INFO] [stdout] 21 | | format!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}") [INFO] [stdout] 22 | | .as_str(), [INFO] [stdout] 23 | | ); [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 24 | result_type [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 20 ~ [INFO] [stdout] 21 ~ op.type_of(&l_type, &r_type).expect( [INFO] [stdout] 22 + format!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}") [INFO] [stdout] 23 + .as_str(), [INFO] [stdout] 24 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/type_check.rs:20:64 [INFO] [stdout] | [INFO] [stdout] 20 | let result_type = op.type_of(&l_type, &r_type).expect( [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 21 | | format!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}") [INFO] [stdout] 22 | | .as_str(), [INFO] [stdout] 23 | | ); [INFO] [stdout] | |_________________^ help: try: `unwrap_or_else(|| panic!("Invalid argument types to op {op:?} - {l_type:?}, {r_type:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/type_check.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | .expect(format!("Unknown Identifier: {id:?}").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown Identifier: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `closure_elems.get(0)` [INFO] [stdout] --> crates/compiler/src/type_check.rs:66:81 [INFO] [stdout] | [INFO] [stdout] 66 | if let Some(ValueType::FunctionType(arg_types, ret_type)) = closure_elems.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `closure_elems.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map_or(None, ..)` on an `Option` value [INFO] [stdout] --> crates/compiler/src/type_check.rs:129:42 [INFO] [stdout] | [INFO] [stdout] 129 | let expected_elem_type = expected_type.clone().map_or(None, |t| { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 130 | | if let ValueType::ArrayType(e) = t { [INFO] [stdout] 131 | | Some(*e) [INFO] [stdout] 132 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 135 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_or_none [INFO] [stdout] = note: `#[warn(clippy::option_map_or_none)]` on by default [INFO] [stdout] help: consider using `and_then` [INFO] [stdout] | [INFO] [stdout] 129 ~ let expected_elem_type = expected_type.clone().and_then(|t| { [INFO] [stdout] 130 + if let ValueType::ArrayType(e) = t { [INFO] [stdout] 131 + Some(*e) [INFO] [stdout] 132 + } else { [INFO] [stdout] 133 + None [INFO] [stdout] 134 + } [INFO] [stdout] 135 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/compiler/src/type_check.rs:197:22 [INFO] [stdout] | [INFO] [stdout] 197 | .expect(format!("Unknown closure id: {id:?}").as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Unknown closure id: {id:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `param_types.get(0)` [INFO] [stdout] --> crates/compiler/src/type_check.rs:200:72 [INFO] [stdout] | [INFO] [stdout] 200 | if let Some(ValueType::TupleType(capture_types)) = param_types.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `param_types.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `exprs.get(0)` [INFO] [stdout] --> crates/compiler/src/type_check.rs:282:21 [INFO] [stdout] | [INFO] [stdout] 282 | / exprs [INFO] [stdout] 283 | | .get(0) [INFO] [stdout] | |_______________________________^ help: try: `exprs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/compiler/src/type_check.rs:310:11 [INFO] [stdout] | [INFO] [stdout] 310 | args: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 310 - args: &mut Vec, [INFO] [stdout] 310 + args: &mut [ast::Expr], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/compiler/src/utils.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn x86_block_adj_graph<'a>(blocks: &'a [Block]) -> DiGraph<&'a Block, JumpType> { [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] 12 - pub fn x86_block_adj_graph<'a>(blocks: &'a [Block]) -> DiGraph<&'a Block, JumpType> { [INFO] [stdout] 12 + pub fn x86_block_adj_graph(blocks: &[Block]) -> DiGraph<&Block, JumpType> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | const SUFFIX_MAP: LazyLock> = LazyLock::new(|| { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:105:45 [INFO] [stdout] | [INFO] [stdout] 105 | let width_suffix = width.map_or("", |w| SUFFIX_MAP[&w]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:111:28 [INFO] [stdout] | [INFO] [stdout] 111 | I::jmp_tail(..) => format!("jmp"), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"jmp".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:113:34 [INFO] [stdout] | [INFO] [stdout] 113 | Some(Width::Quad) => format!("cqto"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"cqto".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:114:36 [INFO] [stdout] | [INFO] [stdout] 114 | Some(Width::Double) => format!("cdtq"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"cdtq".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/compiler/src/emit.rs:115:34 [INFO] [stdout] | [INFO] [stdout] 115 | Some(Width::Word) => format!("cwtd"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"cwtd".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:119:33 [INFO] [stdout] | [INFO] [stdout] 119 | format!("movz{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:119:55 [INFO] [stdout] | [INFO] [stdout] 119 | format!("movz{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:122:33 [INFO] [stdout] | [INFO] [stdout] 122 | format!("movs{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> crates/compiler/src/emit.rs:122:55 [INFO] [stdout] | [INFO] [stdout] 122 | format!("movs{}{}", SUFFIX_MAP[&s.width], SUFFIX_MAP[&d.width]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 28.24s [INFO] running `Command { std: "docker" "inspect" "932741a839514fa1bacff28926f543b012514a79420e4209172925f506f4451e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "932741a839514fa1bacff28926f543b012514a79420e4209172925f506f4451e", kill_on_drop: false }` [INFO] [stdout] 932741a839514fa1bacff28926f543b012514a79420e4209172925f506f4451e