[INFO] cloning repository https://github.com/Ecoral360/luz [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Ecoral360/luz" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FEcoral360%2Fluz", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FEcoral360%2Fluz'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1118eb236cd62f70cea0f335e01536d11582ed54 [INFO] linting Ecoral360/luz against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FEcoral360%2Fluz" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Ecoral360/luz [INFO] finished tweaking git repo https://github.com/Ecoral360/luz [INFO] tweaked toml for git repo https://github.com/Ecoral360/luz written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Ecoral360/luz 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/Ecoral360/luz 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] Downloading crates ... [INFO] [stderr] Downloaded cpufeatures v0.2.14 [INFO] [stderr] Downloaded thiserror-impl v1.0.64 [INFO] [stderr] Downloaded pest_meta v2.7.13 [INFO] [stderr] Downloaded pest_generator v2.7.13 [INFO] [stderr] Downloaded serde v1.0.221 [INFO] [stderr] Downloaded thiserror v1.0.64 [INFO] [stderr] Downloaded derive-new v0.7.0 [INFO] [stderr] Downloaded clap-verbosity-flag v3.0.4 [INFO] [stderr] Downloaded clap v4.5.47 [INFO] [stderr] Downloaded serde_derive v1.0.221 [INFO] [stderr] Downloaded serde_core v1.0.221 [INFO] [stderr] Downloaded pest v2.7.13 [INFO] [stderr] Downloaded anstream v0.6.20 [INFO] [stderr] Downloaded pest_derive v2.7.13 [INFO] [stderr] Downloaded clap_builder v4.5.47 [INFO] [stderr] Downloaded libc v0.2.159 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 0127598a538c7c736ddf47739b98fb99127bc9ed63db01f4f04affae00368d69 [INFO] running `Command { std: "docker" "start" "-a" "0127598a538c7c736ddf47739b98fb99127bc9ed63db01f4f04affae00368d69", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0127598a538c7c736ddf47739b98fb99127bc9ed63db01f4f04affae00368d69", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0127598a538c7c736ddf47739b98fb99127bc9ed63db01f4f04affae00368d69", kill_on_drop: false }` [INFO] [stdout] 0127598a538c7c736ddf47739b98fb99127bc9ed63db01f4f04affae00368d69 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 37b79e95a373c09dd6f383112922c4ea80d336bed283261bc76234f167400dfa [INFO] running `Command { std: "docker" "start" "-a" "37b79e95a373c09dd6f383112922c4ea80d336bed283261bc76234f167400dfa", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.13 [INFO] [stderr] Compiling thiserror v1.0.64 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Compiling ucd-trie v0.1.7 [INFO] [stderr] Checking regex-syntax v0.8.6 [INFO] [stderr] Compiling winnow v0.7.13 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Compiling once_cell v1.20.2 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Checking jiff v0.2.15 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Checking clap_builder v4.5.47 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling indexmap v2.11.1 [INFO] [stderr] Checking regex-automata v0.4.10 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Checking regex v1.11.2 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Compiling proc-macro-crate v3.3.0 [INFO] [stderr] Compiling thiserror-impl v1.0.64 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Compiling derive_more-impl v1.0.0 [INFO] [stderr] Compiling derive-new v0.7.0 [INFO] [stderr] Compiling num_enum_derive v0.7.4 [INFO] [stderr] Compiling pest v2.7.13 [INFO] [stderr] Checking num_enum v0.7.4 [INFO] [stderr] Checking derive_more v1.0.0 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Checking clap v4.5.47 [INFO] [stderr] Compiling derive_builder_core v0.20.2 [INFO] [stderr] Checking clap-verbosity-flag v3.0.4 [INFO] [stderr] Compiling derive_builder_macro v0.20.2 [INFO] [stderr] Compiling pest_meta v2.7.13 [INFO] [stderr] Checking derive_builder v0.20.2 [INFO] [stderr] Compiling pest_generator v2.7.13 [INFO] [stderr] Compiling pest_derive v2.7.13 [INFO] [stderr] Checking luz v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `cell::RefCell` and `rc::Rc` [INFO] [stdout] --> src/lib.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, fs, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LuzType`, `ScopeRef`, `Scope`, `TableRef`, and `Upvalue` [INFO] [stdout] --> src/lib.rs:11:28 [INFO] [stdout] | [INFO] [stdout] 11 | ctx::{CompilerCtx, Scope, ScopeRef, Upvalue}, [INFO] [stdout] | ^^^^^ ^^^^^^^^ ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | obj::{LuzFunction, LuzObj, LuzType, TableRef}, [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DoStat` [INFO] [stdout] --> src/ast/exp.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | ast::{DoStat, Stat}, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cell::RefCell` and `rc::Rc` [INFO] [stdout] --> src/lib.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, fs, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ast/parser.rs:509:21 [INFO] [stdout] | [INFO] [stdout] 509 | body: body, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ast/parser.rs:571:21 [INFO] [stdout] | [INFO] [stdout] 571 | body: body, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `iterators::Pair` [INFO] [stdout] --> src/ast/stat.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | use pest::{iterators::Pair, Span}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rule` [INFO] [stdout] --> src/ast/stat.rs:7:48 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::{ast::LineInfo, luz::err::LuzError, Rule}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LuzType`, `ScopeRef`, `Scope`, `TableRef`, and `Upvalue` [INFO] [stdout] --> src/lib.rs:11:28 [INFO] [stdout] | [INFO] [stdout] 11 | ctx::{CompilerCtx, Scope, ScopeRef, Upvalue}, [INFO] [stdout] | ^^^^^ ^^^^^^^^ ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | obj::{LuzFunction, LuzObj, LuzType, TableRef}, [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DoStat` [INFO] [stdout] --> src/ast/exp.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | ast::{DoStat, Stat}, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/compiler/ctx.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | instructions::{self, Instruction}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ast/parser.rs:509:21 [INFO] [stdout] | [INFO] [stdout] 509 | body: body, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ast/parser.rs:571:21 [INFO] [stdout] | [INFO] [stdout] 571 | body: body, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `iterators::Pair` [INFO] [stdout] --> src/ast/stat.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | use pest::{iterators::Pair, Span}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rule` [INFO] [stdout] --> src/ast/stat.rs:7:48 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::{ast::LineInfo, luz::err::LuzError, Rule}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/compiler/ctx.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | instructions::{self, Instruction}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Upvalue` [INFO] [stdout] --> src/luz/function.rs:8:38 [INFO] [stdout] | [INFO] [stdout] 8 | compiler::ctx::{Scope, ScopeRef, Upvalue}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/luz/fn_dump.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | scope: scope, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `impl_op` [INFO] [stdout] --> src/luz/numeral.rs:98:14 [INFO] [stdout] | [INFO] [stdout] 98 | macro_rules! impl_op { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Upvalue` [INFO] [stdout] --> src/luz/function.rs:8:38 [INFO] [stdout] | [INFO] [stdout] 8 | compiler::ctx::{Scope, ScopeRef, Upvalue}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/luz/fn_dump.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | scope: scope, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LuzFunction`, `LuzType`, and `Upvalue` [INFO] [stdout] --> src/luz/lib/env.rs:5:39 [INFO] [stdout] | [INFO] [stdout] 5 | ctx::{RegisterBuilder, Scope, Upvalue}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | obj::{AsUTF8Unchecked, LuzFunction, LuzObj, LuzType, Numeral, TableRef}, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `impl_op` [INFO] [stdout] --> src/luz/numeral.rs:98:14 [INFO] [stdout] | [INFO] [stdout] 98 | macro_rules! impl_op { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LuzFunction`, `LuzType`, and `Upvalue` [INFO] [stdout] --> src/luz/lib/env.rs:5:39 [INFO] [stdout] | [INFO] [stdout] 5 | ctx::{RegisterBuilder, Scope, Upvalue}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | obj::{AsUTF8Unchecked, LuzFunction, LuzObj, LuzType, Numeral, TableRef}, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `add_lib` [INFO] [stdout] --> src/luz/lib/require.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | lib::{add_lib, debug::debug_lib, LuzNativeLib}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `add_lib` [INFO] [stdout] --> src/luz/lib/require.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | lib::{add_lib, debug::debug_lib, LuzNativeLib}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp::Ordering` and `collections::HashMap` [INFO] [stdout] --> src/luz/lib/io.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, cmp::Ordering, collections::HashMap, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Numeral`, `Table`, `borrowed`, and `luz_let` [INFO] [stdout] --> src/luz/lib/io.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | borrowed, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | obj::{LuzObj, Numeral, Table, TableRef}, [INFO] [stdout] | ^^^^^^^ ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | luz_fn, luz_let, luz_table, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `path::Prefix` [INFO] [stdout] --> src/runner/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | path::Prefix, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/runner/mod.rs:14:24 [INFO] [stdout] | [INFO] [stdout] 14 | instructions::{self, iABC, iABx, iAsBx, isJ, Instruction, MAX_HALF_sBx, MAX_HALF_sJ}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp::Ordering` and `collections::HashMap` [INFO] [stdout] --> src/luz/lib/io.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, cmp::Ordering, collections::HashMap, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Numeral`, `Table`, `borrowed`, and `luz_let` [INFO] [stdout] --> src/luz/lib/io.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | borrowed, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | obj::{LuzObj, Numeral, Table, TableRef}, [INFO] [stdout] | ^^^^^^^ ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | luz_fn, luz_let, luz_table, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `path::Prefix` [INFO] [stdout] --> src/runner/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | path::Prefix, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/runner/mod.rs:14:24 [INFO] [stdout] | [INFO] [stdout] 14 | instructions::{self, iABC, iABx, iAsBx, isJ, Instruction, MAX_HALF_sBx, MAX_HALF_sJ}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler/ctx.rs:464:13 [INFO] [stdout] | [INFO] [stdout] 464 | let mut scope = Self { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler/ctx.rs:464:13 [INFO] [stdout] | [INFO] [stdout] 464 | let mut scope = Self { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scope` [INFO] [stdout] --> src/compiler/instructions.rs:1134:25 [INFO] [stdout] | [INFO] [stdout] 1134 | pub fn debug(&self, scope: &Scope) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scope` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scope` [INFO] [stdout] --> src/compiler/instructions.rs:1250:25 [INFO] [stdout] | [INFO] [stdout] 1250 | pub fn debug(&self, scope: &Scope) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler/mod.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | let mut jmps = vec![]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scope` [INFO] [stdout] --> src/compiler/instructions.rs:1134:25 [INFO] [stdout] | [INFO] [stdout] 1134 | pub fn debug(&self, scope: &Scope) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scope` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scope` [INFO] [stdout] --> src/compiler/instructions.rs:1250:25 [INFO] [stdout] | [INFO] [stdout] 1250 | pub fn debug(&self, scope: &Scope) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler/mod.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | let mut jmps = vec![]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler/mod.rs:1666:13 [INFO] [stdout] | [INFO] [stdout] 1666 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/compiler/mod.rs:1666:13 [INFO] [stdout] | [INFO] [stdout] 1650 | ExpEval::InImmediate(i) => (None, i), [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] 1651 | ExpEval::InRegister(i) => { [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 1658 | ExpEval::InConstant(c) => (None, c), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 1659 | / ExpEval::InUpvalue { [INFO] [stdout] 1660 | | in_table, upvalue, .. [INFO] [stdout] 1661 | | } => { [INFO] [stdout] | |_____________- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 1666 | _ => { [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler/mod.rs:2355:13 [INFO] [stdout] | [INFO] [stdout] 2355 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/compiler/mod.rs:2355:13 [INFO] [stdout] | [INFO] [stdout] 2345 | ExpEval::InRegister(r) => (None, r), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 2346 | ExpEval::InImmediate(i) => (None, i), [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] 2347 | ExpEval::InConstant(c) => (None, c), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 2348 | / ExpEval::InUpvalue { [INFO] [stdout] 2349 | | in_table, upvalue, .. [INFO] [stdout] 2350 | | } => { [INFO] [stdout] | |_____________- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 2355 | _ => { [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler/mod.rs:1666:13 [INFO] [stdout] | [INFO] [stdout] 1666 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/compiler/mod.rs:1666:13 [INFO] [stdout] | [INFO] [stdout] 1650 | ExpEval::InImmediate(i) => (None, i), [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] 1651 | ExpEval::InRegister(i) => { [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 1658 | ExpEval::InConstant(c) => (None, c), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 1659 | / ExpEval::InUpvalue { [INFO] [stdout] 1660 | | in_table, upvalue, .. [INFO] [stdout] 1661 | | } => { [INFO] [stdout] | |_____________- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 1666 | _ => { [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mutex` [INFO] [stdout] --> src/luz/obj.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | LuzObj::Thread(mutex) => todo!(), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_mutex` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mutex` [INFO] [stdout] --> src/luz/obj.rs:106:30 [INFO] [stdout] | [INFO] [stdout] 106 | LuzObj::Userdata(mutex) => todo!(), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_mutex` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler/mod.rs:2355:13 [INFO] [stdout] | [INFO] [stdout] 2355 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/compiler/mod.rs:2355:13 [INFO] [stdout] | [INFO] [stdout] 2345 | ExpEval::InRegister(r) => (None, r), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 2346 | ExpEval::InImmediate(i) => (None, i), [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] 2347 | ExpEval::InConstant(c) => (None, c), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 2348 | / ExpEval::InUpvalue { [INFO] [stdout] 2349 | | in_table, upvalue, .. [INFO] [stdout] 2350 | | } => { [INFO] [stdout] | |_____________- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 2355 | _ => { [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/luz/fn_dump.rs:253:13 [INFO] [stdout] | [INFO] [stdout] 253 | let mut upval = Upvalue::new( [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mutex` [INFO] [stdout] --> src/luz/obj.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | LuzObj::Thread(mutex) => todo!(), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_mutex` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mutex` [INFO] [stdout] --> src/luz/obj.rs:106:30 [INFO] [stdout] | [INFO] [stdout] 106 | LuzObj::Userdata(mutex) => todo!(), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_mutex` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/luz/fn_dump.rs:253:13 [INFO] [stdout] | [INFO] [stdout] 253 | let mut upval = Upvalue::new( [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `base` [INFO] [stdout] --> src/luz/lib/env.rs:413:34 [INFO] [stdout] | [INFO] [stdout] 413 | tonumber: luz_fn!([1](e, base @ (LuzObj::Numeral(Numeral::Int(..)) | LuzObj::Nil)) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_base` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/luz/lib/env.rs:190:29 [INFO] [stdout] | [INFO] [stdout] 190 | Err(err) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `base` [INFO] [stdout] --> src/luz/lib/env.rs:413:34 [INFO] [stdout] | [INFO] [stdout] 413 | tonumber: luz_fn!([1](e, base @ (LuzObj::Numeral(Numeral::Int(..)) | LuzObj::Nil)) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_base` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/luz/lib/env.rs:190:29 [INFO] [stdout] | [INFO] [stdout] 190 | Err(err) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `plain` [INFO] [stdout] --> src/luz/lib/string.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | plain @ (LuzObj::Boolean(..) | LuzObj::Nil)) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_plain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/luz/lib/string.rs:250:58 [INFO] [stdout] | [INFO] [stdout] 250 | if let Some(LuzObj::Numeral(Numeral::Int(i))) = vals.next() {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `plain` [INFO] [stdout] --> src/luz/lib/string.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | plain @ (LuzObj::Boolean(..) | LuzObj::Nil)) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_plain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/luz/lib/string.rs:250:58 [INFO] [stdout] | [INFO] [stdout] 250 | if let Some(LuzObj::Numeral(Numeral::Int(i))) = vals.next() {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | let mut ctx = CompilerCtx::new_main("stdin".to_string()); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let mut runner = Runner::new( [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `runner` [INFO] [stdout] --> src/lib.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let mut runner = Runner::new( [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_runner` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit_inner_logicop` is never used [INFO] [stdout] --> src/compiler/mod.rs:1982:8 [INFO] [stdout] | [INFO] [stdout] 614 | impl<'a> Compiler<'a> { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1982 | fn visit_inner_logicop( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pack_string` is never used [INFO] [stdout] --> src/luz/lib/string.rs:171:4 [INFO] [stdout] | [INFO] [stdout] 171 | fn pack_string(fmt: &str, values: VecDeque) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ast/exp.rs:121:33 [INFO] [stdout] | [INFO] [stdout] 121 | pub fn is_multires(explist: &Vec) -> bool { [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] 121 - pub fn is_multires(explist: &Vec) -> bool { [INFO] [stdout] 121 + pub fn is_multires(explist: &[ExpNode]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/ast/exp.rs:160:12 [INFO] [stdout] | [INFO] [stdout] 160 | Ok(match (self, rhs) { [INFO] [stdout] | ____________^ [INFO] [stdout] 161 | | // (Self::Literal(obj), Self::Literal(obj2)) => obj.apply_cmp(cmpop, obj2)?.into(), [INFO] [stdout] 162 | | (s, rhs) => Self::CmpOp { [INFO] [stdout] 163 | | lhs: Box::new(s), [INFO] [stdout] ... | [INFO] [stdout] 166 | | }, [INFO] [stdout] 167 | | }) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 160 ~ Ok({ [INFO] [stdout] 161 + let (s, rhs) = (self, rhs); [INFO] [stdout] 162 + Self::CmpOp { [INFO] [stdout] 163 + lhs: Box::new(s), [INFO] [stdout] 164 + op: cmpop, [INFO] [stdout] 165 + rhs: Box::new(rhs), [INFO] [stdout] 166 + } [INFO] [stdout] 167 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | let mut ctx = CompilerCtx::new_main("stdin".to_string()); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let mut runner = Runner::new( [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `runner` [INFO] [stdout] --> src/lib.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let mut runner = Runner::new( [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_runner` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit_inner_logicop` is never used [INFO] [stdout] --> src/compiler/mod.rs:1982:8 [INFO] [stdout] | [INFO] [stdout] 614 | impl<'a> Compiler<'a> { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1982 | fn visit_inner_logicop( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pack_string` is never used [INFO] [stdout] --> src/luz/lib/string.rs:171:4 [INFO] [stdout] | [INFO] [stdout] 171 | fn pack_string(fmt: &str, values: VecDeque) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ast/exp.rs:121:33 [INFO] [stdout] | [INFO] [stdout] 121 | pub fn is_multires(explist: &Vec) -> bool { [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] 121 - pub fn is_multires(explist: &Vec) -> bool { [INFO] [stdout] 121 + pub fn is_multires(explist: &[ExpNode]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/ast/exp.rs:160:12 [INFO] [stdout] | [INFO] [stdout] 160 | Ok(match (self, rhs) { [INFO] [stdout] | ____________^ [INFO] [stdout] 161 | | // (Self::Literal(obj), Self::Literal(obj2)) => obj.apply_cmp(cmpop, obj2)?.into(), [INFO] [stdout] 162 | | (s, rhs) => Self::CmpOp { [INFO] [stdout] 163 | | lhs: Box::new(s), [INFO] [stdout] ... | [INFO] [stdout] 166 | | }, [INFO] [stdout] 167 | | }) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 160 ~ Ok({ [INFO] [stdout] 161 + let (s, rhs) = (self, rhs); [INFO] [stdout] 162 + Self::CmpOp { [INFO] [stdout] 163 + lhs: Box::new(s), [INFO] [stdout] 164 + op: cmpop, [INFO] [stdout] 165 + rhs: Box::new(rhs), [INFO] [stdout] 166 + } [INFO] [stdout] 167 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/compiler/ctx.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/ctx.rs:140:51 [INFO] [stdout] | [INFO] [stdout] 140 | .ok_or_else(|| LuzError::CompileError(format!("No parent scope")))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No parent scope".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] --> src/compiler/ctx.rs:171:51 [INFO] [stdout] | [INFO] [stdout] 171 | .ok_or_else(|| LuzError::CompileError(format!("No free target registers"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No free target registers".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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:436:23 [INFO] [stdout] | [INFO] [stdout] 436 | start_pc: self.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start_pc` [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] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:438:46 [INFO] [stdout] | [INFO] [stdout] 438 | parent: self.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:445:24 [INFO] [stdout] | [INFO] [stdout] 445 | nb_params: self.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nb_params` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:465:23 [INFO] [stdout] | [INFO] [stdout] 465 | start_pc: self.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start_pc` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:467:46 [INFO] [stdout] | [INFO] [stdout] 467 | parent: self.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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] --> src/compiler/ctx.rs:472:63 [INFO] [stdout] | [INFO] [stdout] 472 | upvalues: self.upvalues.iter().map(|up| Rc::clone(&up)).collect(), [INFO] [stdout] | ^^^ help: change this to: `up` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:474:24 [INFO] [stdout] | [INFO] [stdout] 474 | nb_params: self.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nb_params` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:520:27 [INFO] [stdout] | [INFO] [stdout] 520 | start_pc: sub_scope.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_scope.start_pc` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:522:55 [INFO] [stdout] | [INFO] [stdout] 522 | parent: sub_scope.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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] --> src/compiler/ctx.rs:527:72 [INFO] [stdout] | [INFO] [stdout] 527 | upvalues: sub_scope.upvalues.iter().map(|up| Rc::clone(&up)).collect(), [INFO] [stdout] | ^^^ help: change this to: `up` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:529:28 [INFO] [stdout] | [INFO] [stdout] 529 | nb_params: sub_scope.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_scope.nb_params` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:553:23 [INFO] [stdout] | [INFO] [stdout] 553 | start_pc: self.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start_pc` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:555:46 [INFO] [stdout] | [INFO] [stdout] 555 | parent: self.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:562:24 [INFO] [stdout] | [INFO] [stdout] 562 | nb_params: self.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nb_params` [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: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/compiler/ctx.rs:662:13 [INFO] [stdout] | [INFO] [stdout] 662 | / let Some(ref p) = s.parent() else { [INFO] [stdout] 663 | | return None; [INFO] [stdout] 664 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let p = s.parent().as_ref()?;` [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 pattern creates a reference to a reference [INFO] [stdout] --> src/compiler/ctx.rs:662:22 [INFO] [stdout] | [INFO] [stdout] 662 | let Some(ref p) = s.parent() else { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 662 - let Some(ref p) = s.parent() else { [INFO] [stdout] 662 + let Some(p) = s.parent() else { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/compiler/ctx.rs:745:14 [INFO] [stdout] | [INFO] [stdout] 745 | .map(|reg| reg.val.take()) [INFO] [stdout] | ______________^ [INFO] [stdout] 746 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|reg| reg.val.take())` [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: importing legacy numeric constants [INFO] [stdout] --> src/compiler/ctx.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:936:46 [INFO] [stdout] | [INFO] [stdout] 936 | self.upvalues.get(addr as usize).map(|u| Rc::clone(u)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:947:18 [INFO] [stdout] | [INFO] [stdout] 947 | .map(|u| Rc::clone(u)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: useless use of `format!` [INFO] [stdout] --> src/compiler/ctx.rs:140:51 [INFO] [stdout] | [INFO] [stdout] 140 | .ok_or_else(|| LuzError::CompileError(format!("No parent scope")))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No parent scope".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] --> src/compiler/ctx.rs:171:51 [INFO] [stdout] | [INFO] [stdout] 171 | .ok_or_else(|| LuzError::CompileError(format!("No free target registers"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No free target registers".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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/compiler/ctx.rs:1134:9 [INFO] [stdout] | [INFO] [stdout] 1134 | / if self.labels.contains_key(&label) { [INFO] [stdout] 1135 | | false [INFO] [stdout] 1136 | | } else { [INFO] [stdout] 1137 | | self.labels.insert(label, pos); [INFO] [stdout] 1138 | | true [INFO] [stdout] 1139 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1134 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.labels.entry(label) { [INFO] [stdout] 1135 + e.insert(pos); [INFO] [stdout] 1136 + true [INFO] [stdout] 1137 + } else { [INFO] [stdout] 1138 + false [INFO] [stdout] 1139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:436:23 [INFO] [stdout] | [INFO] [stdout] 436 | start_pc: self.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start_pc` [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] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:438:46 [INFO] [stdout] | [INFO] [stdout] 438 | parent: self.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:445:24 [INFO] [stdout] | [INFO] [stdout] 445 | nb_params: self.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nb_params` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:465:23 [INFO] [stdout] | [INFO] [stdout] 465 | start_pc: self.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start_pc` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:467:46 [INFO] [stdout] | [INFO] [stdout] 467 | parent: self.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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] --> src/compiler/ctx.rs:472:63 [INFO] [stdout] | [INFO] [stdout] 472 | upvalues: self.upvalues.iter().map(|up| Rc::clone(&up)).collect(), [INFO] [stdout] | ^^^ help: change this to: `up` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:474:24 [INFO] [stdout] | [INFO] [stdout] 474 | nb_params: self.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nb_params` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:520:27 [INFO] [stdout] | [INFO] [stdout] 520 | start_pc: sub_scope.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_scope.start_pc` [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: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/compiler/instructions.rs:73:46 [INFO] [stdout] | [INFO] [stdout] 73 | Instruction::iABC(i_abc) => Some(i_abc.b as u8), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `i_abc.b` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:522:55 [INFO] [stdout] | [INFO] [stdout] 522 | parent: sub_scope.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/compiler/instructions.rs:84:46 [INFO] [stdout] | [INFO] [stdout] 84 | Instruction::iABC(i_abc) => Some(i_abc.c as u8), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `i_abc.c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/ctx.rs:527:72 [INFO] [stdout] | [INFO] [stdout] 527 | upvalues: sub_scope.upvalues.iter().map(|up| Rc::clone(&up)).collect(), [INFO] [stdout] | ^^^ help: change this to: `up` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:529:28 [INFO] [stdout] | [INFO] [stdout] 529 | nb_params: sub_scope.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sub_scope.nb_params` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:553:23 [INFO] [stdout] | [INFO] [stdout] 553 | start_pc: self.start_pc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start_pc` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:555:46 [INFO] [stdout] | [INFO] [stdout] 555 | parent: self.parent.as_ref().map(|p| Rc::clone(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/ctx.rs:562:24 [INFO] [stdout] | [INFO] [stdout] 562 | nb_params: self.nb_params.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nb_params` [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: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/compiler/ctx.rs:662:13 [INFO] [stdout] | [INFO] [stdout] 662 | / let Some(ref p) = s.parent() else { [INFO] [stdout] 663 | | return None; [INFO] [stdout] 664 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let p = s.parent().as_ref()?;` [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 pattern creates a reference to a reference [INFO] [stdout] --> src/compiler/ctx.rs:662:22 [INFO] [stdout] | [INFO] [stdout] 662 | let Some(ref p) = s.parent() else { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 662 - let Some(ref p) = s.parent() else { [INFO] [stdout] 662 + let Some(p) = s.parent() else { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/compiler/ctx.rs:745:14 [INFO] [stdout] | [INFO] [stdout] 745 | .map(|reg| reg.val.take()) [INFO] [stdout] | ______________^ [INFO] [stdout] 746 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|reg| reg.val.take())` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:936:46 [INFO] [stdout] | [INFO] [stdout] 936 | self.upvalues.get(addr as usize).map(|u| Rc::clone(u)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: redundant closure [INFO] [stdout] --> src/compiler/ctx.rs:947:18 [INFO] [stdout] | [INFO] [stdout] 947 | .map(|u| Rc::clone(u)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/compiler/instructions.rs:740:1 [INFO] [stdout] | [INFO] [stdout] 740 | impl Into for iABC { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 740 ~ impl From for Instruction { [INFO] [stdout] 741 ~ fn from(val: iABC) -> Self { [INFO] [stdout] 742 ~ Instruction::iABC(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:746:1 [INFO] [stdout] | [INFO] [stdout] 746 | impl Into for iABC { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 746 ~ impl From for u32 { [INFO] [stdout] 747 ~ fn from(val: iABC) -> Self { [INFO] [stdout] 748 ~ val.op as u32 [INFO] [stdout] 749 ~ | (val.a as u32) << 7 [INFO] [stdout] 750 ~ | (val.k as u32) << 15 [INFO] [stdout] 751 ~ | (val.b as u32) << 16 [INFO] [stdout] 752 ~ | (val.c as u32) << 24 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/compiler/ctx.rs:1134:9 [INFO] [stdout] | [INFO] [stdout] 1134 | / if self.labels.contains_key(&label) { [INFO] [stdout] 1135 | | false [INFO] [stdout] 1136 | | } else { [INFO] [stdout] 1137 | | self.labels.insert(label, pos); [INFO] [stdout] 1138 | | true [INFO] [stdout] 1139 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1134 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.labels.entry(label) { [INFO] [stdout] 1135 + e.insert(pos); [INFO] [stdout] 1136 + true [INFO] [stdout] 1137 + } else { [INFO] [stdout] 1138 + false [INFO] [stdout] 1139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/instructions.rs:924:17 [INFO] [stdout] | [INFO] [stdout] 924 | format!("{}", self.op.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.op.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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/compiler/instructions.rs:924:38 [INFO] [stdout] | [INFO] [stdout] 924 | format!("{}", self.op.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` 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] --> src/compiler/instructions.rs:1019:1 [INFO] [stdout] | [INFO] [stdout] 1019 | impl Into for iABx { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1019 ~ impl From for Instruction { [INFO] [stdout] 1020 ~ fn from(val: iABx) -> Self { [INFO] [stdout] 1021 ~ Instruction::iABx(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1025:1 [INFO] [stdout] | [INFO] [stdout] 1025 | impl Into for iABx { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1025 ~ impl From for u32 { [INFO] [stdout] 1026 ~ fn from(val: iABx) -> Self { [INFO] [stdout] 1027 ~ val.op as u32 | (val.a as u32) << 7 | val.b << 15 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1037:16 [INFO] [stdout] | [INFO] [stdout] 1037 | b: b as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/compiler/instructions.rs:1072:17 [INFO] [stdout] | [INFO] [stdout] 1072 | let b = match self.op { [INFO] [stdout] | _________________^ [INFO] [stdout] 1073 | | // LuaOpCode::OP_LOADK => -(self.b as i32 + 1), [INFO] [stdout] 1074 | | _ => self.b as i32, [INFO] [stdout] 1075 | | }; [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.b as i32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/compiler/instructions.rs:73:46 [INFO] [stdout] | [INFO] [stdout] 73 | Instruction::iABC(i_abc) => Some(i_abc.b as u8), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `i_abc.b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/compiler/instructions.rs:84:46 [INFO] [stdout] | [INFO] [stdout] 84 | Instruction::iABC(i_abc) => Some(i_abc.c as u8), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `i_abc.c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/compiler/instructions.rs:1092:1 [INFO] [stdout] | [INFO] [stdout] 1092 | impl Into for iAsBx { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1092 ~ impl From for Instruction { [INFO] [stdout] 1093 ~ fn from(val: iAsBx) -> Self { [INFO] [stdout] 1094 ~ Instruction::iAsBx(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1098:1 [INFO] [stdout] | [INFO] [stdout] 1098 | impl Into for iAsBx { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1098 ~ impl From for u32 { [INFO] [stdout] 1099 ~ fn from(val: iAsBx) -> Self { [INFO] [stdout] 1100 ~ let b = val.b << 15; [INFO] [stdout] 1101 | // println!( [INFO] [stdout] ... [INFO] [stdout] 1107 | // ); [INFO] [stdout] 1108 ~ let result = val.op as u32 | (val.a as u32) << 7 | b; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/instructions.rs:1109:9 [INFO] [stdout] | [INFO] [stdout] 1108 | let result = self.op as u32 | (self.a as u32) << 7 | b; [INFO] [stdout] | ------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1109 | result [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] 1108 ~ [INFO] [stdout] 1109 ~ self.op as u32 | (self.a as u32) << 7 | b [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1126:16 [INFO] [stdout] | [INFO] [stdout] 1126 | b: b as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/instructions.rs:1139:9 [INFO] [stdout] | [INFO] [stdout] 1135 | / let s = match self.op { [INFO] [stdout] 1136 | | _ => self.to_string(), [INFO] [stdout] 1137 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 1138 | [INFO] [stdout] 1139 | s [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] 1135 ~ [INFO] [stdout] 1136 | [INFO] [stdout] 1137 ~ match self.op { [INFO] [stdout] 1138 + _ => self.to_string(), [INFO] [stdout] 1139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/compiler/instructions.rs:1135:17 [INFO] [stdout] | [INFO] [stdout] 1135 | let s = match self.op { [INFO] [stdout] | _________________^ [INFO] [stdout] 1136 | | _ => self.to_string(), [INFO] [stdout] 1137 | | }; [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [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] --> src/compiler/instructions.rs:1165:1 [INFO] [stdout] | [INFO] [stdout] 1165 | impl Into for isJ { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1165 ~ impl From for Instruction { [INFO] [stdout] 1166 ~ fn from(val: isJ) -> Self { [INFO] [stdout] 1167 ~ Instruction::isJ(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1171:1 [INFO] [stdout] | [INFO] [stdout] 1171 | impl Into for isJ { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1171 ~ impl From for u32 { [INFO] [stdout] 1172 ~ fn from(val: isJ) -> Self { [INFO] [stdout] 1173 ~ val.op as u32 | val.j << 7 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1182:16 [INFO] [stdout] | [INFO] [stdout] 1182 | j: b as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/compiler/instructions.rs:1226:1 [INFO] [stdout] | [INFO] [stdout] 1226 | impl Into for iAx { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1226 ~ impl From for Instruction { [INFO] [stdout] 1227 ~ fn from(val: iAx) -> Self { [INFO] [stdout] 1228 ~ Instruction::iAx(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1232:1 [INFO] [stdout] | [INFO] [stdout] 1232 | impl Into for iAx { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1232 ~ impl From for u32 { [INFO] [stdout] 1233 ~ fn from(val: iAx) -> Self { [INFO] [stdout] 1234 ~ val.op as u32 | (val.a as u32) << 7 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1234:26 [INFO] [stdout] | [INFO] [stdout] 1234 | self.op as u32 | (self.a as u32) << 7 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1243:16 [INFO] [stdout] | [INFO] [stdout] 1243 | a: a as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/instructions.rs:1255:9 [INFO] [stdout] | [INFO] [stdout] 1251 | / let s = match self.op { [INFO] [stdout] 1252 | | _ => self.to_string(), [INFO] [stdout] 1253 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 1254 | [INFO] [stdout] 1255 | s [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] 1251 ~ [INFO] [stdout] 1252 | [INFO] [stdout] 1253 ~ match self.op { [INFO] [stdout] 1254 + _ => self.to_string(), [INFO] [stdout] 1255 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/compiler/instructions.rs:1251:17 [INFO] [stdout] | [INFO] [stdout] 1251 | let s = match self.op { [INFO] [stdout] | _________________^ [INFO] [stdout] 1252 | | _ => self.to_string(), [INFO] [stdout] 1253 | | }; [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [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] --> src/compiler/instructions.rs:740:1 [INFO] [stdout] | [INFO] [stdout] 740 | impl Into for iABC { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 740 ~ impl From for Instruction { [INFO] [stdout] 741 ~ fn from(val: iABC) -> Self { [INFO] [stdout] 742 ~ Instruction::iABC(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:746:1 [INFO] [stdout] | [INFO] [stdout] 746 | impl Into for iABC { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 746 ~ impl From for u32 { [INFO] [stdout] 747 ~ fn from(val: iABC) -> Self { [INFO] [stdout] 748 ~ val.op as u32 [INFO] [stdout] 749 ~ | (val.a as u32) << 7 [INFO] [stdout] 750 ~ | (val.k as u32) << 15 [INFO] [stdout] 751 ~ | (val.b as u32) << 16 [INFO] [stdout] 752 ~ | (val.c as u32) << 24 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/instructions.rs:924:17 [INFO] [stdout] | [INFO] [stdout] 924 | format!("{}", self.op.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.op.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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/compiler/instructions.rs:924:38 [INFO] [stdout] | [INFO] [stdout] 924 | format!("{}", self.op.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:58:51 [INFO] [stdout] | [INFO] [stdout] 58 | let target = final_jmp_target(&insts, pc); [INFO] [stdout] | ^^^^^^ help: change this to: `insts` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/compiler/instructions.rs:1019:1 [INFO] [stdout] | [INFO] [stdout] 1019 | impl Into for iABx { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1019 ~ impl From for Instruction { [INFO] [stdout] 1020 ~ fn from(val: iABx) -> Self { [INFO] [stdout] 1021 ~ Instruction::iABx(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1025:1 [INFO] [stdout] | [INFO] [stdout] 1025 | impl Into for iABx { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1025 ~ impl From for u32 { [INFO] [stdout] 1026 ~ fn from(val: iABx) -> Self { [INFO] [stdout] 1027 ~ val.op as u32 | (val.a as u32) << 7 | val.b << 15 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1037:16 [INFO] [stdout] | [INFO] [stdout] 1037 | b: b as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/compiler/mod.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | ) -> Result<(Vec, Vec<(u32, Option, LogicCmpOp)>), LuzError> { [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: this match could be replaced by its body itself [INFO] [stdout] --> src/compiler/instructions.rs:1072:17 [INFO] [stdout] | [INFO] [stdout] 1072 | let b = match self.op { [INFO] [stdout] | _________________^ [INFO] [stdout] 1073 | | // LuaOpCode::OP_LOADK => -(self.b as i32 + 1), [INFO] [stdout] 1074 | | _ => self.b as i32, [INFO] [stdout] 1075 | | }; [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.b as i32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [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] --> src/compiler/instructions.rs:1092:1 [INFO] [stdout] | [INFO] [stdout] 1092 | impl Into for iAsBx { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1092 ~ impl From for Instruction { [INFO] [stdout] 1093 ~ fn from(val: iAsBx) -> Self { [INFO] [stdout] 1094 ~ Instruction::iAsBx(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1098:1 [INFO] [stdout] | [INFO] [stdout] 1098 | impl Into for iAsBx { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1098 ~ impl From for u32 { [INFO] [stdout] 1099 ~ fn from(val: iAsBx) -> Self { [INFO] [stdout] 1100 ~ let b = val.b << 15; [INFO] [stdout] 1101 | // println!( [INFO] [stdout] ... [INFO] [stdout] 1107 | // ); [INFO] [stdout] 1108 ~ let result = val.op as u32 | (val.a as u32) << 7 | b; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/instructions.rs:1109:9 [INFO] [stdout] | [INFO] [stdout] 1108 | let result = self.op as u32 | (self.a as u32) << 7 | b; [INFO] [stdout] | ------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1109 | result [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] 1108 ~ [INFO] [stdout] 1109 ~ self.op as u32 | (self.a as u32) << 7 | b [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1126:16 [INFO] [stdout] | [INFO] [stdout] 1126 | b: b as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/instructions.rs:1139:9 [INFO] [stdout] | [INFO] [stdout] 1135 | / let s = match self.op { [INFO] [stdout] 1136 | | _ => self.to_string(), [INFO] [stdout] 1137 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 1138 | [INFO] [stdout] 1139 | s [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] 1135 ~ [INFO] [stdout] 1136 | [INFO] [stdout] 1137 ~ match self.op { [INFO] [stdout] 1138 + _ => self.to_string(), [INFO] [stdout] 1139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/compiler/instructions.rs:1135:17 [INFO] [stdout] | [INFO] [stdout] 1135 | let s = match self.op { [INFO] [stdout] | _________________^ [INFO] [stdout] 1136 | | _ => self.to_string(), [INFO] [stdout] 1137 | | }; [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [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] --> src/compiler/instructions.rs:1165:1 [INFO] [stdout] | [INFO] [stdout] 1165 | impl Into for isJ { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1165 ~ impl From for Instruction { [INFO] [stdout] 1166 ~ fn from(val: isJ) -> Self { [INFO] [stdout] 1167 ~ Instruction::isJ(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1171:1 [INFO] [stdout] | [INFO] [stdout] 1171 | impl Into for isJ { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1171 ~ impl From for u32 { [INFO] [stdout] 1172 ~ fn from(val: isJ) -> Self { [INFO] [stdout] 1173 ~ val.op as u32 | val.j << 7 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1182:16 [INFO] [stdout] | [INFO] [stdout] 1182 | j: b as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/compiler/instructions.rs:1226:1 [INFO] [stdout] | [INFO] [stdout] 1226 | impl Into for iAx { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1226 ~ impl From for Instruction { [INFO] [stdout] 1227 ~ fn from(val: iAx) -> Self { [INFO] [stdout] 1228 ~ Instruction::iAx(val) [INFO] [stdout] | [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] --> src/compiler/instructions.rs:1232:1 [INFO] [stdout] | [INFO] [stdout] 1232 | impl Into for iAx { [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: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1232 ~ impl From for u32 { [INFO] [stdout] 1233 ~ fn from(val: iAx) -> Self { [INFO] [stdout] 1234 ~ val.op as u32 | (val.a as u32) << 7 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1234:26 [INFO] [stdout] | [INFO] [stdout] 1234 | self.op as u32 | (self.a as u32) << 7 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/compiler/instructions.rs:1243:16 [INFO] [stdout] | [INFO] [stdout] 1243 | a: a as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/instructions.rs:1255:9 [INFO] [stdout] | [INFO] [stdout] 1251 | / let s = match self.op { [INFO] [stdout] 1252 | | _ => self.to_string(), [INFO] [stdout] 1253 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 1254 | [INFO] [stdout] 1255 | s [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] 1251 ~ [INFO] [stdout] 1252 | [INFO] [stdout] 1253 ~ match self.op { [INFO] [stdout] 1254 + _ => self.to_string(), [INFO] [stdout] 1255 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/compiler/instructions.rs:1251:17 [INFO] [stdout] | [INFO] [stdout] 1251 | let s = match self.op { [INFO] [stdout] | _________________^ [INFO] [stdout] 1252 | | _ => self.to_string(), [INFO] [stdout] 1253 | | }; [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:519:51 [INFO] [stdout] | [INFO] [stdout] 519 | let prop_imm = self.handle_immidiate(ctx, &prop, true)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:534:36 [INFO] [stdout] | [INFO] [stdout] 534 | self.visit_exp(&prop, ctx)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [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: all variants have the same prefix: `In` [INFO] [stdout] --> src/compiler/mod.rs:602:1 [INFO] [stdout] | [INFO] [stdout] 602 | / enum ExpEval { [INFO] [stdout] 603 | | InImmediate(u8), [INFO] [stdout] 604 | | InRegister(u8), [INFO] [stdout] 605 | | InConstant(u8), [INFO] [stdout] ... | [INFO] [stdout] 610 | | }, [INFO] [stdout] 611 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/mod.rs:687:13 [INFO] [stdout] | [INFO] [stdout] 686 | let else_instrs = self.collect_insts_and_rollback_stat(ctx, else_br)?; [INFO] [stdout] | ---------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 687 | else_instrs [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] 686 ~ [INFO] [stdout] 687 ~ self.collect_insts_and_rollback_stat(ctx, else_br)? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:58:51 [INFO] [stdout] | [INFO] [stdout] 58 | let target = final_jmp_target(&insts, pc); [INFO] [stdout] | ^^^^^^ help: change this to: `insts` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/compiler/mod.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | ) -> Result<(Vec, Vec<(u32, Option, LogicCmpOp)>), LuzError> { [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1282:65 [INFO] [stdout] | [INFO] [stdout] 1282 | let res = self.handle_exp(&mut one_exp_ctx, &obj, false, true, false)?; [INFO] [stdout] | ^^^^ help: change this to: `obj` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1295:52 [INFO] [stdout] | [INFO] [stdout] 1295 | ... self.visit_exp(&prop, &mut one_exp_ctx)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1325:70 [INFO] [stdout] | [INFO] [stdout] 1325 | ... (self.load_exp(&mut one_exp_ctx, &prop)?, false) [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> src/compiler/mod.rs:1347:36 [INFO] [stdout] | [INFO] [stdout] 1347 | let nb_last_expected = varlist.len().checked_sub(explist.len() - 1).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `varlist.len().saturating_sub(explist.len() - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] = note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:519:51 [INFO] [stdout] | [INFO] [stdout] 519 | let prop_imm = self.handle_immidiate(ctx, &prop, true)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:534:36 [INFO] [stdout] | [INFO] [stdout] 534 | self.visit_exp(&prop, ctx)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1424:76 [INFO] [stdout] | [INFO] [stdout] 1424 | let prop_imm = self.handle_immidiate(&mut one_exp_ctx, &prop, true)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [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: all variants have the same prefix: `In` [INFO] [stdout] --> src/compiler/mod.rs:602:1 [INFO] [stdout] | [INFO] [stdout] 602 | / enum ExpEval { [INFO] [stdout] 603 | | InImmediate(u8), [INFO] [stdout] 604 | | InRegister(u8), [INFO] [stdout] 605 | | InConstant(u8), [INFO] [stdout] ... | [INFO] [stdout] 610 | | }, [INFO] [stdout] 611 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> src/compiler/mod.rs:1489:25 [INFO] [stdout] | [INFO] [stdout] 1489 | varlist.len().checked_sub(explist.len() - 1).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `varlist.len().saturating_sub(explist.len() - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/mod.rs:687:13 [INFO] [stdout] | [INFO] [stdout] 686 | let else_instrs = self.collect_insts_and_rollback_stat(ctx, else_br)?; [INFO] [stdout] | ---------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 687 | else_instrs [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] 686 ~ [INFO] [stdout] 687 ~ self.collect_insts_and_rollback_stat(ctx, else_br)? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1282:65 [INFO] [stdout] | [INFO] [stdout] 1282 | let res = self.handle_exp(&mut one_exp_ctx, &obj, false, true, false)?; [INFO] [stdout] | ^^^^ help: change this to: `obj` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1295:52 [INFO] [stdout] | [INFO] [stdout] 1295 | ... self.visit_exp(&prop, &mut one_exp_ctx)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1325:70 [INFO] [stdout] | [INFO] [stdout] 1325 | ... (self.load_exp(&mut one_exp_ctx, &prop)?, false) [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> src/compiler/mod.rs:1347:36 [INFO] [stdout] | [INFO] [stdout] 1347 | let nb_last_expected = varlist.len().checked_sub(explist.len() - 1).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `varlist.len().saturating_sub(explist.len() - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] = note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/mod.rs:1424:76 [INFO] [stdout] | [INFO] [stdout] 1424 | let prop_imm = self.handle_immidiate(&mut one_exp_ctx, &prop, true)?; [INFO] [stdout] | ^^^^^ help: change this to: `prop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> src/compiler/mod.rs:1489:25 [INFO] [stdout] | [INFO] [stdout] 1489 | varlist.len().checked_sub(explist.len() - 1).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `varlist.len().saturating_sub(explist.len() - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/mod.rs:2773:28 [INFO] [stdout] | [INFO] [stdout] 2773 | fn final_jmp_target(insts: &Vec, mut pc: usize) -> usize { [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] 2773 - fn final_jmp_target(insts: &Vec, mut pc: usize) -> usize { [INFO] [stdout] 2773 + fn final_jmp_target(insts: &[Instruction], mut pc: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Numeral` which implements the `Copy` trait [INFO] [stdout] --> src/luz/obj.rs:65:50 [INFO] [stdout] | [INFO] [stdout] 65 | Self::Numeral(arg0) => Self::Numeral(arg0.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*arg0` [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 `bool` which implements the `Copy` trait [INFO] [stdout] --> src/luz/obj.rs:66:50 [INFO] [stdout] | [INFO] [stdout] 66 | Self::Boolean(arg0) => Self::Boolean(arg0.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*arg0` [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: accessing first element with `result.get(0)` [INFO] [stdout] --> src/luz/obj.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | Ok(result.get(0).unwrap_or(&LuzObj::Nil).clone()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `result.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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/luz/obj.rs:163:27 [INFO] [stdout] | [INFO] [stdout] 163 | Ok(method.map(|met| met.callable()).flatten()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|met| met.callable())` [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: you should use the `starts_with` method [INFO] [stdout] --> src/luz/obj.rs:230:29 [INFO] [stdout] | [INFO] [stdout] 230 | let string = if s.chars().next().unwrap() == '\n' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/luz/obj.rs:339:45 [INFO] [stdout] | [INFO] [stdout] 339 | ... string.push(transmute(code)); [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` 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] --> src/compiler/mod.rs:2773:28 [INFO] [stdout] | [INFO] [stdout] 2773 | fn final_jmp_target(insts: &Vec, mut pc: usize) -> usize { [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] 2773 - fn final_jmp_target(insts: &Vec, mut pc: usize) -> usize { [INFO] [stdout] 2773 + fn final_jmp_target(insts: &[Instruction], mut pc: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Numeral` which implements the `Copy` trait [INFO] [stdout] --> src/luz/obj.rs:65:50 [INFO] [stdout] | [INFO] [stdout] 65 | Self::Numeral(arg0) => Self::Numeral(arg0.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*arg0` [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 `bool` which implements the `Copy` trait [INFO] [stdout] --> src/luz/obj.rs:66:50 [INFO] [stdout] | [INFO] [stdout] 66 | Self::Boolean(arg0) => Self::Boolean(arg0.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*arg0` [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: accessing first element with `result.get(0)` [INFO] [stdout] --> src/luz/obj.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | Ok(result.get(0).unwrap_or(&LuzObj::Nil).clone()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `result.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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/luz/obj.rs:163:27 [INFO] [stdout] | [INFO] [stdout] 163 | Ok(method.map(|met| met.callable()).flatten()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|met| met.callable())` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/luz/function.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | Rc) -> Result, LuzRuntimeError>>>, [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] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/luz/obj.rs:230:29 [INFO] [stdout] | [INFO] [stdout] 230 | let string = if s.chars().next().unwrap() == '\n' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/luz/function.rs:42:19 [INFO] [stdout] | [INFO] [stdout] 42 | scope.map(|scope| Rc::clone(scope)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/luz/function.rs:114:74 [INFO] [stdout] | [INFO] [stdout] 114 | .map_err(|err| LuzRuntimeError::ErrorObj(LuzObj::str(&err.to_string()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `err.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/luz/obj.rs:339:45 [INFO] [stdout] | [INFO] [stdout] 339 | ... string.push(transmute(code)); [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:155:22 [INFO] [stdout] | [INFO] [stdout] 155 | if !is_valid_bin(&bin) { [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:159:31 [INFO] [stdout] | [INFO] [stdout] 159 | let version = get_next_u8(&bin, &mut ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:169:32 [INFO] [stdout] | [INFO] [stdout] 169 | let scope = load_scope_bin(&bin, name, &mut ptr, scope)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:191:35 [INFO] [stdout] | [INFO] [stdout] 191 | let num_params = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:192:33 [INFO] [stdout] | [INFO] [stdout] 192 | let num_regs = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:193:35 [INFO] [stdout] | [INFO] [stdout] 193 | let num_upvals = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:194:39 [INFO] [stdout] | [INFO] [stdout] 194 | let num_sub_scopes = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:195:41 [INFO] [stdout] | [INFO] [stdout] 195 | let num_instructions = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:196:38 [INFO] [stdout] | [INFO] [stdout] 196 | let num_constants = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:200:32 [INFO] [stdout] | [INFO] [stdout] 200 | let code = get_next_u8(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:203:44 [INFO] [stdout] | [INFO] [stdout] 203 | let str_len = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:212:60 [INFO] [stdout] | [INFO] [stdout] 212 | let i = i64::from_be_bytes(get_next_8bytes(&bin, ptr)?); [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:216:60 [INFO] [stdout] | [INFO] [stdout] 216 | let f = f64::from_be_bytes(get_next_8bytes(&bin, ptr)?); [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:241:39 [INFO] [stdout] | [INFO] [stdout] 241 | let parent_addr = get_next_u8(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:242:33 [INFO] [stdout] | [INFO] [stdout] 242 | let flags = get_next_u8(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:246:45 [INFO] [stdout] | [INFO] [stdout] 246 | let upvalue_name_len = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:274:38 [INFO] [stdout] | [INFO] [stdout] 274 | let next_inst = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:282:40 [INFO] [stdout] | [INFO] [stdout] 282 | let sub_scope = load_scope_bin(&bin, None, ptr, Rc::clone(&scope))?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [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: redundant closure [INFO] [stdout] --> src/luz/fn_dump.rs:314:22 [INFO] [stdout] | [INFO] [stdout] 314 | .map(|ss| LuzFunctionDump::from(ss)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `LuzFunctionDump::from` [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: importing legacy numeric constants [INFO] [stdout] --> src/luz/numeral.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | u64, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/luz/numeral.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | / match (self, rhs) { [INFO] [stdout] 176 | | (Numeral::Int(i1), Numeral::Int(i2)) => { [INFO] [stdout] 177 | | if i2 == 0 { [INFO] [stdout] 178 | | return Err(LuzRuntimeError::message("attempt to perform 'n%0'").into()); [INFO] [stdout] ... | [INFO] [stdout] 187 | | _ => {} [INFO] [stdout] 188 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 ~ if let (Numeral::Int(i1), Numeral::Int(i2)) = (self, rhs) { [INFO] [stdout] 176 + if i2 == 0 { [INFO] [stdout] 177 + return Err(LuzRuntimeError::message("attempt to perform 'n%0'").into()); [INFO] [stdout] 178 + } [INFO] [stdout] 179 + let r = i1 % i2; // Rust remainder [INFO] [stdout] 180 + return Ok(Numeral::Int(if (r != 0) && ((r < 0) != (i2 < 0)) { [INFO] [stdout] 181 + r + i2 [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + r [INFO] [stdout] 184 + })); [INFO] [stdout] 185 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/numeral.rs:229:23 [INFO] [stdout] | [INFO] [stdout] 229 | let lhs_val = lhs_val as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `lhs_val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/numeral.rs:230:23 [INFO] [stdout] | [INFO] [stdout] 230 | let rhs_val = rhs_val as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rhs_val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/numeral.rs:258:23 [INFO] [stdout] | [INFO] [stdout] 258 | let rhs_val = rhs_val as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rhs_val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/luz/function.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | Rc) -> Result, LuzRuntimeError>>>, [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:342:16 [INFO] [stdout] | [INFO] [stdout] 342 | Ok(Numeral::Int(sign * int).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Int(sign * int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:344:16 [INFO] [stdout] | [INFO] [stdout] 344 | Ok(Numeral::Float(sign as f64 * float).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Float(sign as f64 * float)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/luz/function.rs:42:19 [INFO] [stdout] | [INFO] [stdout] 42 | scope.map(|scope| Rc::clone(scope)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/luz/numeral.rs:349:48 [INFO] [stdout] | [INFO] [stdout] 349 | if let Some(dot_pos) = string.find(&['.', ',']) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ',']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/luz/function.rs:114:74 [INFO] [stdout] | [INFO] [stdout] 114 | .map_err(|err| LuzRuntimeError::ErrorObj(LuzObj::str(&err.to_string()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `err.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:381:20 [INFO] [stdout] | [INFO] [stdout] 381 | Ok(Numeral::Float(num).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Float(num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:397:35 [INFO] [stdout] | [INFO] [stdout] 397 | return Ok(Numeral::Float(num).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Float(num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:400:24 [INFO] [stdout] | [INFO] [stdout] 400 | Ok(Numeral::Int(num).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Int(num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/table.rs:28:23 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn new(table: HashMap, metatable: Option>>) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: `#[warn(clippy::mutable_key_type)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:155:22 [INFO] [stdout] | [INFO] [stdout] 155 | if !is_valid_bin(&bin) { [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:159:31 [INFO] [stdout] | [INFO] [stdout] 159 | let version = get_next_u8(&bin, &mut ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [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: accessing first element with `result.get(0)` [INFO] [stdout] --> src/luz/table.rs:103:33 [INFO] [stdout] | [INFO] [stdout] 103 | Ok(Some(result.get(0).unwrap_or(&LuzObj::Nil).clone())) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `result.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:169:32 [INFO] [stdout] | [INFO] [stdout] 169 | let scope = load_scope_bin(&bin, name, &mut ptr, scope)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:191:35 [INFO] [stdout] | [INFO] [stdout] 191 | let num_params = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:192:33 [INFO] [stdout] | [INFO] [stdout] 192 | let num_regs = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:193:35 [INFO] [stdout] | [INFO] [stdout] 193 | let num_upvals = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [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: redundant closure [INFO] [stdout] --> src/luz/table.rs:168:37 [INFO] [stdout] | [INFO] [stdout] 168 | self.metatable.as_ref().map(|m| Rc::clone(m)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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] --> src/luz/fn_dump.rs:194:39 [INFO] [stdout] | [INFO] [stdout] 194 | let num_sub_scopes = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:195:41 [INFO] [stdout] | [INFO] [stdout] 195 | let num_instructions = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:196:38 [INFO] [stdout] | [INFO] [stdout] 196 | let num_constants = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [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: struct `Table` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/luz/table.rs:212:5 [INFO] [stdout] | [INFO] [stdout] 212 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:200:32 [INFO] [stdout] | [INFO] [stdout] 200 | let code = get_next_u8(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:203:44 [INFO] [stdout] | [INFO] [stdout] 203 | let str_len = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:212:60 [INFO] [stdout] | [INFO] [stdout] 212 | let i = i64::from_be_bytes(get_next_8bytes(&bin, ptr)?); [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:216:60 [INFO] [stdout] | [INFO] [stdout] 216 | let f = f64::from_be_bytes(get_next_8bytes(&bin, ptr)?); [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:241:39 [INFO] [stdout] | [INFO] [stdout] 241 | let parent_addr = get_next_u8(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:242:33 [INFO] [stdout] | [INFO] [stdout] 242 | let flags = get_next_u8(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:246:45 [INFO] [stdout] | [INFO] [stdout] 246 | let upvalue_name_len = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/env.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | / luz_table! { [INFO] [stdout] 29 | | __add: luz_fn!([1]() { Ok(vec![])}) [INFO] [stdout] 30 | | }, [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:274:38 [INFO] [stdout] | [INFO] [stdout] 274 | let next_inst = get_next_u32(&bin, ptr)?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/luz/fn_dump.rs:282:40 [INFO] [stdout] | [INFO] [stdout] 282 | let sub_scope = load_scope_bin(&bin, None, ptr, Rc::clone(&scope))?; [INFO] [stdout] | ^^^^ help: change this to: `bin` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/env.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 35 | | _VERSION: LuzObj::str("Lua 5.4"), [INFO] [stdout] 36 | | _LUZ_VERSION: LuzObj::str("Luz 0.1"), [INFO] [stdout] ... | [INFO] [stdout] 422 | | }), [INFO] [stdout] 423 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/luz/fn_dump.rs:314:22 [INFO] [stdout] | [INFO] [stdout] 314 | .map(|ss| LuzFunctionDump::from(ss)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `LuzFunctionDump::from` [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: importing legacy numeric constants [INFO] [stdout] --> src/luz/numeral.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | u64, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/luz/numeral.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | / match (self, rhs) { [INFO] [stdout] 176 | | (Numeral::Int(i1), Numeral::Int(i2)) => { [INFO] [stdout] 177 | | if i2 == 0 { [INFO] [stdout] 178 | | return Err(LuzRuntimeError::message("attempt to perform 'n%0'").into()); [INFO] [stdout] ... | [INFO] [stdout] 187 | | _ => {} [INFO] [stdout] 188 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 ~ if let (Numeral::Int(i1), Numeral::Int(i2)) = (self, rhs) { [INFO] [stdout] 176 + if i2 == 0 { [INFO] [stdout] 177 + return Err(LuzRuntimeError::message("attempt to perform 'n%0'").into()); [INFO] [stdout] 178 + } [INFO] [stdout] 179 + let r = i1 % i2; // Rust remainder [INFO] [stdout] 180 + return Ok(Numeral::Int(if (r != 0) && ((r < 0) != (i2 < 0)) { [INFO] [stdout] 181 + r + i2 [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + r [INFO] [stdout] 184 + })); [INFO] [stdout] 185 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/numeral.rs:229:23 [INFO] [stdout] | [INFO] [stdout] 229 | let lhs_val = lhs_val as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `lhs_val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/numeral.rs:230:23 [INFO] [stdout] | [INFO] [stdout] 230 | let rhs_val = rhs_val as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rhs_val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> src/luz/lib/env.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | let Some(condition) = args.get(0) else { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.front()` [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/numeral.rs:258:23 [INFO] [stdout] | [INFO] [stdout] 258 | let rhs_val = rhs_val as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rhs_val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `results.get(0)` [INFO] [stdout] --> src/luz/lib/env.rs:159:41 [INFO] [stdout] | [INFO] [stdout] 159 | let new_input = results.get(0).unwrap_or(&LuzObj::Nil); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `results.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: length comparison to zero [INFO] [stdout] --> src/luz/lib/env.rs:163:32 [INFO] [stdout] | [INFO] [stdout] 163 | ... if s.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:342:16 [INFO] [stdout] | [INFO] [stdout] 342 | Ok(Numeral::Int(sign * int).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Int(sign * int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:344:16 [INFO] [stdout] | [INFO] [stdout] 344 | Ok(Numeral::Float(sign as f64 * float).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Float(sign as f64 * float)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to usize [INFO] [stdout] --> src/luz/lib/env.rs:253:40 [INFO] [stdout] | [INFO] [stdout] 253 | vararg.len() - i.abs() as usize [INFO] [stdout] | ^^^^^^^ help: replace with: `i.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/luz/numeral.rs:349:48 [INFO] [stdout] | [INFO] [stdout] 349 | if let Some(dot_pos) = string.find(&['.', ',']) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ',']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/luz/lib/env.rs:262:51 [INFO] [stdout] | [INFO] [stdout] 262 | _ => Err(LuzRuntimeError::message(format!("bad argument #1 to 'select' (integer or '#' expected)"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"bad argument #1 to 'select' (integer or '#' expected)".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 conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:381:20 [INFO] [stdout] | [INFO] [stdout] 381 | Ok(Numeral::Float(num).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Float(num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:397:35 [INFO] [stdout] | [INFO] [stdout] 397 | return Ok(Numeral::Float(num).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Float(num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `luz::numeral::Numeral` [INFO] [stdout] --> src/luz/numeral.rs:400:24 [INFO] [stdout] | [INFO] [stdout] 400 | Ok(Numeral::Int(num).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Numeral::Int(num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/table.rs:28:23 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn new(table: HashMap, metatable: Option>>) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: `#[warn(clippy::mutable_key_type)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `result.get(0)` [INFO] [stdout] --> src/luz/lib/env.rs:350:29 [INFO] [stdout] | [INFO] [stdout] 350 | ... result.get(0).unwrap_or(&LuzObj::Nil).clone() [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `result.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 `result.get(0)` [INFO] [stdout] --> src/luz/table.rs:103:33 [INFO] [stdout] | [INFO] [stdout] 103 | Ok(Some(result.get(0).unwrap_or(&LuzObj::Nil).clone())) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `result.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: redundant closure [INFO] [stdout] --> src/luz/table.rs:168:37 [INFO] [stdout] | [INFO] [stdout] 168 | self.metatable.as_ref().map(|m| Rc::clone(m)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [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: struct `Table` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/luz/table.rs:212:5 [INFO] [stdout] | [INFO] [stdout] 212 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/env.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | / luz_table! { [INFO] [stdout] 29 | | __add: luz_fn!([1]() { Ok(vec![])}) [INFO] [stdout] 30 | | }, [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/env.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 35 | | _VERSION: LuzObj::str("Lua 5.4"), [INFO] [stdout] 36 | | _LUZ_VERSION: LuzObj::str("Luz 0.1"), [INFO] [stdout] ... | [INFO] [stdout] 422 | | }), [INFO] [stdout] 423 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/luz/lib/env.rs:416:84 [INFO] [stdout] | [INFO] [stdout] 416 | let num = Numeral::from_str(&s.as_utf8_string_unchecked()).map(|num| LuzObj::Numeral(num)).unwrap_or(LuzObj::Nil); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `LuzObj::Numeral` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/math.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 12 | | abs: luz_fn!([1](LuzObj::Numeral(x)) { [INFO] [stdout] 13 | | let result = match x { [INFO] [stdout] 14 | | Numeral::Int(i) => Numeral::Int(i.abs()), [INFO] [stdout] ... | [INFO] [stdout] 188 | | }), [INFO] [stdout] 189 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> src/luz/lib/env.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | let Some(condition) = args.get(0) else { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.front()` [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 `results.get(0)` [INFO] [stdout] --> src/luz/lib/env.rs:159:41 [INFO] [stdout] | [INFO] [stdout] 159 | let new_input = results.get(0).unwrap_or(&LuzObj::Nil); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `results.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: length comparison to zero [INFO] [stdout] --> src/luz/lib/env.rs:163:32 [INFO] [stdout] | [INFO] [stdout] 163 | ... if s.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: casting the result of `i64::abs()` to usize [INFO] [stdout] --> src/luz/lib/env.rs:253:40 [INFO] [stdout] | [INFO] [stdout] 253 | vararg.len() - i.abs() as usize [INFO] [stdout] | ^^^^^^^ help: replace with: `i.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/luz/lib/env.rs:262:51 [INFO] [stdout] | [INFO] [stdout] 262 | _ => Err(LuzRuntimeError::message(format!("bad argument #1 to 'select' (integer or '#' expected)"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"bad argument #1 to 'select' (integer or '#' expected)".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: accessing first element with `result.get(0)` [INFO] [stdout] --> src/luz/lib/env.rs:350:29 [INFO] [stdout] | [INFO] [stdout] 350 | ... result.get(0).unwrap_or(&LuzObj::Nil).clone() [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `result.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] --> src/luz/lib/require.rs:17:29 [INFO] [stdout] | [INFO] [stdout] 17 | luz_let!(modname =? args.get(0); else "bad argument #1 to 'require' (expected string)"); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.front()` [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: redundant closure [INFO] [stdout] --> src/luz/lib/env.rs:416:84 [INFO] [stdout] | [INFO] [stdout] 416 | let num = Numeral::from_str(&s.as_utf8_string_unchecked()).map(|num| LuzObj::Numeral(num)).unwrap_or(LuzObj::Nil); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `LuzObj::Numeral` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/require.rs:69:18 [INFO] [stdout] | [INFO] [stdout] 69 | let loaded = luz_table! {}; [INFO] [stdout] | ------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/require.rs:75:19 [INFO] [stdout] | [INFO] [stdout] 75 | let preload = luz_table! { [INFO] [stdout] | ___________________- [INFO] [stdout] 76 | | debug: luz_fn!([0, runner]() { [INFO] [stdout] 77 | | Ok(vec![debug_lib(runner.registry())]) [INFO] [stdout] 78 | | }) [INFO] [stdout] 79 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/math.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 12 | | abs: luz_fn!([1](LuzObj::Numeral(x)) { [INFO] [stdout] 13 | | let result = match x { [INFO] [stdout] 14 | | Numeral::Int(i) => Numeral::Int(i.abs()), [INFO] [stdout] ... | [INFO] [stdout] 188 | | }), [INFO] [stdout] 189 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/luz/lib/require.rs:101:42 [INFO] [stdout] | [INFO] [stdout] 101 | Ok(vec![LuzObj::Nil, LuzObj::str(&tried.join(";"))]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `tried.join(";")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/require.rs:152:19 [INFO] [stdout] | [INFO] [stdout] 152 | let package = luz_table! { [INFO] [stdout] | ___________________- [INFO] [stdout] 153 | | loaded: reg.rawget(&LuzObj::str("package.loaded")).clone(), [INFO] [stdout] 154 | | preload: reg.rawget(&LuzObj::str("package.preload")).clone(), [INFO] [stdout] 155 | | searchers: searchers, [INFO] [stdout] 156 | | searchpath: search_path, [INFO] [stdout] 157 | | path: LuzObj::str(path), [INFO] [stdout] 158 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/string.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 15 | | len: luz_fn!([1](*args) { [INFO] [stdout] 16 | | let mut args = VecDeque::from(args); [INFO] [stdout] 17 | | let Some(LuzObj::String(s)) = args.pop_front() else { [INFO] [stdout] ... | [INFO] [stdout] 100 | | }), [INFO] [stdout] 101 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::VecDeque` [INFO] [stdout] --> src/luz/lib/string.rs:16:28 [INFO] [stdout] | [INFO] [stdout] 16 | let mut args = VecDeque::from(args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `VecDeque::from()`: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::VecDeque` [INFO] [stdout] --> src/luz/lib/string.rs:25:28 [INFO] [stdout] | [INFO] [stdout] 25 | let mut args = VecDeque::from(args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `VecDeque::from()`: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::VecDeque` [INFO] [stdout] --> src/luz/lib/string.rs:34:28 [INFO] [stdout] | [INFO] [stdout] 34 | let mut args = VecDeque::from(args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `VecDeque::from()`: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/luz/lib/string.rs:178:5 [INFO] [stdout] | [INFO] [stdout] 178 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/luz/lib/string.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> src/luz/lib/require.rs:17:29 [INFO] [stdout] | [INFO] [stdout] 17 | luz_let!(modname =? args.get(0); else "bad argument #1 to 'require' (expected string)"); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.front()` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/table.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 15 | | pack: luz_fn!([1](*args) { [INFO] [stdout] 16 | | let mut table = Table::new(HashMap::new(), None); [INFO] [stdout] 17 | | let len = args.len() as i64; [INFO] [stdout] ... | [INFO] [stdout] 130 | | }) [INFO] [stdout] 131 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/require.rs:69:18 [INFO] [stdout] | [INFO] [stdout] 69 | let loaded = luz_table! {}; [INFO] [stdout] | ------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/require.rs:75:19 [INFO] [stdout] | [INFO] [stdout] 75 | let preload = luz_table! { [INFO] [stdout] | ___________________- [INFO] [stdout] 76 | | debug: luz_fn!([0, runner]() { [INFO] [stdout] 77 | | Ok(vec![debug_lib(runner.registry())]) [INFO] [stdout] 78 | | }) [INFO] [stdout] 79 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/luz/lib/require.rs:101:42 [INFO] [stdout] | [INFO] [stdout] 101 | Ok(vec![LuzObj::Nil, LuzObj::str(&tried.join(";"))]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `tried.join(";")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/lib/table.rs:69:57 [INFO] [stdout] | [INFO] [stdout] 69 | let obj = list.get(runner, &LuzObj::int(idx as i64))?.unwrap_or(LuzObj::Nil); [INFO] [stdout] | ^^^^^^^^^^ help: try: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `result.unwrap().get(0)` [INFO] [stdout] --> src/luz/lib/table.rs:108:24 [INFO] [stdout] | [INFO] [stdout] 108 | if result.unwrap().get(0).unwrap_or(&LuzObj::Nil).is_true() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.unwrap().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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/require.rs:152:19 [INFO] [stdout] | [INFO] [stdout] 152 | let package = luz_table! { [INFO] [stdout] | ___________________- [INFO] [stdout] 153 | | loaded: reg.rawget(&LuzObj::str("package.loaded")).clone(), [INFO] [stdout] 154 | | preload: reg.rawget(&LuzObj::str("package.preload")).clone(), [INFO] [stdout] 155 | | searchers: searchers, [INFO] [stdout] 156 | | searchpath: search_path, [INFO] [stdout] 157 | | path: LuzObj::str(path), [INFO] [stdout] 158 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/debug.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 12 | | getinfo: luz_fn!([1](f) { [INFO] [stdout] 13 | | [INFO] [stdout] 14 | | let result = match f { [INFO] [stdout] ... | [INFO] [stdout] 119 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/debug.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | / luz_table!{ [INFO] [stdout] 26 | | source: LuzObj::str(scope.name().cloned().unwrap_or_default()), [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/string.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 15 | | len: luz_fn!([1](*args) { [INFO] [stdout] 16 | | let mut args = VecDeque::from(args); [INFO] [stdout] 17 | | let Some(LuzObj::String(s)) = args.pop_front() else { [INFO] [stdout] ... | [INFO] [stdout] 100 | | }), [INFO] [stdout] 101 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::VecDeque` [INFO] [stdout] --> src/luz/lib/string.rs:16:28 [INFO] [stdout] | [INFO] [stdout] 16 | let mut args = VecDeque::from(args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `VecDeque::from()`: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::VecDeque` [INFO] [stdout] --> src/luz/lib/string.rs:25:28 [INFO] [stdout] | [INFO] [stdout] 25 | let mut args = VecDeque::from(args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `VecDeque::from()`: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::VecDeque` [INFO] [stdout] --> src/luz/lib/string.rs:34:28 [INFO] [stdout] | [INFO] [stdout] 34 | let mut args = VecDeque::from(args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `VecDeque::from()`: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/io.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 17 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 18 | | output: luz_fn!([0]() { [INFO] [stdout] 19 | | Ok(vec![ [INFO] [stdout] 20 | | LuzObj::Userdata(Rc::new(RefCell::new(Userdata::Full(Box::new(std::io::stdout()))))) [INFO] [stdout] ... | [INFO] [stdout] 35 | | }) [INFO] [stdout] 36 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/luz/lib/string.rs:178:5 [INFO] [stdout] | [INFO] [stdout] 178 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runner/mod.rs:155:27 [INFO] [stdout] | [INFO] [stdout] 155 | self.get_line(&line_info), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `line_info` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/luz/lib/string.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/runner/mod.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | / loop { [INFO] [stdout] 165 | | let Some(instruction) = ({ [INFO] [stdout] 166 | | let scope = self.scope(); [INFO] [stdout] 167 | | scope.instructions().get(self.pc - 1).cloned() [INFO] [stdout] ... | [INFO] [stdout] 197 | | break; [INFO] [stdout] 198 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 164 ~ while let Some(instruction) = ({ [INFO] [stdout] 165 + let scope = self.scope(); [INFO] [stdout] 166 + scope.instructions().get(self.pc - 1).cloned() [INFO] [stdout] 167 + }) { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/table.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 15 | | pack: luz_fn!([1](*args) { [INFO] [stdout] 16 | | let mut table = Table::new(HashMap::new(), None); [INFO] [stdout] 17 | | let len = args.len() as i64; [INFO] [stdout] ... | [INFO] [stdout] 130 | | }) [INFO] [stdout] 131 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/runner/mod.rs:189:36 [INFO] [stdout] | [INFO] [stdout] 189 | self.pc -= n.abs() as usize - 1; [INFO] [stdout] | ^^^^^^^ help: replace with: `n.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runner/mod.rs:330:24 [INFO] [stdout] | [INFO] [stdout] 330 | if !(val.is_truthy() == *k) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(val.is_truthy() != *k)` [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] --> src/runner/mod.rs:337:24 [INFO] [stdout] | [INFO] [stdout] 337 | if !(val.is_truthy() == *k) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(val.is_truthy() != *k)` [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/luz/lib/table.rs:69:57 [INFO] [stdout] | [INFO] [stdout] 69 | let obj = list.get(runner, &LuzObj::int(idx as i64))?.unwrap_or(LuzObj::Nil); [INFO] [stdout] | ^^^^^^^^^^ help: try: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `result.unwrap().get(0)` [INFO] [stdout] --> src/luz/lib/table.rs:108:24 [INFO] [stdout] | [INFO] [stdout] 108 | if result.unwrap().get(0).unwrap_or(&LuzObj::Nil).is_true() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.unwrap().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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/debug.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 12 | | getinfo: luz_fn!([1](f) { [INFO] [stdout] 13 | | [INFO] [stdout] 14 | | let result = match f { [INFO] [stdout] ... | [INFO] [stdout] 119 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/debug.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | / luz_table!{ [INFO] [stdout] 26 | | source: LuzObj::str(scope.name().cloned().unwrap_or_default()), [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/luz/lib/io.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 17 | let table = luz_table! { [INFO] [stdout] | _________________- [INFO] [stdout] 18 | | output: luz_fn!([0]() { [INFO] [stdout] 19 | | Ok(vec![ [INFO] [stdout] 20 | | LuzObj::Userdata(Rc::new(RefCell::new(Userdata::Full(Box::new(std::io::stdout()))))) [INFO] [stdout] ... | [INFO] [stdout] 35 | | }) [INFO] [stdout] 36 | | }; [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/runner/mod.rs:780:21 [INFO] [stdout] | [INFO] [stdout] 780 | let mut table = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Numeral` which implements the `Copy` trait [INFO] [stdout] --> src/runner/mod.rs:883:61 [INFO] [stdout] | [INFO] [stdout] 883 | .set_reg_val(a + 3, LuzObj::Numeral(init.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `init` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runner/mod.rs:155:27 [INFO] [stdout] | [INFO] [stdout] 155 | self.get_line(&line_info), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `line_info` [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 loop could be written as a `while let` loop [INFO] [stdout] --> src/runner/mod.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | / loop { [INFO] [stdout] 165 | | let Some(instruction) = ({ [INFO] [stdout] 166 | | let scope = self.scope(); [INFO] [stdout] 167 | | scope.instructions().get(self.pc - 1).cloned() [INFO] [stdout] ... | [INFO] [stdout] 197 | | break; [INFO] [stdout] 198 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 164 ~ while let Some(instruction) = ({ [INFO] [stdout] 165 + let scope = self.scope(); [INFO] [stdout] 166 + scope.instructions().get(self.pc - 1).cloned() [INFO] [stdout] 167 + }) { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/runner/mod.rs:189:36 [INFO] [stdout] | [INFO] [stdout] 189 | self.pc -= n.abs() as usize - 1; [INFO] [stdout] | ^^^^^^^ help: replace with: `n.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runner/mod.rs:330:24 [INFO] [stdout] | [INFO] [stdout] 330 | if !(val.is_truthy() == *k) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(val.is_truthy() != *k)` [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] --> src/runner/mod.rs:337:24 [INFO] [stdout] | [INFO] [stdout] 337 | if !(val.is_truthy() == *k) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(val.is_truthy() != *k)` [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: mutable key type [INFO] [stdout] --> src/runner/mod.rs:780:21 [INFO] [stdout] | [INFO] [stdout] 780 | let mut table = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Numeral` which implements the `Copy` trait [INFO] [stdout] --> src/runner/mod.rs:883:61 [INFO] [stdout] | [INFO] [stdout] 883 | .set_reg_val(a + 3, LuzObj::Numeral(init.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `init` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:32:51 [INFO] [stdout] | [INFO] [stdout] 32 | let mut stmts = LuaParser::parse(Rule::Chunk, &input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:57:51 [INFO] [stdout] | [INFO] [stdout] 57 | let mut stmts = LuaParser::parse(Rule::Chunk, &input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:81:51 [INFO] [stdout] | [INFO] [stdout] 81 | let mut stmts = LuaParser::parse(Rule::Chunk, &input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/lib.rs:106:24 [INFO] [stdout] | [INFO] [stdout] 106 | make_env_table(luz_table!().as_table_or_err()?), [INFO] [stdout] | ------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/lib.rs:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | make_env_table(luz_table!().as_table_or_err()?), [INFO] [stdout] | ------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/ctx.rs:114:25 [INFO] [stdout] | [INFO] [stdout] 114 | pub(crate) fn scope(&self) -> Ref { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 114 | pub(crate) fn scope(&self) -> Ref<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/ctx.rs:118:29 [INFO] [stdout] | [INFO] [stdout] 118 | pub(crate) fn scope_mut(&mut self) -> RefMut { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 118 | pub(crate) fn scope_mut(&mut self) -> RefMut<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> src/luz/obj.rs:339:45 [INFO] [stdout] | [INFO] [stdout] 339 | ... string.push(transmute(code)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `char::from_u32(…).unwrap()` [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 339 - string.push(transmute(code)); [INFO] [stdout] 339 + string.push(char::from_u32_unchecked(code)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/runner/mod.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | pub fn scope(&self) -> Ref { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 122 | pub fn scope(&self) -> Ref<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/runner/mod.rs:133:18 [INFO] [stdout] | [INFO] [stdout] 133 | fn scope_mut(&mut self) -> RefMut { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 133 | fn scope_mut(&mut self) -> RefMut<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:32:51 [INFO] [stdout] | [INFO] [stdout] 32 | let mut stmts = LuaParser::parse(Rule::Chunk, &input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:57:51 [INFO] [stdout] | [INFO] [stdout] 57 | let mut stmts = LuaParser::parse(Rule::Chunk, &input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:81:51 [INFO] [stdout] | [INFO] [stdout] 81 | let mut stmts = LuaParser::parse(Rule::Chunk, &input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/lib.rs:106:24 [INFO] [stdout] | [INFO] [stdout] 106 | make_env_table(luz_table!().as_table_or_err()?), [INFO] [stdout] | ------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/luz/lib/mod.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut table = std::collections::HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/lib.rs:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | make_env_table(luz_table!().as_table_or_err()?), [INFO] [stdout] | ------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `LuzObj`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Rc>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `RefCell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: this warning originates in the macro `luz_table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/ctx.rs:114:25 [INFO] [stdout] | [INFO] [stdout] 114 | pub(crate) fn scope(&self) -> Ref { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 114 | pub(crate) fn scope(&self) -> Ref<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/ctx.rs:118:29 [INFO] [stdout] | [INFO] [stdout] 118 | pub(crate) fn scope_mut(&mut self) -> RefMut { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 118 | pub(crate) fn scope_mut(&mut self) -> RefMut<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> src/luz/obj.rs:339:45 [INFO] [stdout] | [INFO] [stdout] 339 | ... string.push(transmute(code)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `char::from_u32(…).unwrap()` [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 339 - string.push(transmute(code)); [INFO] [stdout] 339 + string.push(char::from_u32_unchecked(code)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/runner/mod.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | pub fn scope(&self) -> Ref { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 122 | pub fn scope(&self) -> Ref<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/runner/mod.rs:133:18 [INFO] [stdout] | [INFO] [stdout] 133 | fn scope_mut(&mut self) -> RefMut { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 133 | fn scope_mut(&mut self) -> RefMut<'_, Scope> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 26.88s [INFO] running `Command { std: "docker" "inspect" "37b79e95a373c09dd6f383112922c4ea80d336bed283261bc76234f167400dfa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "37b79e95a373c09dd6f383112922c4ea80d336bed283261bc76234f167400dfa", kill_on_drop: false }` [INFO] [stdout] 37b79e95a373c09dd6f383112922c4ea80d336bed283261bc76234f167400dfa