[INFO] cloning repository https://github.com/lZh1r/abuff [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lZh1r/abuff" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FlZh1r%2Fabuff", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FlZh1r%2Fabuff'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 28b1e43d1cbba50aaecaadfa181b950354cfe81c [INFO] linting lZh1r/abuff against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FlZh1r%2Fabuff" "/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/lZh1r/abuff [INFO] finished tweaking git repo https://github.com/lZh1r/abuff [INFO] tweaked toml for git repo https://github.com/lZh1r/abuff written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lZh1r/abuff 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/lZh1r/abuff 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 ariadne v0.6.0 [INFO] [stderr] Downloaded logos-derive v0.16.0 [INFO] [stderr] Downloaded smol_str v0.3.5 [INFO] [stderr] Downloaded logos v0.16.0 [INFO] [stderr] Downloaded logos-codegen v0.16.0 [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] f85ead69f2d3489ed499e3bb6c6e01c707f06f0bcc661019f164b933188ecfc9 [INFO] running `Command { std: "docker" "start" "-a" "f85ead69f2d3489ed499e3bb6c6e01c707f06f0bcc661019f164b933188ecfc9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f85ead69f2d3489ed499e3bb6c6e01c707f06f0bcc661019f164b933188ecfc9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f85ead69f2d3489ed499e3bb6c6e01c707f06f0bcc661019f164b933188ecfc9", kill_on_drop: false }` [INFO] [stdout] f85ead69f2d3489ed499e3bb6c6e01c707f06f0bcc661019f164b933188ecfc9 [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] 55ee7b73824cc0449c1cee03432feedfb417c2d9879030e1383d04d3dcab2948 [INFO] running `Command { std: "docker" "start" "-a" "55ee7b73824cc0449c1cee03432feedfb417c2d9879030e1383d04d3dcab2948", kill_on_drop: false }` [INFO] [stderr] Compiling beef v0.5.2 [INFO] [stderr] Checking smol_str v0.3.5 [INFO] [stderr] Checking ariadne v0.6.0 [INFO] [stderr] Compiling regex-automata v0.4.13 [INFO] [stderr] Compiling logos-codegen v0.16.0 [INFO] [stderr] Compiling logos-derive v0.16.0 [INFO] [stderr] Checking logos v0.16.0 [INFO] [stderr] Checking abuff v0.3.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ast/typed.rs:348:22 [INFO] [stdout] | [INFO] [stdout] 348 | Self { kind, id: id } [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/typed.rs:348:22 [INFO] [stdout] | [INFO] [stdout] 348 | Self { kind, id: id } [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/main_parser.rs:563:57 [INFO] [stdout] | [INFO] [stdout] 563 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:564:57 [INFO] [stdout] | [INFO] [stdout] 564 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:565:57 [INFO] [stdout] | [INFO] [stdout] 565 | ... 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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:566:57 [INFO] [stdout] | [INFO] [stdout] 566 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:567:57 [INFO] [stdout] | [INFO] [stdout] 567 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:590:57 [INFO] [stdout] | [INFO] [stdout] 590 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:591:57 [INFO] [stdout] | [INFO] [stdout] 591 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:592:57 [INFO] [stdout] | [INFO] [stdout] 592 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:593:57 [INFO] [stdout] | [INFO] [stdout] 593 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:626:45 [INFO] [stdout] | [INFO] [stdout] 626 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:627:45 [INFO] [stdout] | [INFO] [stdout] 627 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:628:45 [INFO] [stdout] | [INFO] [stdout] 628 | ... 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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:629:45 [INFO] [stdout] | [INFO] [stdout] 629 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:630:45 [INFO] [stdout] | [INFO] [stdout] 630 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:653:45 [INFO] [stdout] | [INFO] [stdout] 653 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:654:45 [INFO] [stdout] | [INFO] [stdout] 654 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:655:45 [INFO] [stdout] | [INFO] [stdout] 655 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:656:45 [INFO] [stdout] | [INFO] [stdout] 656 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:563:57 [INFO] [stdout] | [INFO] [stdout] 563 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:564:57 [INFO] [stdout] | [INFO] [stdout] 564 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:565:57 [INFO] [stdout] | [INFO] [stdout] 565 | ... 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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:566:57 [INFO] [stdout] | [INFO] [stdout] 566 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:567:57 [INFO] [stdout] | [INFO] [stdout] 567 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:590:57 [INFO] [stdout] | [INFO] [stdout] 590 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:591:57 [INFO] [stdout] | [INFO] [stdout] 591 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:592:57 [INFO] [stdout] | [INFO] [stdout] 592 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:593:57 [INFO] [stdout] | [INFO] [stdout] 593 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:626:45 [INFO] [stdout] | [INFO] [stdout] 626 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:627:45 [INFO] [stdout] | [INFO] [stdout] 627 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:628:45 [INFO] [stdout] | [INFO] [stdout] 628 | ... 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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:629:45 [INFO] [stdout] | [INFO] [stdout] 629 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:630:45 [INFO] [stdout] | [INFO] [stdout] 630 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:653:45 [INFO] [stdout] | [INFO] [stdout] 653 | ... name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:654:45 [INFO] [stdout] | [INFO] [stdout] 654 | ... params: params, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `params` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:655:45 [INFO] [stdout] | [INFO] [stdout] 655 | ... return_type: return_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `return_type` [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: redundant field names in struct initialization [INFO] [stdout] --> src/main_parser.rs:656:45 [INFO] [stdout] | [INFO] [stdout] 656 | ... generic_params: generic_params, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generic_params` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast/typed.rs:360:9 [INFO] [stdout] | [INFO] [stdout] 360 | / match self.kind() { [INFO] [stdout] 361 | | TypeKind::Return(_) => true, [INFO] [stdout] 362 | | _ => false [INFO] [stdout] 363 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 360 - match self.kind() { [INFO] [stdout] 361 - TypeKind::Return(_) => true, [INFO] [stdout] 362 - _ => false [INFO] [stdout] 363 - } [INFO] [stdout] 360 + matches!(self.kind(), TypeKind::Return(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast/typed.rs:568:100 [INFO] [stdout] | [INFO] [stdout] 568 | | (TypeKind::Custom { name, generic_args }, TypeKind::GenericParam(a)) => a == name && generic_args.len() == 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast/typed.rs:360:9 [INFO] [stdout] | [INFO] [stdout] 360 | / match self.kind() { [INFO] [stdout] 361 | | TypeKind::Return(_) => true, [INFO] [stdout] 362 | | _ => false [INFO] [stdout] 363 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 360 - match self.kind() { [INFO] [stdout] 361 - TypeKind::Return(_) => true, [INFO] [stdout] 362 - _ => false [INFO] [stdout] 363 - } [INFO] [stdout] 360 + matches!(self.kind(), TypeKind::Return(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` can be confused for the standard trait method `std::ops::Add::add` [INFO] [stdout] --> src/ast/clean.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | / pub fn add(self, other: Value) -> Result { [INFO] [stdout] 186 | | match (self, other) { [INFO] [stdout] 187 | | (Value::Int(a), Value::Int(b)) => Ok(Value::Int(a + b)), [INFO] [stdout] 188 | | (Value::U128(a), Value::U128(b)) => Ok(Value::U128(a + b)), [INFO] [stdout] ... | [INFO] [stdout] 194 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Add` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast/typed.rs:568:100 [INFO] [stdout] | [INFO] [stdout] 568 | | (TypeKind::Custom { name, generic_args }, TypeKind::GenericParam(a)) => a == name && generic_args.len() == 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to usize [INFO] [stdout] --> src/ast/clean.rs:216:89 [INFO] [stdout] | [INFO] [stdout] 216 | Ok(Value::Array(Arc::new(RwLock::new(arr.into_iter().cycle().take(len * i.abs() as usize).collect())))) [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: method `add` can be confused for the standard trait method `std::ops::Add::add` [INFO] [stdout] --> src/ast/clean.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | / pub fn add(self, other: Value) -> Result { [INFO] [stdout] 186 | | match (self, other) { [INFO] [stdout] 187 | | (Value::Int(a), Value::Int(b)) => Ok(Value::Int(a + b)), [INFO] [stdout] 188 | | (Value::U128(a), Value::U128(b)) => Ok(Value::U128(a + b)), [INFO] [stdout] ... | [INFO] [stdout] 194 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Add` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:86:24 [INFO] [stdout] | [INFO] [stdout] 86 | if generic_args.len() == 0 && params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:86:51 [INFO] [stdout] | [INFO] [stdout] 86 | if generic_args.len() == 0 && params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!params.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] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to usize [INFO] [stdout] --> src/ast/clean.rs:216:89 [INFO] [stdout] | [INFO] [stdout] 216 | Ok(Value::Array(Arc::new(RwLock::new(arr.into_iter().cycle().take(len * i.abs() as usize).collect())))) [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: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/flatten.rs:92:37 [INFO] [stdout] | [INFO] [stdout] 92 | ... p.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `p.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | if generic_args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:142:16 [INFO] [stdout] | [INFO] [stdout] 142 | if generic_params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/flatten.rs:264:25 [INFO] [stdout] | [INFO] [stdout] 264 | p.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `p.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/checker/mutability.rs:11:39 [INFO] [stdout] | [INFO] [stdout] 11 | check_variable_mutability(&*target, env) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 11 - check_variable_mutability(&*target, env) [INFO] [stdout] 11 + check_variable_mutability(target, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 11 | check_variable_mutability(&**target, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/checker/mutability.rs:14:39 [INFO] [stdout] | [INFO] [stdout] 14 | check_variable_mutability(&*target, env) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 14 - check_variable_mutability(&*target, env) [INFO] [stdout] 14 + check_variable_mutability(target, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 14 | check_variable_mutability(&**target, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:86:24 [INFO] [stdout] | [INFO] [stdout] 86 | if generic_args.len() == 0 && params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:86:51 [INFO] [stdout] | [INFO] [stdout] 86 | if generic_args.len() == 0 && params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!params.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] [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/checker/statement.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / match mut_result { [INFO] [stdout] 89 | | Ok(is_mut) => { [INFO] [stdout] 90 | | if is_mut != *mutable { [INFO] [stdout] 91 | | match is_mut { [INFO] [stdout] ... | [INFO] [stdout] 103 | | Err(_) => (), [INFO] [stdout] 104 | | } [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] 88 ~ if let Ok(is_mut) = mut_result { [INFO] [stdout] 89 + if is_mut != *mutable { [INFO] [stdout] 90 + match is_mut { [INFO] [stdout] 91 + true => return Err(spanned( [INFO] [stdout] 92 + "Cannot assign an immutable reference to a mutable variable".into(), [INFO] [stdout] 93 + expr_result.0.span [INFO] [stdout] 94 + )), [INFO] [stdout] 95 + false => return Err(spanned( [INFO] [stdout] 96 + "Cannot assign a mutable reference to an immutable variable".into(), [INFO] [stdout] 97 + expr_result.0.span [INFO] [stdout] 98 + )), [INFO] [stdout] 99 + } [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/checker/statement.rs:118:29 [INFO] [stdout] | [INFO] [stdout] 118 | ... &p, [INFO] [stdout] | ^^ help: change this to: `p` [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: deref on an immutable reference [INFO] [stdout] --> src/checker/statement.rs:119:29 [INFO] [stdout] | [INFO] [stdout] 119 | ... &*ti, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 119 - &*ti, [INFO] [stdout] 119 + ti, [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 119 | &**ti, [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:146:75 [INFO] [stdout] | [INFO] [stdout] 146 | env.add_var_type(alias.inner.clone(), ti.clone(), mutable.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*mutable` [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/checker/statement.rs:149:74 [INFO] [stdout] | [INFO] [stdout] 149 | env.add_var_type(name.inner.clone(), ti.clone(), mutable.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*mutable` [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 `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/flatten.rs:92:37 [INFO] [stdout] | [INFO] [stdout] 92 | ... p.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `p.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:165:71 [INFO] [stdout] | [INFO] [stdout] 165 | env.add_var_type(name.clone(), expected_type.clone(), mutable.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*mutable` [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: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | let flat_type = if generic_params.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:216:21 [INFO] [stdout] | [INFO] [stdout] 216 | param.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `param.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | if generic_args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:261:8 [INFO] [stdout] | [INFO] [stdout] 261 | if generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/flatten.rs:142:16 [INFO] [stdout] | [INFO] [stdout] 142 | if generic_params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/flatten.rs:264:25 [INFO] [stdout] | [INFO] [stdout] 264 | p.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `p.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/checker/mutability.rs:11:39 [INFO] [stdout] | [INFO] [stdout] 11 | check_variable_mutability(&*target, env) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 11 - check_variable_mutability(&*target, env) [INFO] [stdout] 11 + check_variable_mutability(target, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 11 | check_variable_mutability(&**target, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/checker/statement.rs:424:12 [INFO] [stdout] | [INFO] [stdout] 424 | if let None = get_native_fun(path, name) { [INFO] [stdout] | -------^^^^----------------------------- help: try: `if get_native_fun(path, name).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/checker/mutability.rs:14:39 [INFO] [stdout] | [INFO] [stdout] 14 | check_variable_mutability(&*target, env) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 14 - check_variable_mutability(&*target, env) [INFO] [stdout] 14 + check_variable_mutability(target, env) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 14 | check_variable_mutability(&**target, env) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:435:8 [INFO] [stdout] | [INFO] [stdout] 435 | if generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:502:8 [INFO] [stdout] | [INFO] [stdout] 502 | if generic_params.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:508:21 [INFO] [stdout] | [INFO] [stdout] 508 | param.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `param.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/checker/statement.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / match mut_result { [INFO] [stdout] 89 | | Ok(is_mut) => { [INFO] [stdout] 90 | | if is_mut != *mutable { [INFO] [stdout] 91 | | match is_mut { [INFO] [stdout] ... | [INFO] [stdout] 103 | | Err(_) => (), [INFO] [stdout] 104 | | } [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] 88 ~ if let Ok(is_mut) = mut_result { [INFO] [stdout] 89 + if is_mut != *mutable { [INFO] [stdout] 90 + match is_mut { [INFO] [stdout] 91 + true => return Err(spanned( [INFO] [stdout] 92 + "Cannot assign an immutable reference to a mutable variable".into(), [INFO] [stdout] 93 + expr_result.0.span [INFO] [stdout] 94 + )), [INFO] [stdout] 95 + false => return Err(spanned( [INFO] [stdout] 96 + "Cannot assign a mutable reference to an immutable variable".into(), [INFO] [stdout] 97 + expr_result.0.span [INFO] [stdout] 98 + )), [INFO] [stdout] 99 + } [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/checker/statement.rs:118:29 [INFO] [stdout] | [INFO] [stdout] 118 | ... &p, [INFO] [stdout] | ^^ help: change this to: `p` [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: deref on an immutable reference [INFO] [stdout] --> src/checker/statement.rs:119:29 [INFO] [stdout] | [INFO] [stdout] 119 | ... &*ti, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 119 - &*ti, [INFO] [stdout] 119 + ti, [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 119 | &**ti, [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:146:75 [INFO] [stdout] | [INFO] [stdout] 146 | env.add_var_type(alias.inner.clone(), ti.clone(), mutable.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*mutable` [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/checker/statement.rs:149:74 [INFO] [stdout] | [INFO] [stdout] 149 | env.add_var_type(name.inner.clone(), ti.clone(), mutable.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*mutable` [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/checker/statement.rs:165:71 [INFO] [stdout] | [INFO] [stdout] 165 | env.add_var_type(name.clone(), expected_type.clone(), mutable.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*mutable` [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: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | let flat_type = if generic_params.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:216:21 [INFO] [stdout] | [INFO] [stdout] 216 | param.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `param.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:722:21 [INFO] [stdout] | [INFO] [stdout] 722 | if !is_type.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*is_type` [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: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:727:16 [INFO] [stdout] | [INFO] [stdout] 727 | if new_symbols.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_symbols.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:261:8 [INFO] [stdout] | [INFO] [stdout] 261 | if generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/checker/expression.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | / if gener.1 { [INFO] [stdout] 112 | | walk((gen_inner, true), con, out); [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ (TypeKind::Array(gen_inner), _) [INFO] [stdout] 111 ~ if gener.1 => { [INFO] [stdout] 112 | walk((gen_inner, true), con, out); [INFO] [stdout] 113 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/checker/statement.rs:424:12 [INFO] [stdout] | [INFO] [stdout] 424 | if let None = get_native_fun(path, name) { [INFO] [stdout] | -------^^^^----------------------------- help: try: `if get_native_fun(path, name).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/checker/expression.rs:157:17 [INFO] [stdout] | [INFO] [stdout] 157 | / if closure_params.contains(name) { [INFO] [stdout] 158 | | map.insert(name.clone(), instance.clone()); [INFO] [stdout] 159 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ (TypeKind::GenericParam(name), _) [INFO] [stdout] 156 | // Only insert a substitution if the generic param is listed in the closure's params. [INFO] [stdout] 157 ~ if closure_params.contains(name) => { [INFO] [stdout] 158 | map.insert(name.clone(), instance.clone()); [INFO] [stdout] 159 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:435:8 [INFO] [stdout] | [INFO] [stdout] 435 | if generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:502:8 [INFO] [stdout] | [INFO] [stdout] 502 | if generic_params.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:508:21 [INFO] [stdout] | [INFO] [stdout] 508 | param.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `param.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:274:39 [INFO] [stdout] | [INFO] [stdout] 274 | spanned(clean::Expr::Char(c.clone()), expr.span), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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 `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:316:54 [INFO] [stdout] | [INFO] [stdout] 316 | spanned(clean::Expr::Record(lowers), expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:350:41 [INFO] [stdout] | [INFO] [stdout] 350 | spanned(clean::Expr::Break, expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:354:44 [INFO] [stdout] | [INFO] [stdout] 354 | spanned(clean::Expr::Continue, expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/checker/statement.rs:722:21 [INFO] [stdout] | [INFO] [stdout] 722 | if !is_type.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*is_type` [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: length comparison to zero [INFO] [stdout] --> src/checker/statement.rs:727:16 [INFO] [stdout] | [INFO] [stdout] 727 | if new_symbols.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_symbols.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:425:46 [INFO] [stdout] | [INFO] [stdout] 425 | spanned(clean::Expr::Array(lowered), expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:434:13 [INFO] [stdout] | [INFO] [stdout] 434 | target: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:435:12 [INFO] [stdout] | [INFO] [stdout] 435 | index: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:497:11 [INFO] [stdout] | [INFO] [stdout] 497 | left: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:499:12 [INFO] [stdout] | [INFO] [stdout] 499 | right: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:574:21 [INFO] [stdout] | [INFO] [stdout] 574 | / return Err(spanned( [INFO] [stdout] 575 | | format_smolstr!( [INFO] [stdout] 576 | | "Cannot apply {:?} to {}", [INFO] [stdout] 577 | | operation, [INFO] [stdout] ... | [INFO] [stdout] 580 | | left.span [INFO] [stdout] 581 | | )) [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 574 ~ Err(spanned( [INFO] [stdout] 575 + format_smolstr!( [INFO] [stdout] 576 + "Cannot apply {:?} to {}", [INFO] [stdout] 577 + operation, [INFO] [stdout] 578 + left_result.1.inner [INFO] [stdout] 579 + ), [INFO] [stdout] 580 + left.span [INFO] [stdout] 581 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:617:22 [INFO] [stdout] | [INFO] [stdout] 617 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 618 | | format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 619 | | left.span [INFO] [stdout] 620 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 617 ~ _ => Err(spanned( [INFO] [stdout] 618 + format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 619 + left.span [INFO] [stdout] 620 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:654:22 [INFO] [stdout] | [INFO] [stdout] 654 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 655 | | format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 656 | | left.span [INFO] [stdout] 657 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 654 ~ _ => Err(spanned( [INFO] [stdout] 655 + format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 656 + left.span [INFO] [stdout] 657 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:693:22 [INFO] [stdout] | [INFO] [stdout] 693 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 694 | | format_smolstr!("Cannot apply {:?} to {}", operation, left_result.1.inner), [INFO] [stdout] 695 | | left.span [INFO] [stdout] 696 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 693 ~ _ => Err(spanned( [INFO] [stdout] 694 + format_smolstr!("Cannot apply {:?} to {}", operation, left_result.1.inner), [INFO] [stdout] 695 + left.span [INFO] [stdout] 696 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:812:22 [INFO] [stdout] | [INFO] [stdout] 812 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 813 | | format_smolstr!( [INFO] [stdout] 814 | | "Cannot apply {:?} to {}", [INFO] [stdout] 815 | | operation, [INFO] [stdout] ... | [INFO] [stdout] 818 | | left.span [INFO] [stdout] 819 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 812 ~ _ => Err(spanned( [INFO] [stdout] 813 + format_smolstr!( [INFO] [stdout] 814 + "Cannot apply {:?} to {}", [INFO] [stdout] 815 + operation, [INFO] [stdout] 816 + left_result.1.inner [INFO] [stdout] 817 + ), [INFO] [stdout] 818 + left.span [INFO] [stdout] 819 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/checker/expression.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | / if gener.1 { [INFO] [stdout] 112 | | walk((gen_inner, true), con, out); [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ (TypeKind::Array(gen_inner), _) [INFO] [stdout] 111 ~ if gener.1 => { [INFO] [stdout] 112 | walk((gen_inner, true), con, out); [INFO] [stdout] 113 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/checker/expression.rs:157:17 [INFO] [stdout] | [INFO] [stdout] 157 | / if closure_params.contains(name) { [INFO] [stdout] 158 | | map.insert(name.clone(), instance.clone()); [INFO] [stdout] 159 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ (TypeKind::GenericParam(name), _) [INFO] [stdout] 156 | // Only insert a substitution if the generic param is listed in the closure's params. [INFO] [stdout] 157 ~ if closure_params.contains(name) => { [INFO] [stdout] 158 | map.insert(name.clone(), instance.clone()); [INFO] [stdout] 159 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:685:29 [INFO] [stdout] | [INFO] [stdout] 685 | ... expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:717:21 [INFO] [stdout] | [INFO] [stdout] 717 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:274:39 [INFO] [stdout] | [INFO] [stdout] 274 | spanned(clean::Expr::Char(c.clone()), expr.span), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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 `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:734:25 [INFO] [stdout] | [INFO] [stdout] 734 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:316:54 [INFO] [stdout] | [INFO] [stdout] 316 | spanned(clean::Expr::Record(lowers), expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:804:29 [INFO] [stdout] | [INFO] [stdout] 804 | ... expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:839:21 [INFO] [stdout] | [INFO] [stdout] 839 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:350:41 [INFO] [stdout] | [INFO] [stdout] 350 | spanned(clean::Expr::Break, expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:354:44 [INFO] [stdout] | [INFO] [stdout] 354 | spanned(clean::Expr::Continue, expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:847:21 [INFO] [stdout] | [INFO] [stdout] 847 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:860:11 [INFO] [stdout] | [INFO] [stdout] 860 | body: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/expression.rs:869:8 [INFO] [stdout] | [INFO] [stdout] 869 | if generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:903:17 [INFO] [stdout] | [INFO] [stdout] 903 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:425:46 [INFO] [stdout] | [INFO] [stdout] 425 | spanned(clean::Expr::Array(lowered), expr.span.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:434:13 [INFO] [stdout] | [INFO] [stdout] 434 | target: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:435:12 [INFO] [stdout] | [INFO] [stdout] 435 | index: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:958:17 [INFO] [stdout] | [INFO] [stdout] 958 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:973:10 [INFO] [stdout] | [INFO] [stdout] 973 | fun: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/checker/expression.rs:975:19 [INFO] [stdout] | [INFO] [stdout] 975 | generic_args: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 975 - generic_args: &Vec>, [INFO] [stdout] 975 + generic_args: &[Spanned], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/expression.rs:991:16 [INFO] [stdout] | [INFO] [stdout] 991 | if generic_params.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/expression.rs:992:16 [INFO] [stdout] | [INFO] [stdout] 992 | && generic_args.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:497:11 [INFO] [stdout] | [INFO] [stdout] 497 | left: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:499:12 [INFO] [stdout] | [INFO] [stdout] 499 | right: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:574:21 [INFO] [stdout] | [INFO] [stdout] 574 | / return Err(spanned( [INFO] [stdout] 575 | | format_smolstr!( [INFO] [stdout] 576 | | "Cannot apply {:?} to {}", [INFO] [stdout] 577 | | operation, [INFO] [stdout] ... | [INFO] [stdout] 580 | | left.span [INFO] [stdout] 581 | | )) [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 574 ~ Err(spanned( [INFO] [stdout] 575 + format_smolstr!( [INFO] [stdout] 576 + "Cannot apply {:?} to {}", [INFO] [stdout] 577 + operation, [INFO] [stdout] 578 + left_result.1.inner [INFO] [stdout] 579 + ), [INFO] [stdout] 580 + left.span [INFO] [stdout] 581 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:617:22 [INFO] [stdout] | [INFO] [stdout] 617 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 618 | | format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 619 | | left.span [INFO] [stdout] 620 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 617 ~ _ => Err(spanned( [INFO] [stdout] 618 + format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 619 + left.span [INFO] [stdout] 620 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:654:22 [INFO] [stdout] | [INFO] [stdout] 654 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 655 | | format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 656 | | left.span [INFO] [stdout] 657 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 654 ~ _ => Err(spanned( [INFO] [stdout] 655 + format!("Cannot apply {:?} to {}", operation, left_result.1.inner).into(), [INFO] [stdout] 656 + left.span [INFO] [stdout] 657 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:693:22 [INFO] [stdout] | [INFO] [stdout] 693 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 694 | | format_smolstr!("Cannot apply {:?} to {}", operation, left_result.1.inner), [INFO] [stdout] 695 | | left.span [INFO] [stdout] 696 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 693 ~ _ => Err(spanned( [INFO] [stdout] 694 + format_smolstr!("Cannot apply {:?} to {}", operation, left_result.1.inner), [INFO] [stdout] 695 + left.span [INFO] [stdout] 696 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/checker/expression.rs:812:22 [INFO] [stdout] | [INFO] [stdout] 812 | _ => return Err(spanned( [INFO] [stdout] | ______________________^ [INFO] [stdout] 813 | | format_smolstr!( [INFO] [stdout] 814 | | "Cannot apply {:?} to {}", [INFO] [stdout] 815 | | operation, [INFO] [stdout] ... | [INFO] [stdout] 818 | | left.span [INFO] [stdout] 819 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 812 ~ _ => Err(spanned( [INFO] [stdout] 813 + format_smolstr!( [INFO] [stdout] 814 + "Cannot apply {:?} to {}", [INFO] [stdout] 815 + operation, [INFO] [stdout] 816 + left_result.1.inner [INFO] [stdout] 817 + ), [INFO] [stdout] 818 + left.span [INFO] [stdout] 819 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/checker/expression.rs:1055:21 [INFO] [stdout] | [INFO] [stdout] 1055 | / match param.is_variadic { [INFO] [stdout] 1056 | | true => { [INFO] [stdout] 1057 | | if i != substituted_params.len() - 1 { [INFO] [stdout] 1058 | | return Err(spanned( [INFO] [stdout] ... | [INFO] [stdout] 1064 | | false => (), [INFO] [stdout] 1065 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1055 ~ if param.is_variadic == true { [INFO] [stdout] 1056 + if i != substituted_params.len() - 1 { [INFO] [stdout] 1057 + return Err(spanned( [INFO] [stdout] 1058 + "Cannot have multiple spread params in a function".into(), [INFO] [stdout] 1059 + param.type_info.span [INFO] [stdout] 1060 + )) [INFO] [stdout] 1061 + } else {break} [INFO] [stdout] 1062 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:685:29 [INFO] [stdout] | [INFO] [stdout] 685 | ... expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:717:21 [INFO] [stdout] | [INFO] [stdout] 717 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1144:21 [INFO] [stdout] | [INFO] [stdout] 1144 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:734:25 [INFO] [stdout] | [INFO] [stdout] 734 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1157:13 [INFO] [stdout] | [INFO] [stdout] 1157 | target: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/checker/expression.rs:1167:25 [INFO] [stdout] | [INFO] [stdout] 1167 | Expr::Var(v) => if v == "self" { [INFO] [stdout] | _________________________^ [INFO] [stdout] 1168 | | target_result.1 = flatten_type(&target_result.1, env)?.into_owned(); [INFO] [stdout] 1169 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1167 ~ Expr::Var(v)f v == "self" => { [INFO] [stdout] 1168 ~ target_result.1 = flatten_type(&target_result.1, env)?.into_owned();, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/checker/expression.rs:1166:5 [INFO] [stdout] | [INFO] [stdout] 1166 | / match &target.inner { [INFO] [stdout] 1167 | | Expr::Var(v) => if v == "self" { [INFO] [stdout] 1168 | | target_result.1 = flatten_type(&target_result.1, env)?.into_owned(); [INFO] [stdout] 1169 | | }, [INFO] [stdout] 1170 | | _ => () [INFO] [stdout] 1171 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1166 ~ if let Expr::Var(v) = &target.inner { if v == "self" { [INFO] [stdout] 1167 + target_result.1 = flatten_type(&target_result.1, env)?.into_owned(); [INFO] [stdout] 1168 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:804:29 [INFO] [stdout] | [INFO] [stdout] 804 | ... expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/checker/expression.rs:1181:9 [INFO] [stdout] | [INFO] [stdout] 1181 | / if method_info.is_mutating { [INFO] [stdout] 1182 | | if check_variable_mutability(&target_result.0, env)? != method_info.is_mutating { [INFO] [stdout] 1183 | | return Err(spanned( [INFO] [stdout] 1184 | | "Cannot use a mutating method on an immutable value".into(), [INFO] [stdout] ... | [INFO] [stdout] 1188 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1181 ~ if method_info.is_mutating [INFO] [stdout] 1182 ~ && check_variable_mutability(&target_result.0, env)? != method_info.is_mutating { [INFO] [stdout] 1183 | return Err(spanned( [INFO] [stdout] ... [INFO] [stdout] 1186 | )) [INFO] [stdout] 1187 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1199:25 [INFO] [stdout] | [INFO] [stdout] 1199 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1214:25 [INFO] [stdout] | [INFO] [stdout] 1214 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1230:29 [INFO] [stdout] | [INFO] [stdout] 1230 | ... expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1258:13 [INFO] [stdout] | [INFO] [stdout] 1258 | target: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1259:12 [INFO] [stdout] | [INFO] [stdout] 1259 | value: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:839:21 [INFO] [stdout] | [INFO] [stdout] 839 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:847:21 [INFO] [stdout] | [INFO] [stdout] 847 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:860:11 [INFO] [stdout] | [INFO] [stdout] 860 | body: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/expression.rs:869:8 [INFO] [stdout] | [INFO] [stdout] 869 | if generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1291:13 [INFO] [stdout] | [INFO] [stdout] 1291 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1301:16 [INFO] [stdout] | [INFO] [stdout] 1301 | condition: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1302:11 [INFO] [stdout] | [INFO] [stdout] 1302 | body: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:903:17 [INFO] [stdout] | [INFO] [stdout] 903 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:958:17 [INFO] [stdout] | [INFO] [stdout] 958 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1338:17 [INFO] [stdout] | [INFO] [stdout] 1338 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:973:10 [INFO] [stdout] | [INFO] [stdout] 973 | fun: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1353:17 [INFO] [stdout] | [INFO] [stdout] 1353 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1364:16 [INFO] [stdout] | [INFO] [stdout] 1364 | condition: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1365:11 [INFO] [stdout] | [INFO] [stdout] 1365 | body: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/checker/expression.rs:975:19 [INFO] [stdout] | [INFO] [stdout] 975 | generic_args: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 975 - generic_args: &Vec>, [INFO] [stdout] 975 + generic_args: &[Spanned], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/expression.rs:991:16 [INFO] [stdout] | [INFO] [stdout] 991 | if generic_params.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/expression.rs:992:16 [INFO] [stdout] | [INFO] [stdout] 992 | && generic_args.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1389:13 [INFO] [stdout] | [INFO] [stdout] 1389 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `method_info.type_template` after checking its variant with `is_some` [INFO] [stdout] --> src/checker/expression.rs:1451:37 [INFO] [stdout] | [INFO] [stdout] 1450 | if method_info.type_template.is_some() { [INFO] [stdout] | -------------------------------------- help: try: `if let Some() = method_info.type_template` [INFO] [stdout] 1451 | let type_template = method_info.type_template.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/checker/hoisting.rs:23:6 [INFO] [stdout] | [INFO] [stdout] 23 | ) -> Result< [INFO] [stdout] | ______^ [INFO] [stdout] 24 | | ( [INFO] [stdout] 25 | | Vec>, // ordered statements [INFO] [stdout] 26 | | HashMap>, // var_exports [INFO] [stdout] ... | [INFO] [stdout] 29 | | Spanned, [INFO] [stdout] 30 | | > { [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: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/checker/expression.rs:1055:21 [INFO] [stdout] | [INFO] [stdout] 1055 | / match param.is_variadic { [INFO] [stdout] 1056 | | true => { [INFO] [stdout] 1057 | | if i != substituted_params.len() - 1 { [INFO] [stdout] 1058 | | return Err(spanned( [INFO] [stdout] ... | [INFO] [stdout] 1064 | | false => (), [INFO] [stdout] 1065 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1055 ~ if param.is_variadic == true { [INFO] [stdout] 1056 + if i != substituted_params.len() - 1 { [INFO] [stdout] 1057 + return Err(spanned( [INFO] [stdout] 1058 + "Cannot have multiple spread params in a function".into(), [INFO] [stdout] 1059 + param.type_info.span [INFO] [stdout] 1060 + )) [INFO] [stdout] 1061 + } else {break} [INFO] [stdout] 1062 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> src/checker/hoisting.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 81 | - if implementation.contains_key("+self".into()) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `"+self"` [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: `&str` [INFO] [stdout] --> src/checker/hoisting.rs:155:62 [INFO] [stdout] | [INFO] [stdout] 155 | ... - if implementation.contains_key("+self".into()) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `"+self"` [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: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1144:21 [INFO] [stdout] | [INFO] [stdout] 1144 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1157:13 [INFO] [stdout] | [INFO] [stdout] 1157 | target: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/checker/expression.rs:1167:25 [INFO] [stdout] | [INFO] [stdout] 1167 | Expr::Var(v) => if v == "self" { [INFO] [stdout] | _________________________^ [INFO] [stdout] 1168 | | target_result.1 = flatten_type(&target_result.1, env)?.into_owned(); [INFO] [stdout] 1169 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1167 ~ Expr::Var(v)f v == "self" => { [INFO] [stdout] 1168 ~ target_result.1 = flatten_type(&target_result.1, env)?.into_owned();, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/checker/expression.rs:1166:5 [INFO] [stdout] | [INFO] [stdout] 1166 | / match &target.inner { [INFO] [stdout] 1167 | | Expr::Var(v) => if v == "self" { [INFO] [stdout] 1168 | | target_result.1 = flatten_type(&target_result.1, env)?.into_owned(); [INFO] [stdout] 1169 | | }, [INFO] [stdout] 1170 | | _ => () [INFO] [stdout] 1171 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1166 ~ if let Expr::Var(v) = &target.inner { if v == "self" { [INFO] [stdout] 1167 + target_result.1 = flatten_type(&target_result.1, env)?.into_owned(); [INFO] [stdout] 1168 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/checker/expression.rs:1181:9 [INFO] [stdout] | [INFO] [stdout] 1181 | / if method_info.is_mutating { [INFO] [stdout] 1182 | | if check_variable_mutability(&target_result.0, env)? != method_info.is_mutating { [INFO] [stdout] 1183 | | return Err(spanned( [INFO] [stdout] 1184 | | "Cannot use a mutating method on an immutable value".into(), [INFO] [stdout] ... | [INFO] [stdout] 1188 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1181 ~ if method_info.is_mutating [INFO] [stdout] 1182 ~ && check_variable_mutability(&target_result.0, env)? != method_info.is_mutating { [INFO] [stdout] 1183 | return Err(spanned( [INFO] [stdout] ... [INFO] [stdout] 1186 | )) [INFO] [stdout] 1187 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/checker/hoisting.rs:299:53 [INFO] [stdout] | [INFO] [stdout] 299 | ... params: params [INFO] [stdout] | ________________________________^ [INFO] [stdout] 300 | | ... .iter() [INFO] [stdout] | | __________________________________- [INFO] [stdout] 301 | || ... .cloned() [INFO] [stdout] 302 | || ... .filter( [INFO] [stdout] 303 | || ... |elem| !generic_params.contains(elem) [INFO] [stdout] 304 | || ... ).collect(), [INFO] [stdout] | ||___________________________^ [INFO] [stdout] | |___________________________| [INFO] [stdout] | help: try: `.filter(|&elem| !generic_params.contains(elem)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1199:25 [INFO] [stdout] | [INFO] [stdout] 1199 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1214:25 [INFO] [stdout] | [INFO] [stdout] 1214 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1230:29 [INFO] [stdout] | [INFO] [stdout] 1230 | ... expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/checker/hoisting.rs:318:61 [INFO] [stdout] | [INFO] [stdout] 318 | ... generic_params: params [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 319 | | ... .iter() [INFO] [stdout] | | __________________________________- [INFO] [stdout] 320 | || ... .cloned() [INFO] [stdout] 321 | || ... .filter( [INFO] [stdout] 322 | || ... |elem| !generic_params.contains(elem) [INFO] [stdout] 323 | || ... ).collect(), [INFO] [stdout] | ||___________________________^ [INFO] [stdout] | |___________________________| [INFO] [stdout] | help: try: `.filter(|&elem| !generic_params.contains(elem)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1258:13 [INFO] [stdout] | [INFO] [stdout] 1258 | target: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1259:12 [INFO] [stdout] | [INFO] [stdout] 1259 | value: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/checker/hoisting.rs:355:29 [INFO] [stdout] | [INFO] [stdout] 355 | ... let method_result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 430 | ... method_result = process_expression(&m.body, &mut inner_scope)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `method_result` here [INFO] [stdout] | [INFO] [stdout] 355 ~ [INFO] [stdout] 356 | let expected_flat; [INFO] [stdout] ... [INFO] [stdout] 429 | [INFO] [stdout] 430 ~ let method_result = process_expression(&m.body, &mut inner_scope)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/hoisting.rs:371:41 [INFO] [stdout] | [INFO] [stdout] 371 | ... ti.span.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ti.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1291:13 [INFO] [stdout] | [INFO] [stdout] 1291 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1301:16 [INFO] [stdout] | [INFO] [stdout] 1301 | condition: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1302:11 [INFO] [stdout] | [INFO] [stdout] 1302 | body: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/hoisting.rs:413:41 [INFO] [stdout] | [INFO] [stdout] 413 | ... ti.span.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ti.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1338:17 [INFO] [stdout] | [INFO] [stdout] 1338 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1353:17 [INFO] [stdout] | [INFO] [stdout] 1353 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1364:16 [INFO] [stdout] | [INFO] [stdout] 1364 | condition: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/checker/expression.rs:1365:11 [INFO] [stdout] | [INFO] [stdout] 1365 | body: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/checker/hoisting.rs:463:29 [INFO] [stdout] | [INFO] [stdout] 463 | ... let fun_type; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `fun_type` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 463 ~ [INFO] [stdout] 464 | if let None = get_native_fun(path, m.name.as_str()) { [INFO] [stdout] ... [INFO] [stdout] 481 | [INFO] [stdout] 482 ~ let fun_type = if m.generic_params.len() == 0 { [INFO] [stdout] 483 | [INFO] [stdout] ... [INFO] [stdout] 486 | let r_type = flatten_type(&r_type, &mut inner_scope)?.into_owned(); [INFO] [stdout] 487 ~ spanned( [INFO] [stdout] 488 | TypeInfo::new(TypeKind::Fun { [INFO] [stdout] ... [INFO] [stdout] 493 | method.span [INFO] [stdout] 494 ~ ) [INFO] [stdout] 495 | } else { [INFO] [stdout] ... [INFO] [stdout] 512 | // Create the type-closure representing the generic native function [INFO] [stdout] 513 ~ spanned( [INFO] [stdout] 514 | TypeInfo::new(TypeKind::Fun { [INFO] [stdout] ... [INFO] [stdout] 519 | method.span [INFO] [stdout] 520 ~ ) [INFO] [stdout] 521 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/checker/hoisting.rs:464:36 [INFO] [stdout] | [INFO] [stdout] 464 | ... if let None = get_native_fun(path, m.name.as_str()) { [INFO] [stdout] | -------^^^^---------------------------------------- help: try: `if get_native_fun(path, m.name.as_str()).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/expression.rs:1389:13 [INFO] [stdout] | [INFO] [stdout] 1389 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/hoisting.rs:482:32 [INFO] [stdout] | [INFO] [stdout] 482 | ... if m.generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `m.generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `method_info.type_template` after checking its variant with `is_some` [INFO] [stdout] --> src/checker/expression.rs:1451:37 [INFO] [stdout] | [INFO] [stdout] 1450 | if method_info.type_template.is_some() { [INFO] [stdout] | -------------------------------------- help: try: `if let Some() = method_info.type_template` [INFO] [stdout] 1451 | let type_template = method_info.type_template.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/checker/hoisting.rs:23:6 [INFO] [stdout] | [INFO] [stdout] 23 | ) -> Result< [INFO] [stdout] | ______^ [INFO] [stdout] 24 | | ( [INFO] [stdout] 25 | | Vec>, // ordered statements [INFO] [stdout] 26 | | HashMap>, // var_exports [INFO] [stdout] ... | [INFO] [stdout] 29 | | Spanned, [INFO] [stdout] 30 | | > { [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: useless conversion to the same type: `&str` [INFO] [stdout] --> src/checker/hoisting.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 81 | - if implementation.contains_key("+self".into()) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `"+self"` [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: `&str` [INFO] [stdout] --> src/checker/hoisting.rs:155:62 [INFO] [stdout] | [INFO] [stdout] 155 | ... - if implementation.contains_key("+self".into()) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `"+self"` [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: length comparison to zero [INFO] [stdout] --> src/checker/pattern_matching.rs:198:66 [INFO] [stdout] | [INFO] [stdout] 198 | if generic_params.len() != generic_args.len() && generic_args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/checker/pattern_matching.rs:239:10 [INFO] [stdout] | [INFO] [stdout] 239 | ) -> Result< [INFO] [stdout] | __________^ [INFO] [stdout] 240 | | ((Spanned, Spanned), Spanned, bool), [INFO] [stdout] 241 | | Spanned [INFO] [stdout] 242 | | > { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/checker/pattern_matching.rs:256:10 [INFO] [stdout] | [INFO] [stdout] 256 | ) -> Result< [INFO] [stdout] | __________^ [INFO] [stdout] 257 | | ((Spanned, Spanned), Spanned, bool), [INFO] [stdout] 258 | | Spanned [INFO] [stdout] 259 | | > { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/checker/pattern_matching.rs:252:23 [INFO] [stdout] | [INFO] [stdout] 252 | generic_args: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 252 ~ generic_args: &[Spanned], [INFO] [stdout] 253 | pattern: &Spanned, [INFO] [stdout] ... [INFO] [stdout] 294 | variant: SmolStr::new(""), [INFO] [stdout] 295 ~ generic_args: generic_args.to_owned(), [INFO] [stdout] 296 | } [INFO] [stdout] ... [INFO] [stdout] 300 | variants: resolved_variants.clone(), [INFO] [stdout] 301 ~ generic_args: generic_args.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/checker/hoisting.rs:299:53 [INFO] [stdout] | [INFO] [stdout] 299 | ... params: params [INFO] [stdout] | ________________________________^ [INFO] [stdout] 300 | | ... .iter() [INFO] [stdout] | | __________________________________- [INFO] [stdout] 301 | || ... .cloned() [INFO] [stdout] 302 | || ... .filter( [INFO] [stdout] 303 | || ... |elem| !generic_params.contains(elem) [INFO] [stdout] 304 | || ... ).collect(), [INFO] [stdout] | ||___________________________^ [INFO] [stdout] | |___________________________| [INFO] [stdout] | help: try: `.filter(|&elem| !generic_params.contains(elem)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/checker/hoisting.rs:318:61 [INFO] [stdout] | [INFO] [stdout] 318 | ... generic_params: params [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 319 | | ... .iter() [INFO] [stdout] | | __________________________________- [INFO] [stdout] 320 | || ... .cloned() [INFO] [stdout] 321 | || ... .filter( [INFO] [stdout] 322 | || ... |elem| !generic_params.contains(elem) [INFO] [stdout] 323 | || ... ).collect(), [INFO] [stdout] | ||___________________________^ [INFO] [stdout] | |___________________________| [INFO] [stdout] | help: try: `.filter(|&elem| !generic_params.contains(elem)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/checker/hoisting.rs:355:29 [INFO] [stdout] | [INFO] [stdout] 355 | ... let method_result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 430 | ... method_result = process_expression(&m.body, &mut inner_scope)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `method_result` here [INFO] [stdout] | [INFO] [stdout] 355 ~ [INFO] [stdout] 356 | let expected_flat; [INFO] [stdout] ... [INFO] [stdout] 429 | [INFO] [stdout] 430 ~ let method_result = process_expression(&m.body, &mut inner_scope)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/hoisting.rs:371:41 [INFO] [stdout] | [INFO] [stdout] 371 | ... ti.span.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ti.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/pattern_matching.rs:334:78 [INFO] [stdout] | [INFO] [stdout] 334 | ... if generic_params.len() != generic_args.len() && generic_args.len() != 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/hoisting.rs:413:41 [INFO] [stdout] | [INFO] [stdout] 413 | ... ti.span.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ti.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/checker/pattern_matching.rs:432:5 [INFO] [stdout] | [INFO] [stdout] 432 | / fn process_enum_branch( [INFO] [stdout] 433 | | branches: &Vec<(Spanned, Spanned)>, [INFO] [stdout] 434 | | expected_type: &mut TypeInfo, [INFO] [stdout] 435 | | all_branches_handled: &mut bool, [INFO] [stdout] ... | [INFO] [stdout] 440 | | env: &mut TypeEnv [INFO] [stdout] 441 | | ) -> Result<(), Spanned> { [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/checker/hoisting.rs:463:29 [INFO] [stdout] | [INFO] [stdout] 463 | ... let fun_type; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `fun_type` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 463 ~ [INFO] [stdout] 464 | if let None = get_native_fun(path, m.name.as_str()) { [INFO] [stdout] ... [INFO] [stdout] 481 | [INFO] [stdout] 482 ~ let fun_type = if m.generic_params.len() == 0 { [INFO] [stdout] 483 | [INFO] [stdout] ... [INFO] [stdout] 486 | let r_type = flatten_type(&r_type, &mut inner_scope)?.into_owned(); [INFO] [stdout] 487 ~ spanned( [INFO] [stdout] 488 | TypeInfo::new(TypeKind::Fun { [INFO] [stdout] ... [INFO] [stdout] 493 | method.span [INFO] [stdout] 494 ~ ) [INFO] [stdout] 495 | } else { [INFO] [stdout] ... [INFO] [stdout] 512 | // Create the type-closure representing the generic native function [INFO] [stdout] 513 ~ spanned( [INFO] [stdout] 514 | TypeInfo::new(TypeKind::Fun { [INFO] [stdout] ... [INFO] [stdout] 519 | method.span [INFO] [stdout] 520 ~ ) [INFO] [stdout] 521 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/checker/hoisting.rs:464:36 [INFO] [stdout] | [INFO] [stdout] 464 | ... if let None = get_native_fun(path, m.name.as_str()) { [INFO] [stdout] | -------^^^^---------------------------------------- help: try: `if get_native_fun(path, m.name.as_str()).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/hoisting.rs:482:32 [INFO] [stdout] | [INFO] [stdout] 482 | ... if m.generic_params.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `m.generic_params.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/pattern_matching.rs:544:17 [INFO] [stdout] | [INFO] [stdout] 544 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/interpreter.rs:505:43 [INFO] [stdout] | [INFO] [stdout] 505 | ControlFlow::Return(v) => return Ok(ControlFlow::Return(v.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 505 - ControlFlow::Return(v) => return Ok(ControlFlow::Return(v.clone())), [INFO] [stdout] 505 + ControlFlow::Return(v) => Ok(ControlFlow::Return(v.clone())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/checker/pattern_matching.rs:198:66 [INFO] [stdout] | [INFO] [stdout] 198 | if generic_params.len() != generic_args.len() && generic_args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/checker/pattern_matching.rs:239:10 [INFO] [stdout] | [INFO] [stdout] 239 | ) -> Result< [INFO] [stdout] | __________^ [INFO] [stdout] 240 | | ((Spanned, Spanned), Spanned, bool), [INFO] [stdout] 241 | | Spanned [INFO] [stdout] 242 | | > { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/checker/pattern_matching.rs:256:10 [INFO] [stdout] | [INFO] [stdout] 256 | ) -> Result< [INFO] [stdout] | __________^ [INFO] [stdout] 257 | | ((Spanned, Spanned), Spanned, bool), [INFO] [stdout] 258 | | Spanned [INFO] [stdout] 259 | | > { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/checker/pattern_matching.rs:252:23 [INFO] [stdout] | [INFO] [stdout] 252 | generic_args: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 252 ~ generic_args: &[Spanned], [INFO] [stdout] 253 | pattern: &Spanned, [INFO] [stdout] ... [INFO] [stdout] 294 | variant: SmolStr::new(""), [INFO] [stdout] 295 ~ generic_args: generic_args.to_owned(), [INFO] [stdout] 296 | } [INFO] [stdout] ... [INFO] [stdout] 300 | variants: resolved_variants.clone(), [INFO] [stdout] 301 ~ generic_args: generic_args.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/interpreter.rs:258:60 [INFO] [stdout] | [INFO] [stdout] 258 | Expr::Char(c) => Ok(ControlFlow::Value(Value::Char(c.clone()))), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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: length comparison to zero [INFO] [stdout] --> src/checker/pattern_matching.rs:334:78 [INFO] [stdout] | [INFO] [stdout] 334 | ... if generic_params.len() != generic_args.len() && generic_args.len() != 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!generic_args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:311:44 [INFO] [stdout] | [INFO] [stdout] 311 | ... inner: format!("Runtime Error: Cannot index by control flow statements").into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Runtime Error: Cannot index by control flow statements".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: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/interpreter.rs:315:63 [INFO] [stdout] | [INFO] [stdout] 315 | ... match entries.read().unwrap().get(index.clone() as usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `index` [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: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:349:48 [INFO] [stdout] | [INFO] [stdout] 349 | ... inner: format!("Runtime Error: cannot use break/continue as a value").into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Runtime Error: cannot use break/continue as a value".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: this function has too many arguments (8/7) [INFO] [stdout] --> src/checker/pattern_matching.rs:432:5 [INFO] [stdout] | [INFO] [stdout] 432 | / fn process_enum_branch( [INFO] [stdout] 433 | | branches: &Vec<(Spanned, Spanned)>, [INFO] [stdout] 434 | | expected_type: &mut TypeInfo, [INFO] [stdout] 435 | | all_branches_handled: &mut bool, [INFO] [stdout] ... | [INFO] [stdout] 440 | | env: &mut TypeEnv [INFO] [stdout] 441 | | ) -> Result<(), Spanned> { [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/checker/pattern_matching.rs:544:17 [INFO] [stdout] | [INFO] [stdout] 544 | expr.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/interpreter.rs:505:43 [INFO] [stdout] | [INFO] [stdout] 505 | ControlFlow::Return(v) => return Ok(ControlFlow::Return(v.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 505 - ControlFlow::Return(v) => return Ok(ControlFlow::Return(v.clone())), [INFO] [stdout] 505 + ControlFlow::Return(v) => Ok(ControlFlow::Return(v.clone())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `fn((&[Value], Option>)) -> Result>` which implements the `Copy` trait [INFO] [stdout] --> src/interpreter.rs:536:26 [INFO] [stdout] | [INFO] [stdout] 536 | pointer: native_fun.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*native_fun` [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 `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/interpreter.rs:545:29 [INFO] [stdout] | [INFO] [stdout] 545 | / ... match value { [INFO] [stdout] 546 | | ... Value::String(s) => Ok(ControlFlow::Panic(Some(s))), [INFO] [stdout] 547 | | ... _ => panic!() // should be handled by the type checker [INFO] [stdout] 548 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/interpreter.rs:544:44 [INFO] [stdout] | [INFO] [stdout] 544 | ControlFlow::Value(value) => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 545 | match value { [INFO] [stdout] 546 | Value::String(s) => Ok(ControlFlow::Panic(Some(s))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/interpreter.rs:592:41 [INFO] [stdout] | [INFO] [stdout] 592 | ... &p, [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/interpreter.rs:593:41 [INFO] [stdout] | [INFO] [stdout] 593 | ... &*ti, [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `ti` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/interpreter.rs:673:24 [INFO] [stdout] | [INFO] [stdout] 673 | if param.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/interpreter.rs:719:11 [INFO] [stdout] | [INFO] [stdout] 719 | left: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/interpreter.rs:721:12 [INFO] [stdout] | [INFO] [stdout] 721 | right: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/interpreter.rs:258:60 [INFO] [stdout] | [INFO] [stdout] 258 | Expr::Char(c) => Ok(ControlFlow::Value(Value::Char(c.clone()))), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:311:44 [INFO] [stdout] | [INFO] [stdout] 311 | ... inner: format!("Runtime Error: Cannot index by control flow statements").into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Runtime Error: Cannot index by control flow statements".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: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/interpreter.rs:315:63 [INFO] [stdout] | [INFO] [stdout] 315 | ... match entries.read().unwrap().get(index.clone() as usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `index` [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: you should consider adding a `Default` implementation for `Env` [INFO] [stdout] --> src/env.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Env(Arc::new(RwLock::new(Scope { [INFO] [stdout] 20 | | values: HashMap::new(), [INFO] [stdout] 21 | | parent: None, [INFO] [stdout] 22 | | }))) [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 + impl Default for Env { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:47:64 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn add_variable(&mut self, name: SmolStr, value: Value) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:349:48 [INFO] [stdout] | [INFO] [stdout] 349 | ... inner: format!("Runtime Error: cannot use break/continue as a value").into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Runtime Error: cannot use break/continue as a value".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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/env.rs:54:16 [INFO] [stdout] | [INFO] [stdout] 54 | if let Some(_) = scope.values.get(&name) { [INFO] [stdout] | -------^^^^^^^-------------------------- help: try: `if scope.values.get(&name).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TypeEnv` [INFO] [stdout] --> src/env.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / pub fn new() -> Self { [INFO] [stdout] 97 | | TypeEnv(Arc::new(RwLock::new(TypeScope { [INFO] [stdout] 98 | | variable_types: HashMap::new(), [INFO] [stdout] 99 | | custom_types: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 105 | | }))) [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 95 + impl Default for TypeEnv { [INFO] [stdout] 96 + fn default() -> Self { [INFO] [stdout] 97 + Self::new() [INFO] [stdout] 98 + } [INFO] [stdout] 99 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:180:95 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn add_var_type(&mut self, name: SmolStr, type_info: Spanned, mutable: bool) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:184:83 [INFO] [stdout] | [INFO] [stdout] 184 | pub fn add_custom_type(&mut self, name: SmolStr, type_info: Spanned) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:188:66 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn add_interface_impl(&mut self, iname: SmolStr, id: u32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | / if let Some(impls) = scope.interface_implementations.get(&iname) { [INFO] [stdout] 210 | | if impls.contains(&id) { [INFO] [stdout] 211 | | return true [INFO] [stdout] 212 | | } [INFO] [stdout] 213 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 209 ~ if let Some(impls) = scope.interface_implementations.get(&iname) [INFO] [stdout] 210 ~ && impls.contains(&id) { [INFO] [stdout] 211 | return true [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `fn((&[Value], Option>)) -> Result>` which implements the `Copy` trait [INFO] [stdout] --> src/interpreter.rs:536:26 [INFO] [stdout] | [INFO] [stdout] 536 | pointer: native_fun.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*native_fun` [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 `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/interpreter.rs:545:29 [INFO] [stdout] | [INFO] [stdout] 545 | / ... match value { [INFO] [stdout] 546 | | ... Value::String(s) => Ok(ControlFlow::Panic(Some(s))), [INFO] [stdout] 547 | | ... _ => panic!() // should be handled by the type checker [INFO] [stdout] 548 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/interpreter.rs:544:44 [INFO] [stdout] | [INFO] [stdout] 544 | ControlFlow::Value(value) => { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 545 | match value { [INFO] [stdout] 546 | Value::String(s) => Ok(ControlFlow::Panic(Some(s))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/interpreter.rs:592:41 [INFO] [stdout] | [INFO] [stdout] 592 | ... &p, [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/interpreter.rs:593:41 [INFO] [stdout] | [INFO] [stdout] 593 | ... &*ti, [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `ti` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:312:24 [INFO] [stdout] | [INFO] [stdout] 312 | 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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/interpreter.rs:673:24 [INFO] [stdout] | [INFO] [stdout] 673 | if param.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:336:24 [INFO] [stdout] | [INFO] [stdout] 336 | 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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/interpreter.rs:719:11 [INFO] [stdout] | [INFO] [stdout] 719 | left: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/interpreter.rs:721:12 [INFO] [stdout] | [INFO] [stdout] 721 | right: &Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&Spanned` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Env` [INFO] [stdout] --> src/env.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Env(Arc::new(RwLock::new(Scope { [INFO] [stdout] 20 | | values: HashMap::new(), [INFO] [stdout] 21 | | parent: None, [INFO] [stdout] 22 | | }))) [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 + impl Default for Env { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/env.rs:583:17 [INFO] [stdout] | [INFO] [stdout] 583 | return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 583 - return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] 583 + Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:47:64 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn add_variable(&mut self, name: SmolStr, value: Value) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:561:20 [INFO] [stdout] | [INFO] [stdout] 561 | if a.read().unwrap().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.read().unwrap().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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/env.rs:54:16 [INFO] [stdout] | [INFO] [stdout] 54 | if let Some(_) = scope.values.get(&name) { [INFO] [stdout] | -------^^^^^^^-------------------------- help: try: `if scope.values.get(&name).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/env.rs:650:17 [INFO] [stdout] | [INFO] [stdout] 650 | return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 650 - return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] 650 + Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/env.rs:653:17 [INFO] [stdout] | [INFO] [stdout] 653 | return Ok(ControlFlow::Value(Value::String(s.chars().rev().collect::()))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 653 - return Ok(ControlFlow::Value(Value::String(s.chars().rev().collect::()))) [INFO] [stdout] 653 + Ok(ControlFlow::Value(Value::String(s.chars().rev().collect::()))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TypeEnv` [INFO] [stdout] --> src/env.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / pub fn new() -> Self { [INFO] [stdout] 97 | | TypeEnv(Arc::new(RwLock::new(TypeScope { [INFO] [stdout] 98 | | variable_types: HashMap::new(), [INFO] [stdout] 99 | | custom_types: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 105 | | }))) [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 95 + impl Default for TypeEnv { [INFO] [stdout] 96 + fn default() -> Self { [INFO] [stdout] 97 + Self::new() [INFO] [stdout] 98 + } [INFO] [stdout] 99 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:645:20 [INFO] [stdout] | [INFO] [stdout] 645 | if a.read().unwrap().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.read().unwrap().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] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:180:95 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn add_var_type(&mut self, name: SmolStr, type_info: Spanned, mutable: bool) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:184:83 [INFO] [stdout] | [INFO] [stdout] 184 | pub fn add_custom_type(&mut self, name: SmolStr, type_info: Spanned) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/env.rs:188:66 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn add_interface_impl(&mut self, iname: SmolStr, id: u32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | / if let Some(impls) = scope.interface_implementations.get(&iname) { [INFO] [stdout] 210 | | if impls.contains(&id) { [INFO] [stdout] 211 | | return true [INFO] [stdout] 212 | | } [INFO] [stdout] 213 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 209 ~ if let Some(impls) = scope.interface_implementations.get(&iname) [INFO] [stdout] 210 ~ && impls.contains(&id) { [INFO] [stdout] 211 | return true [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:312:24 [INFO] [stdout] | [INFO] [stdout] 312 | 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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:336:24 [INFO] [stdout] | [INFO] [stdout] 336 | 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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/module.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / match map.get(path) { [INFO] [stdout] 116 | | Some(module) => Some(module.exports.clone()), [INFO] [stdout] 117 | | None => None, [INFO] [stdout] 118 | | } [INFO] [stdout] | |_________^ help: try: `map.get(path).map(|module| module.exports.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/env.rs:583:17 [INFO] [stdout] | [INFO] [stdout] 583 | return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 583 - return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] 583 + Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:561:20 [INFO] [stdout] | [INFO] [stdout] 561 | if a.read().unwrap().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.read().unwrap().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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/module.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | / match map.get(path) { [INFO] [stdout] 124 | | Some(module) => Some(module.type_exports.clone()), [INFO] [stdout] 125 | | None => None, [INFO] [stdout] 126 | | } [INFO] [stdout] | |_________^ help: try: `map.get(path).map(|module| module.type_exports.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/module.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / match map.get(path) { [INFO] [stdout] 132 | | Some(module) => Some(module.var_exports.clone()), [INFO] [stdout] 133 | | None => None, [INFO] [stdout] 134 | | } [INFO] [stdout] | |_________^ help: try: `map.get(path).map(|module| module.var_exports.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/module.rs:174:92 [INFO] [stdout] | [INFO] [stdout] 174 | None => return Err(SmolStr::new(format!("Module \"{}\"", path.to_str().unwrap().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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/module.rs:181:92 [INFO] [stdout] | [INFO] [stdout] 181 | None => return Err(SmolStr::new(format!("Module \"{}\"", path.to_str().unwrap().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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/env.rs:650:17 [INFO] [stdout] | [INFO] [stdout] 650 | return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 650 - return Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] 650 + Ok(ControlFlow::Value(Value::Array(Arc::new(RwLock::new(array))))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/module.rs:189:68 [INFO] [stdout] | [INFO] [stdout] 189 | pub fn eval_import(path: &str, registry: &R) -> Result< [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 190 | | (HashMap>, HashMap>), Spanned [INFO] [stdout] 191 | | > { [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: unneeded `return` statement [INFO] [stdout] --> src/env.rs:653:17 [INFO] [stdout] | [INFO] [stdout] 653 | return Ok(ControlFlow::Value(Value::String(s.chars().rev().collect::()))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 653 - return Ok(ControlFlow::Value(Value::String(s.chars().rev().collect::()))) [INFO] [stdout] 653 + Ok(ControlFlow::Value(Value::String(s.chars().rev().collect::()))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/env.rs:645:20 [INFO] [stdout] | [INFO] [stdout] 645 | if a.read().unwrap().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.read().unwrap().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] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/module.rs:206:5 [INFO] [stdout] | [INFO] [stdout] 206 | let src; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `src` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 206 ~ [INFO] [stdout] 207 ~ let src = match fs::read_to_string(path) { [INFO] [stdout] 208 ~ Ok(s) => s, [INFO] [stdout] 209 | Err(_) => return Err(Spanned { [INFO] [stdout] ... [INFO] [stdout] 212 | }), [INFO] [stdout] 213 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/module.rs:216:66 [INFO] [stdout] | [INFO] [stdout] 216 | (module_env, module_type_env) = DEFAULT_ENVS.get_or_init(|| create_default_env()).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `create_default_env` [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: useless use of `format!` [INFO] [stdout] --> src/module.rs:236:37 [INFO] [stdout] | [INFO] [stdout] 236 | inner: SmolStr::new(format!("Module parsing failed")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Module parsing failed".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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/module.rs:280:41 [INFO] [stdout] | [INFO] [stdout] 280 | ... &p, [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/module.rs:281:41 [INFO] [stdout] | [INFO] [stdout] 281 | ... &*ti, [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `ti` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/module.rs:369:78 [INFO] [stdout] | [INFO] [stdout] 369 | ... clean::LetPattern::Name(name) => match eval_expr(&expr, env)? { [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/module.rs:390:35 [INFO] [stdout] | [INFO] [stdout] 390 | ... span: spanned.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `spanned.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/module.rs:413:39 [INFO] [stdout] | [INFO] [stdout] 413 | ... span: statement.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `statement.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/module.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / match map.get(path) { [INFO] [stdout] 116 | | Some(module) => Some(module.exports.clone()), [INFO] [stdout] 117 | | None => None, [INFO] [stdout] 118 | | } [INFO] [stdout] | |_________^ help: try: `map.get(path).map(|module| module.exports.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/module.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | / match map.get(path) { [INFO] [stdout] 124 | | Some(module) => Some(module.type_exports.clone()), [INFO] [stdout] 125 | | None => None, [INFO] [stdout] 126 | | } [INFO] [stdout] | |_________^ help: try: `map.get(path).map(|module| module.type_exports.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/module.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / match map.get(path) { [INFO] [stdout] 132 | | Some(module) => Some(module.var_exports.clone()), [INFO] [stdout] 133 | | None => None, [INFO] [stdout] 134 | | } [INFO] [stdout] | |_________^ help: try: `map.get(path).map(|module| module.var_exports.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/module.rs:174:92 [INFO] [stdout] | [INFO] [stdout] 174 | None => return Err(SmolStr::new(format!("Module \"{}\"", path.to_str().unwrap().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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/module.rs:181:92 [INFO] [stdout] | [INFO] [stdout] 181 | None => return Err(SmolStr::new(format!("Module \"{}\"", path.to_str().unwrap().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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/module.rs:189:68 [INFO] [stdout] | [INFO] [stdout] 189 | pub fn eval_import(path: &str, registry: &R) -> Result< [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 190 | | (HashMap>, HashMap>), Spanned [INFO] [stdout] 191 | | > { [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: unneeded late initialization [INFO] [stdout] --> src/module.rs:206:5 [INFO] [stdout] | [INFO] [stdout] 206 | let src; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `src` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 206 ~ [INFO] [stdout] 207 ~ let src = match fs::read_to_string(path) { [INFO] [stdout] 208 ~ Ok(s) => s, [INFO] [stdout] 209 | Err(_) => return Err(Spanned { [INFO] [stdout] ... [INFO] [stdout] 212 | }), [INFO] [stdout] 213 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/module.rs:216:66 [INFO] [stdout] | [INFO] [stdout] 216 | (module_env, module_type_env) = DEFAULT_ENVS.get_or_init(|| create_default_env()).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `create_default_env` [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: useless use of `format!` [INFO] [stdout] --> src/module.rs:236:37 [INFO] [stdout] | [INFO] [stdout] 236 | inner: SmolStr::new(format!("Module parsing failed")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Module parsing failed".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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/module.rs:280:41 [INFO] [stdout] | [INFO] [stdout] 280 | ... &p, [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/module.rs:281:41 [INFO] [stdout] | [INFO] [stdout] 281 | ... &*ti, [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `ti` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/module.rs:369:78 [INFO] [stdout] | [INFO] [stdout] 369 | ... clean::LetPattern::Name(name) => match eval_expr(&expr, env)? { [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/module.rs:390:35 [INFO] [stdout] | [INFO] [stdout] 390 | ... span: spanned.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `spanned.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/module.rs:413:39 [INFO] [stdout] | [INFO] [stdout] 413 | ... span: statement.span.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `statement.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/main_parser.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match expr { [INFO] [stdout] 138 | | Expr::Var(_) | Expr::Get(_, _) | Expr::Index(_, _) => true, [INFO] [stdout] 139 | | _ => false, [INFO] [stdout] 140 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 137 - match expr { [INFO] [stdout] 138 - Expr::Var(_) | Expr::Get(_, _) | Expr::Index(_, _) => true, [INFO] [stdout] 139 - _ => false, [INFO] [stdout] 140 - } [INFO] [stdout] 137 + matches!(expr, Expr::Var(_) | Expr::Get(_, _) | Expr::Index(_, _)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/main_parser.rs:165:36 [INFO] [stdout] | [INFO] [stdout] 165 | let span = expr.span.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/main_parser.rs:189:28 [INFO] [stdout] | [INFO] [stdout] 189 | let span = expr.span.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main_parser.rs:1282:21 [INFO] [stdout] | [INFO] [stdout] 1281 | let e = self.parse_expression()?; [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 1282 | e [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] 1281 ~ [INFO] [stdout] 1282 ~ self.parse_expression()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/main_parser.rs:1806:9 [INFO] [stdout] | [INFO] [stdout] 1806 | / loop { [INFO] [stdout] 1807 | | let op_sp = match self.peek() { [INFO] [stdout] 1808 | | Some(s) => s.clone(), [INFO] [stdout] 1809 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 1922 | | } [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] 1806 ~ while let Some(s) = self.peek() { [INFO] [stdout] 1807 + let op_sp = s.clone(); [INFO] [stdout] 1808 + .. [INFO] [stdout] 1809 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/main_parser.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match expr { [INFO] [stdout] 138 | | Expr::Var(_) | Expr::Get(_, _) | Expr::Index(_, _) => true, [INFO] [stdout] 139 | | _ => false, [INFO] [stdout] 140 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 137 - match expr { [INFO] [stdout] 138 - Expr::Var(_) | Expr::Get(_, _) | Expr::Index(_, _) => true, [INFO] [stdout] 139 - _ => false, [INFO] [stdout] 140 - } [INFO] [stdout] 137 + matches!(expr, Expr::Var(_) | Expr::Get(_, _) | Expr::Index(_, _)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/main_parser.rs:165:36 [INFO] [stdout] | [INFO] [stdout] 165 | let span = expr.span.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Span` which implements the `Copy` trait [INFO] [stdout] --> src/main_parser.rs:189:28 [INFO] [stdout] | [INFO] [stdout] 189 | let span = expr.span.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr.span` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/main_parser.rs:1927:9 [INFO] [stdout] | [INFO] [stdout] 1927 | / loop { [INFO] [stdout] 1928 | | match self.peek() { [INFO] [stdout] 1929 | | Some(sp) => match &sp.inner { [INFO] [stdout] 1930 | | Token::LParen => { [INFO] [stdout] ... | [INFO] [stdout] 2130 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(sp) = self.peek() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main_parser.rs:1974:29 [INFO] [stdout] | [INFO] [stdout] 1973 | ... let e = self.parse_expression()?; [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 1974 | ... e [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] 1973 ~ [INFO] [stdout] 1974 ~ self.parse_expression()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main_parser.rs:2250:34 [INFO] [stdout] | [INFO] [stdout] 2250 | let checkpoint = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main_parser.rs:2251:17 [INFO] [stdout] | [INFO] [stdout] 2251 | / match self.try_parse_function_type(prev_token_span) { [INFO] [stdout] 2252 | | Ok(t) => return Ok(t), [INFO] [stdout] 2253 | | Err(_) => {}, [INFO] [stdout] 2254 | | } [INFO] [stdout] | |_________________^ help: try: `if let Ok(t) = self.try_parse_function_type(prev_token_span) { return Ok(t) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main_parser.rs:2277:20 [INFO] [stdout] | [INFO] [stdout] 2277 | if types.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `types.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] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main_parser.rs:1282:21 [INFO] [stdout] | [INFO] [stdout] 1281 | let e = self.parse_expression()?; [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 1282 | e [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] 1281 ~ [INFO] [stdout] 1282 ~ self.parse_expression()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/main_parser.rs:1806:9 [INFO] [stdout] | [INFO] [stdout] 1806 | / loop { [INFO] [stdout] 1807 | | let op_sp = match self.peek() { [INFO] [stdout] 1808 | | Some(s) => s.clone(), [INFO] [stdout] 1809 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 1922 | | } [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] 1806 ~ while let Some(s) = self.peek() { [INFO] [stdout] 1807 + let op_sp = s.clone(); [INFO] [stdout] 1808 + .. [INFO] [stdout] 1809 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/main_parser.rs:1927:9 [INFO] [stdout] | [INFO] [stdout] 1927 | / loop { [INFO] [stdout] 1928 | | match self.peek() { [INFO] [stdout] 1929 | | Some(sp) => match &sp.inner { [INFO] [stdout] 1930 | | Token::LParen => { [INFO] [stdout] ... | [INFO] [stdout] 2130 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(sp) = self.peek() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main_parser.rs:1974:29 [INFO] [stdout] | [INFO] [stdout] 1973 | ... let e = self.parse_expression()?; [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 1974 | ... e [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] 1973 ~ [INFO] [stdout] 1974 ~ self.parse_expression()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main_parser.rs:2250:34 [INFO] [stdout] | [INFO] [stdout] 2250 | let checkpoint = self.cursor.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main_parser.rs:2251:17 [INFO] [stdout] | [INFO] [stdout] 2251 | / match self.try_parse_function_type(prev_token_span) { [INFO] [stdout] 2252 | | Ok(t) => return Ok(t), [INFO] [stdout] 2253 | | Err(_) => {}, [INFO] [stdout] 2254 | | } [INFO] [stdout] | |_________________^ help: try: `if let Ok(t) = self.try_parse_function_type(prev_token_span) { return Ok(t) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main_parser.rs:2277:20 [INFO] [stdout] | [INFO] [stdout] 2277 | if types.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `types.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] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:19:70 [INFO] [stdout] | [INFO] [stdout] 19 | let (mut stack, mut type_env) = DEFAULT_ENVS.get_or_init(|| create_default_env()).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `create_default_env` [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: redundant closure [INFO] [stdout] --> src/main.rs:61:70 [INFO] [stdout] | [INFO] [stdout] 61 | let (mut stack, mut type_env) = DEFAULT_ENVS.get_or_init(|| create_default_env()).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `create_default_env` [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 `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / match v { [INFO] [stdout] 21 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 22 | | _ => panic!() [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 20 | match v { [INFO] [stdout] 21 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / match v { [INFO] [stdout] 43 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 44 | | _ => panic!() [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:41:28 [INFO] [stdout] | [INFO] [stdout] 41 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 42 | match v { [INFO] [stdout] 43 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | / match v { [INFO] [stdout] 68 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 69 | | _ => panic!() [INFO] [stdout] 70 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:66:28 [INFO] [stdout] | [INFO] [stdout] 66 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 67 | match v { [INFO] [stdout] 68 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | / match v { [INFO] [stdout] 93 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 94 | | _ => panic!() [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:91:28 [INFO] [stdout] | [INFO] [stdout] 91 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 92 | match v { [INFO] [stdout] 93 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / match v { [INFO] [stdout] 21 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 22 | | _ => panic!() [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 20 | match v { [INFO] [stdout] 21 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / match v { [INFO] [stdout] 43 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 44 | | _ => panic!() [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:41:28 [INFO] [stdout] | [INFO] [stdout] 41 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 42 | match v { [INFO] [stdout] 43 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / match v { [INFO] [stdout] 65 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 66 | | _ => panic!() [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 64 | match v { [INFO] [stdout] 65 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / match v { [INFO] [stdout] 114 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 115 | | _ => panic!() [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:112:28 [INFO] [stdout] | [INFO] [stdout] 112 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 113 | match v { [INFO] [stdout] 114 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | / match v { [INFO] [stdout] 17 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 18 | | _ => panic!() [INFO] [stdout] 19 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 16 | match v { [INFO] [stdout] 17 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | / match v { [INFO] [stdout] 135 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 136 | | _ => panic!() [INFO] [stdout] 137 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:133:28 [INFO] [stdout] | [INFO] [stdout] 133 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 134 | match v { [INFO] [stdout] 135 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | / match v { [INFO] [stdout] 156 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 157 | | _ => panic!() [INFO] [stdout] 158 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:154:28 [INFO] [stdout] | [INFO] [stdout] 154 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 155 | match v { [INFO] [stdout] 156 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match v { [INFO] [stdout] 51 | | Value::String(s) => assert_eq!(s, "z"), [INFO] [stdout] 52 | | _ => panic!() [INFO] [stdout] 53 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 50 | match v { [INFO] [stdout] 51 | Value::String(s) => assert_eq!(s, "z"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | / match v { [INFO] [stdout] 87 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 88 | | _ => panic!() [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:85:28 [INFO] [stdout] | [INFO] [stdout] 85 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 86 | match v { [INFO] [stdout] 87 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | / match v { [INFO] [stdout] 109 | | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] 110 | | _ => panic!() [INFO] [stdout] 111 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 108 | match v { [INFO] [stdout] 109 | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | / match v { [INFO] [stdout] 19 | | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] 20 | | _ => panic!() [INFO] [stdout] 21 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:17:28 [INFO] [stdout] | [INFO] [stdout] 17 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 18 | match v { [INFO] [stdout] 19 | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | / match v { [INFO] [stdout] 178 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 179 | | _ => panic!() [INFO] [stdout] 180 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:176:28 [INFO] [stdout] | [INFO] [stdout] 176 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 177 | match v { [INFO] [stdout] 178 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | / match v { [INFO] [stdout] 40 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 41 | | _ => panic!() [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:38:28 [INFO] [stdout] | [INFO] [stdout] 38 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 39 | match v { [INFO] [stdout] 40 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:199:13 [INFO] [stdout] | [INFO] [stdout] 199 | / match v { [INFO] [stdout] 200 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 201 | | _ => panic!() [INFO] [stdout] 202 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:198:28 [INFO] [stdout] | [INFO] [stdout] 198 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 199 | match v { [INFO] [stdout] 200 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | / match v { [INFO] [stdout] 61 | | Value::Int(i) => assert_eq!(i, 11), [INFO] [stdout] 62 | | _ => panic!() [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:59:28 [INFO] [stdout] | [INFO] [stdout] 59 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 60 | match v { [INFO] [stdout] 61 | Value::Int(i) => assert_eq!(i, 11), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | / match v { [INFO] [stdout] 81 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 82 | | _ => panic!() [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:79:28 [INFO] [stdout] | [INFO] [stdout] 79 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 80 | match v { [INFO] [stdout] 81 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | / match v { [INFO] [stdout] 102 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 103 | | _ => panic!() [INFO] [stdout] 104 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:100:28 [INFO] [stdout] | [INFO] [stdout] 100 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 101 | match v { [INFO] [stdout] 102 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | / match v { [INFO] [stdout] 89 | | Value::Char(c) => assert_eq!(c, 'z'), [INFO] [stdout] 90 | | _ => panic!() [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:87:28 [INFO] [stdout] | [INFO] [stdout] 87 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 88 | match v { [INFO] [stdout] 89 | Value::Char(c) => assert_eq!(c, 'z'), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | / match v { [INFO] [stdout] 126 | | Value::Int(i) => assert_eq!(i, 6), [INFO] [stdout] 127 | | _ => panic!() [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:124:28 [INFO] [stdout] | [INFO] [stdout] 124 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 125 | match v { [INFO] [stdout] 126 | Value::Int(i) => assert_eq!(i, 6), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:130:13 [INFO] [stdout] | [INFO] [stdout] 130 | / match v { [INFO] [stdout] 131 | | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] 132 | | _ => panic!() [INFO] [stdout] 133 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:129:28 [INFO] [stdout] | [INFO] [stdout] 129 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 130 | match v { [INFO] [stdout] 131 | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / match v { [INFO] [stdout] 146 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 147 | | _ => panic!() [INFO] [stdout] 148 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:144:28 [INFO] [stdout] | [INFO] [stdout] 144 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 145 | match v { [INFO] [stdout] 146 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:221:13 [INFO] [stdout] | [INFO] [stdout] 221 | / match v { [INFO] [stdout] 222 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 223 | | _ => panic!() [INFO] [stdout] 224 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:220:28 [INFO] [stdout] | [INFO] [stdout] 220 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 221 | match v { [INFO] [stdout] 222 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | / match v { [INFO] [stdout] 127 | | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] 128 | | _ => panic!() [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 126 | match v { [INFO] [stdout] 127 | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | / match v { [INFO] [stdout] 154 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 155 | | assert_eq!(enum_name, "A".to_string()); [INFO] [stdout] 156 | | assert_eq!(variant, "B".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 159 | | _ => panic!() [INFO] [stdout] 160 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:152:28 [INFO] [stdout] | [INFO] [stdout] 152 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 153 | match v { [INFO] [stdout] 154 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | / match v { [INFO] [stdout] 166 | | Value::Int(i) => assert_eq!(i, 7), [INFO] [stdout] 167 | | _ => panic!() [INFO] [stdout] 168 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:164:28 [INFO] [stdout] | [INFO] [stdout] 164 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 165 | match v { [INFO] [stdout] 166 | Value::Int(i) => assert_eq!(i, 7), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | / match v { [INFO] [stdout] 187 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 188 | | assert_eq!(enum_name, "Test".to_string()); [INFO] [stdout] 189 | | assert_eq!(variant, "A".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 192 | | _ => panic!() [INFO] [stdout] 193 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:185:28 [INFO] [stdout] | [INFO] [stdout] 185 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 186 | match v { [INFO] [stdout] 187 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:210:13 [INFO] [stdout] | [INFO] [stdout] 210 | / match v { [INFO] [stdout] 211 | | Value::String(s) => assert_eq!(s, "bb".to_string()), [INFO] [stdout] 212 | | _ => panic!() [INFO] [stdout] 213 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:209:28 [INFO] [stdout] | [INFO] [stdout] 209 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 210 | match v { [INFO] [stdout] 211 | Value::String(s) => assert_eq!(s, "bb".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | / match v { [INFO] [stdout] 152 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 153 | | _ => panic!() [INFO] [stdout] 154 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:150:28 [INFO] [stdout] | [INFO] [stdout] 150 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 151 | match v { [INFO] [stdout] 152 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:243:13 [INFO] [stdout] | [INFO] [stdout] 243 | / match v { [INFO] [stdout] 244 | | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] 245 | | _ => panic!() [INFO] [stdout] 246 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:242:28 [INFO] [stdout] | [INFO] [stdout] 242 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 243 | match v { [INFO] [stdout] 244 | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:229:13 [INFO] [stdout] | [INFO] [stdout] 229 | / match v { [INFO] [stdout] 230 | | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] 231 | | _ => panic!() [INFO] [stdout] 232 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:228:28 [INFO] [stdout] | [INFO] [stdout] 228 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 229 | match v { [INFO] [stdout] 230 | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | / match v { [INFO] [stdout] 265 | | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] 266 | | _ => panic!() [INFO] [stdout] 267 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:263:28 [INFO] [stdout] | [INFO] [stdout] 263 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 264 | match v { [INFO] [stdout] 265 | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/modules.rs:230:35 [INFO] [stdout] | [INFO] [stdout] 230 | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 230 - Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] 230 + Value::Bool(b) => assert!(b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:249:13 [INFO] [stdout] | [INFO] [stdout] 249 | / match v { [INFO] [stdout] 250 | | Value::String(s) => assert_eq!(s, "bb".to_string()), [INFO] [stdout] 251 | | _ => panic!() [INFO] [stdout] 252 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:248:28 [INFO] [stdout] | [INFO] [stdout] 248 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 249 | match v { [INFO] [stdout] 250 | Value::String(s) => assert_eq!(s, "bb".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | / match v { [INFO] [stdout] 177 | | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] 178 | | _ => panic!() [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:175:28 [INFO] [stdout] | [INFO] [stdout] 175 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 176 | match v { [INFO] [stdout] 177 | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/modules.rs:268:13 [INFO] [stdout] | [INFO] [stdout] 268 | / match v { [INFO] [stdout] 269 | | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] 270 | | _ => panic!() [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/modules.rs:267:28 [INFO] [stdout] | [INFO] [stdout] 267 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 268 | match v { [INFO] [stdout] 269 | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/modules.rs:269:35 [INFO] [stdout] | [INFO] [stdout] 269 | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 269 - Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] 269 + Value::Bool(b) => assert!(b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 180 | / match v { [INFO] [stdout] 181 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 182 | | assert_eq!(enum_name, "A".to_string()); [INFO] [stdout] 183 | | assert_eq!(variant, "B".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 186 | | _ => panic!() [INFO] [stdout] 187 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:179:28 [INFO] [stdout] | [INFO] [stdout] 179 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 180 | match v { [INFO] [stdout] 181 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> tests/mutation.rs:196:16 [INFO] [stdout] | [INFO] [stdout] 196 | if !(e.inner == "Cannot assign an immutable reference to a mutable variable") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(e.inner != "Cannot assign an immutable reference to a mutable variable")` [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 `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:288:13 [INFO] [stdout] | [INFO] [stdout] 288 | / match v { [INFO] [stdout] 289 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 290 | | _ => panic!() [INFO] [stdout] 291 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:287:28 [INFO] [stdout] | [INFO] [stdout] 287 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 288 | match v { [INFO] [stdout] 289 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/pattern_matching.rs:310:13 [INFO] [stdout] | [INFO] [stdout] 310 | / match v { [INFO] [stdout] 311 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 312 | | _ => panic!() [INFO] [stdout] 313 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/pattern_matching.rs:309:28 [INFO] [stdout] | [INFO] [stdout] 309 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 310 | match v { [INFO] [stdout] 311 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:213:34 [INFO] [stdout] | [INFO] [stdout] 213 | ControlFlow::Value(v) => match v { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 214 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 215 | | _ => panic!() [INFO] [stdout] 216 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:213:28 [INFO] [stdout] | [INFO] [stdout] 213 | ControlFlow::Value(v) => match v { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 214 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | / match v { [INFO] [stdout] 233 | | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] 234 | | _ => panic!() [INFO] [stdout] 235 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:231:28 [INFO] [stdout] | [INFO] [stdout] 231 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 232 | match v { [INFO] [stdout] 233 | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:206:13 [INFO] [stdout] | [INFO] [stdout] 206 | / match v { [INFO] [stdout] 207 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 208 | | _ => panic!() [INFO] [stdout] 209 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:205:28 [INFO] [stdout] | [INFO] [stdout] 205 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 206 | match v { [INFO] [stdout] 207 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:229:13 [INFO] [stdout] | [INFO] [stdout] 229 | / match v { [INFO] [stdout] 230 | | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] 231 | | _ => panic!() [INFO] [stdout] 232 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:228:28 [INFO] [stdout] | [INFO] [stdout] 228 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 229 | match v { [INFO] [stdout] 230 | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> tests/mutation.rs:256:16 [INFO] [stdout] | [INFO] [stdout] 256 | if !(e.inner == "Cannot pass an immutable reference as a mutable argument") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(e.inner != "Cannot pass an immutable reference as a mutable argument")` [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: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | / match v { [INFO] [stdout] 251 | | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] 252 | | _ => panic!() [INFO] [stdout] 253 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:249:28 [INFO] [stdout] | [INFO] [stdout] 249 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 250 | match v { [INFO] [stdout] 251 | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:279:13 [INFO] [stdout] | [INFO] [stdout] 279 | / match v { [INFO] [stdout] 280 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 281 | | _ => panic!() [INFO] [stdout] 282 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:278:28 [INFO] [stdout] | [INFO] [stdout] 278 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 279 | match v { [INFO] [stdout] 280 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/mutation.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | / match v { [INFO] [stdout] 305 | | Value::Int(i) => assert_eq!(i, 7), [INFO] [stdout] 306 | | _ => panic!() [INFO] [stdout] 307 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/mutation.rs:303:28 [INFO] [stdout] | [INFO] [stdout] 303 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 304 | match v { [INFO] [stdout] 305 | Value::Int(i) => assert_eq!(i, 7), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:271:13 [INFO] [stdout] | [INFO] [stdout] 271 | / match v { [INFO] [stdout] 272 | | Value::Int(i) => assert_eq!(i, 3), [INFO] [stdout] 273 | | _ => panic!() [INFO] [stdout] 274 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:270:28 [INFO] [stdout] | [INFO] [stdout] 270 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 271 | match v { [INFO] [stdout] 272 | Value::Int(i) => assert_eq!(i, 3), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:294:13 [INFO] [stdout] | [INFO] [stdout] 294 | / match v { [INFO] [stdout] 295 | | Value::String(s) => assert_eq!(s, "test".to_string()), [INFO] [stdout] 296 | | _ => panic!() [INFO] [stdout] 297 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:293:28 [INFO] [stdout] | [INFO] [stdout] 293 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 294 | match v { [INFO] [stdout] 295 | Value::String(s) => assert_eq!(s, "test".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> tests/mutation.rs:326:16 [INFO] [stdout] | [INFO] [stdout] 326 | if !(e.inner == "Cannot pass a literal expression as a mutable argument") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(e.inner != "Cannot pass a literal expression as a mutable argument")` [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: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:317:13 [INFO] [stdout] | [INFO] [stdout] 317 | / match v { [INFO] [stdout] 318 | | Value::String(s) => assert_eq!(s, "test".to_string()), [INFO] [stdout] 319 | | _ => panic!() [INFO] [stdout] 320 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:316:28 [INFO] [stdout] | [INFO] [stdout] 316 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 317 | match v { [INFO] [stdout] 318 | Value::String(s) => assert_eq!(s, "test".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/generics.rs:340:13 [INFO] [stdout] | [INFO] [stdout] 340 | / match v { [INFO] [stdout] 341 | | Value::String(s) => assert_eq!(s, "test".to_string()), [INFO] [stdout] 342 | | _ => panic!() [INFO] [stdout] 343 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/generics.rs:339:28 [INFO] [stdout] | [INFO] [stdout] 339 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 340 | match v { [INFO] [stdout] 341 | Value::String(s) => assert_eq!(s, "test".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:19:70 [INFO] [stdout] | [INFO] [stdout] 19 | let (mut stack, mut type_env) = DEFAULT_ENVS.get_or_init(|| create_default_env()).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `create_default_env` [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: redundant closure [INFO] [stdout] --> src/main.rs:61:70 [INFO] [stdout] | [INFO] [stdout] 61 | let (mut stack, mut type_env) = DEFAULT_ENVS.get_or_init(|| create_default_env()).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `create_default_env` [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 `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | / match v { [INFO] [stdout] 16 | | Value::Int(i) => assert_eq!(i, 22), [INFO] [stdout] 17 | | _ => panic!() [INFO] [stdout] 18 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 15 | match v { [INFO] [stdout] 16 | Value::Int(i) => assert_eq!(i, 22), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | / match v { [INFO] [stdout] 33 | | Value::Int(i) => assert_eq!(i, -8), [INFO] [stdout] 34 | | _ => panic!() [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 32 | match v { [INFO] [stdout] 33 | Value::Int(i) => assert_eq!(i, -8), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | / match v { [INFO] [stdout] 58 | | Value::Int(i) => assert_eq!(i, 22), [INFO] [stdout] 59 | | _ => panic!() [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:56:28 [INFO] [stdout] | [INFO] [stdout] 56 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 57 | match v { [INFO] [stdout] 58 | Value::Int(i) => assert_eq!(i, 22), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | / match v { [INFO] [stdout] 86 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 87 | | _ => panic!() [INFO] [stdout] 88 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:84:28 [INFO] [stdout] | [INFO] [stdout] 84 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 85 | match v { [INFO] [stdout] 86 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | / match v { [INFO] [stdout] 104 | | Value::Int(i) => assert_eq!(i, 6), [INFO] [stdout] 105 | | _ => panic!() [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:102:28 [INFO] [stdout] | [INFO] [stdout] 102 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 103 | match v { [INFO] [stdout] 104 | Value::Int(i) => assert_eq!(i, 6), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | / match v { [INFO] [stdout] 127 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 128 | | _ => panic!() [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 126 | match v { [INFO] [stdout] 127 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | / match v { [INFO] [stdout] 149 | | Value::Int(i) => assert_eq!(i, 14), [INFO] [stdout] 150 | | _ => panic!() [INFO] [stdout] 151 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 148 | match v { [INFO] [stdout] 149 | Value::Int(i) => assert_eq!(i, 14), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:163:13 [INFO] [stdout] | [INFO] [stdout] 163 | / match v { [INFO] [stdout] 164 | | Value::Int(i) => assert_eq!(i, 14), [INFO] [stdout] 165 | | _ => panic!() [INFO] [stdout] 166 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:162:28 [INFO] [stdout] | [INFO] [stdout] 162 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 163 | match v { [INFO] [stdout] 164 | Value::Int(i) => assert_eq!(i, 14), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | / match v { [INFO] [stdout] 182 | | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] 183 | | _ => panic!() [INFO] [stdout] 184 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:180:28 [INFO] [stdout] | [INFO] [stdout] 180 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 181 | match v { [INFO] [stdout] 182 | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | / match v { [INFO] [stdout] 199 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 200 | | _ => panic!() [INFO] [stdout] 201 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:197:28 [INFO] [stdout] | [INFO] [stdout] 197 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 198 | match v { [INFO] [stdout] 199 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | / match v { [INFO] [stdout] 219 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 220 | | _ => panic!() [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:217:28 [INFO] [stdout] | [INFO] [stdout] 217 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 218 | match v { [INFO] [stdout] 219 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | / match v { [INFO] [stdout] 240 | | Value::Int(i) => assert_eq!(i, 3), [INFO] [stdout] 241 | | _ => panic!() [INFO] [stdout] 242 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:238:28 [INFO] [stdout] | [INFO] [stdout] 238 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 239 | match v { [INFO] [stdout] 240 | Value::Int(i) => assert_eq!(i, 3), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:257:13 [INFO] [stdout] | [INFO] [stdout] 257 | / match v { [INFO] [stdout] 258 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 259 | | _ => panic!() [INFO] [stdout] 260 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:256:28 [INFO] [stdout] | [INFO] [stdout] 256 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 257 | match v { [INFO] [stdout] 258 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:275:13 [INFO] [stdout] | [INFO] [stdout] 275 | / match v { [INFO] [stdout] 276 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 277 | | _ => panic!() [INFO] [stdout] 278 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:274:28 [INFO] [stdout] | [INFO] [stdout] 274 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 275 | match v { [INFO] [stdout] 276 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:296:13 [INFO] [stdout] | [INFO] [stdout] 296 | / match v { [INFO] [stdout] 297 | | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] 298 | | _ => panic!() [INFO] [stdout] 299 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:295:28 [INFO] [stdout] | [INFO] [stdout] 295 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 296 | match v { [INFO] [stdout] 297 | Value::Int(i) => assert_eq!(i, 9), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:314:13 [INFO] [stdout] | [INFO] [stdout] 314 | / match v { [INFO] [stdout] 315 | | Value::Int(i) => assert_eq!(i, 27), [INFO] [stdout] 316 | | _ => panic!() [INFO] [stdout] 317 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:313:28 [INFO] [stdout] | [INFO] [stdout] 313 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 314 | match v { [INFO] [stdout] 315 | Value::Int(i) => assert_eq!(i, 27), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / match v { [INFO] [stdout] 21 | | Value::Int(i) => assert_eq!(i, 8), [INFO] [stdout] 22 | | _ => panic!() [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 20 | match v { [INFO] [stdout] 21 | Value::Int(i) => assert_eq!(i, 8), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | / match v { [INFO] [stdout] 40 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 41 | | assert_eq!(enum_name, "Option".to_string()); [INFO] [stdout] 42 | | assert_eq!(variant, "Some".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 45 | | _ => panic!() [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:38:28 [INFO] [stdout] | [INFO] [stdout] 38 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 39 | match v { [INFO] [stdout] 40 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:332:13 [INFO] [stdout] | [INFO] [stdout] 332 | / match v { [INFO] [stdout] 333 | | Value::Int(i) => assert_eq!(i, 6), [INFO] [stdout] 334 | | _ => panic!() [INFO] [stdout] 335 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:331:28 [INFO] [stdout] | [INFO] [stdout] 331 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 332 | match v { [INFO] [stdout] 333 | Value::Int(i) => assert_eq!(i, 6), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/parsing.rs:350:13 [INFO] [stdout] | [INFO] [stdout] 350 | / match v { [INFO] [stdout] 351 | | Value::Int(i) => assert_eq!(i, 21), [INFO] [stdout] 352 | | _ => panic!() [INFO] [stdout] 353 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/parsing.rs:349:28 [INFO] [stdout] | [INFO] [stdout] 349 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 350 | match v { [INFO] [stdout] 351 | Value::Int(i) => assert_eq!(i, 21), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | / match v { [INFO] [stdout] 64 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 65 | | _ => panic!() [INFO] [stdout] 66 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:62:28 [INFO] [stdout] | [INFO] [stdout] 62 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 63 | match v { [INFO] [stdout] 64 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | / match v { [INFO] [stdout] 88 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 89 | | assert_eq!(enum_name, "Option".to_string()); [INFO] [stdout] 90 | | assert_eq!(variant, "Some".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 93 | | _ => panic!() [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:86:28 [INFO] [stdout] | [INFO] [stdout] 86 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 87 | match v { [INFO] [stdout] 88 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | / match v { [INFO] [stdout] 112 | | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] 113 | | _ => panic!() [INFO] [stdout] 114 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:110:28 [INFO] [stdout] | [INFO] [stdout] 110 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 111 | match v { [INFO] [stdout] 112 | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:112:35 [INFO] [stdout] | [INFO] [stdout] 112 | Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 112 - Value::Bool(b) => assert_eq!(b, true), [INFO] [stdout] 112 + Value::Bool(b) => assert!(b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / match v { [INFO] [stdout] 132 | | Value::Array(a) => assert_eq!( [INFO] [stdout] 133 | | *a.read().unwrap(), [INFO] [stdout] 134 | | vec![Value::Int(1), Value::Int(2)] [INFO] [stdout] 135 | | ), [INFO] [stdout] 136 | | _ => panic!() [INFO] [stdout] 137 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:130:28 [INFO] [stdout] | [INFO] [stdout] 130 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 131 | match v { [INFO] [stdout] 132 | Value::Array(a) => assert_eq!( [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | / match v { [INFO] [stdout] 155 | | Value::Array(a) => assert_eq!( [INFO] [stdout] 156 | | *a.read().unwrap(), [INFO] [stdout] 157 | | vec![Value::Int(3), Value::Int(2), Value::Int(1)] [INFO] [stdout] 158 | | ), [INFO] [stdout] 159 | | _ => panic!() [INFO] [stdout] 160 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:153:28 [INFO] [stdout] | [INFO] [stdout] 153 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 154 | match v { [INFO] [stdout] 155 | Value::Array(a) => assert_eq!( [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | / match v { [INFO] [stdout] 178 | | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 179 | | _ => panic!() [INFO] [stdout] 180 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:176:28 [INFO] [stdout] | [INFO] [stdout] 176 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 177 | match v { [INFO] [stdout] 178 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:178:35 [INFO] [stdout] | [INFO] [stdout] 178 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 178 - Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 178 + Value::Bool(a) => assert!(a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | / match v { [INFO] [stdout] 198 | | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 199 | | _ => panic!() [INFO] [stdout] 200 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:196:28 [INFO] [stdout] | [INFO] [stdout] 196 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 197 | match v { [INFO] [stdout] 198 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:198:35 [INFO] [stdout] | [INFO] [stdout] 198 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 198 - Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 198 + Value::Bool(a) => assert!(a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:217:13 [INFO] [stdout] | [INFO] [stdout] 217 | / match v { [INFO] [stdout] 218 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 219 | | assert_eq!(enum_name, "Option".to_string()); [INFO] [stdout] 220 | | assert_eq!(variant, "Some".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 223 | | _ => panic!() [INFO] [stdout] 224 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:216:28 [INFO] [stdout] | [INFO] [stdout] 216 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 217 | match v { [INFO] [stdout] 218 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:241:13 [INFO] [stdout] | [INFO] [stdout] 241 | / match v { [INFO] [stdout] 242 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 243 | | assert_eq!(enum_name, "Option".to_string()); [INFO] [stdout] 244 | | assert_eq!(variant, "None".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 247 | | _ => panic!() [INFO] [stdout] 248 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:240:28 [INFO] [stdout] | [INFO] [stdout] 240 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 241 | match v { [INFO] [stdout] 242 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:266:13 [INFO] [stdout] | [INFO] [stdout] 266 | / match v { [INFO] [stdout] 267 | | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] 268 | | _ => panic!() [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:265:28 [INFO] [stdout] | [INFO] [stdout] 265 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 266 | match v { [INFO] [stdout] 267 | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:267:35 [INFO] [stdout] | [INFO] [stdout] 267 | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 267 - Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] 267 + Value::Bool(a) => assert!(!a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | / match v { [INFO] [stdout] 287 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 288 | | assert_eq!(enum_name, "Option".to_string()); [INFO] [stdout] 289 | | assert_eq!(variant, "Some".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 292 | | _ => panic!() [INFO] [stdout] 293 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:285:28 [INFO] [stdout] | [INFO] [stdout] 285 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 286 | match v { [INFO] [stdout] 287 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:310:13 [INFO] [stdout] | [INFO] [stdout] 310 | / match v { [INFO] [stdout] 311 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 312 | | assert_eq!(enum_name, "Option".to_string()); [INFO] [stdout] 313 | | assert_eq!(variant, "None".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 316 | | _ => panic!() [INFO] [stdout] 317 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:309:28 [INFO] [stdout] | [INFO] [stdout] 309 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 310 | match v { [INFO] [stdout] 311 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:334:13 [INFO] [stdout] | [INFO] [stdout] 334 | / match v { [INFO] [stdout] 335 | | Value::String(a) => assert_eq!(a, SmolStr::new("dsa")), [INFO] [stdout] 336 | | _ => panic!() [INFO] [stdout] 337 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:333:28 [INFO] [stdout] | [INFO] [stdout] 333 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 334 | match v { [INFO] [stdout] 335 | Value::String(a) => assert_eq!(a, SmolStr::new("dsa")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 354 | / match v { [INFO] [stdout] 355 | | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 356 | | _ => panic!() [INFO] [stdout] 357 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:353:28 [INFO] [stdout] | [INFO] [stdout] 353 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 354 | match v { [INFO] [stdout] 355 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:355:35 [INFO] [stdout] | [INFO] [stdout] 355 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 355 - Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 355 + Value::Bool(a) => assert!(a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:374:13 [INFO] [stdout] | [INFO] [stdout] 374 | / match v { [INFO] [stdout] 375 | | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] 376 | | _ => panic!() [INFO] [stdout] 377 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:373:28 [INFO] [stdout] | [INFO] [stdout] 373 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 374 | match v { [INFO] [stdout] 375 | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:375:35 [INFO] [stdout] | [INFO] [stdout] 375 | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 375 - Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] 375 + Value::Bool(a) => assert!(!a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:394:13 [INFO] [stdout] | [INFO] [stdout] 394 | / match v { [INFO] [stdout] 395 | | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 396 | | _ => panic!() [INFO] [stdout] 397 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:393:28 [INFO] [stdout] | [INFO] [stdout] 393 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 394 | match v { [INFO] [stdout] 395 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:395:35 [INFO] [stdout] | [INFO] [stdout] 395 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 395 - Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 395 + Value::Bool(a) => assert!(a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:414:13 [INFO] [stdout] | [INFO] [stdout] 414 | / match v { [INFO] [stdout] 415 | | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] 416 | | _ => panic!() [INFO] [stdout] 417 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:413:28 [INFO] [stdout] | [INFO] [stdout] 413 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 414 | match v { [INFO] [stdout] 415 | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:415:35 [INFO] [stdout] | [INFO] [stdout] 415 | Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 415 - Value::Bool(a) => assert_eq!(a, false), [INFO] [stdout] 415 + Value::Bool(a) => assert!(!a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:436:13 [INFO] [stdout] | [INFO] [stdout] 436 | / match v { [INFO] [stdout] 437 | | Value::String(s) => assert_eq!(s, "hello"), [INFO] [stdout] 438 | | _ => panic!() [INFO] [stdout] 439 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:435:28 [INFO] [stdout] | [INFO] [stdout] 435 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 436 | match v { [INFO] [stdout] 437 | Value::String(s) => assert_eq!(s, "hello"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | / match v { [INFO] [stdout] 457 | | Value::String(s) => assert_eq!(s, "hello"), [INFO] [stdout] 458 | | _ => panic!() [INFO] [stdout] 459 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:455:28 [INFO] [stdout] | [INFO] [stdout] 455 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 456 | match v { [INFO] [stdout] 457 | Value::String(s) => assert_eq!(s, "hello"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:481:13 [INFO] [stdout] | [INFO] [stdout] 481 | / match v { [INFO] [stdout] 482 | | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 483 | | _ => panic!() [INFO] [stdout] 484 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:480:28 [INFO] [stdout] | [INFO] [stdout] 480 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 481 | match v { [INFO] [stdout] 482 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/builtins.rs:482:35 [INFO] [stdout] | [INFO] [stdout] 482 | Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 482 - Value::Bool(a) => assert_eq!(a, true), [INFO] [stdout] 482 + Value::Bool(a) => assert!(a), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:500:13 [INFO] [stdout] | [INFO] [stdout] 500 | / match v { [INFO] [stdout] 501 | | Value::String(s) => assert_eq!(s, "h34.4"), [INFO] [stdout] 502 | | _ => panic!() [INFO] [stdout] 503 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:499:28 [INFO] [stdout] | [INFO] [stdout] 499 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 500 | match v { [INFO] [stdout] 501 | Value::String(s) => assert_eq!(s, "h34.4"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:519:13 [INFO] [stdout] | [INFO] [stdout] 519 | / match v { [INFO] [stdout] 520 | | Value::Float(f) => assert_eq!(f, 11.0), [INFO] [stdout] 521 | | _ => panic!() [INFO] [stdout] 522 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:518:28 [INFO] [stdout] | [INFO] [stdout] 518 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 519 | match v { [INFO] [stdout] 520 | Value::Float(f) => assert_eq!(f, 11.0), [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:538:13 [INFO] [stdout] | [INFO] [stdout] 538 | / match v { [INFO] [stdout] 539 | | Value::Float(f) => assert_eq!(f, 10.0), [INFO] [stdout] 540 | | _ => panic!() [INFO] [stdout] 541 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:537:28 [INFO] [stdout] | [INFO] [stdout] 537 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 538 | match v { [INFO] [stdout] 539 | Value::Float(f) => assert_eq!(f, 10.0), [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/builtins.rs:557:13 [INFO] [stdout] | [INFO] [stdout] 557 | / match v { [INFO] [stdout] 558 | | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] 559 | | _ => panic!() [INFO] [stdout] 560 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/builtins.rs:556:28 [INFO] [stdout] | [INFO] [stdout] 556 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 557 | match v { [INFO] [stdout] 558 | Value::Int(i) => assert_eq!(i, 10), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / match v { [INFO] [stdout] 27 | | Value::Int(i) => assert_eq!(i, 100), [INFO] [stdout] 28 | | _ => panic!() [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:25:28 [INFO] [stdout] | [INFO] [stdout] 25 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 26 | match v { [INFO] [stdout] 27 | Value::Int(i) => assert_eq!(i, 100), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | / match v { [INFO] [stdout] 44 | | Value::Bool(i) => assert_eq!(i, true), [INFO] [stdout] 45 | | _ => panic!() [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:42:28 [INFO] [stdout] | [INFO] [stdout] 42 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 43 | match v { [INFO] [stdout] 44 | Value::Bool(i) => assert_eq!(i, true), [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/typed.rs:44:35 [INFO] [stdout] | [INFO] [stdout] 44 | Value::Bool(i) => assert_eq!(i, true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 44 - Value::Bool(i) => assert_eq!(i, true), [INFO] [stdout] 44 + Value::Bool(i) => assert!(i), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | / match v { [INFO] [stdout] 73 | | Value::Int(i) => assert_eq!(i, 284), // (42 + 100) * 2 = 284 [INFO] [stdout] 74 | | _ => panic!() [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:71:28 [INFO] [stdout] | [INFO] [stdout] 71 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 72 | match v { [INFO] [stdout] 73 | Value::Int(i) => assert_eq!(i, 284), // (42 + 100) * 2 = 284 [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | / match v { [INFO] [stdout] 96 | | Value::Int(i) => assert_eq!(i, 120), [INFO] [stdout] 97 | | _ => panic!() [INFO] [stdout] 98 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 95 | match v { [INFO] [stdout] 96 | Value::Int(i) => assert_eq!(i, 120), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:118:13 [INFO] [stdout] | [INFO] [stdout] 118 | / match v { [INFO] [stdout] 119 | | Value::Int(i) => assert_eq!(i, 0), [INFO] [stdout] 120 | | _ => panic!() [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:117:28 [INFO] [stdout] | [INFO] [stdout] 117 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 118 | match v { [INFO] [stdout] 119 | Value::Int(i) => assert_eq!(i, 0), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | / match v { [INFO] [stdout] 137 | | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] 138 | | _ => panic!() [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 136 | match v { [INFO] [stdout] 137 | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | / match v { [INFO] [stdout] 156 | | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] 157 | | _ => panic!() [INFO] [stdout] 158 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:154:28 [INFO] [stdout] | [INFO] [stdout] 154 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 155 | match v { [INFO] [stdout] 156 | Value::Int(i) => assert_eq!(i, 4), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | / match v { [INFO] [stdout] 176 | | Value::Array(i) => assert_eq!( [INFO] [stdout] 177 | | i.read().unwrap().clone(), [INFO] [stdout] 178 | | vec![Value::Int(1), Value::Int(2), Value::Int(3)] [INFO] [stdout] 179 | | ), [INFO] [stdout] 180 | | _ => panic!() [INFO] [stdout] 181 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:174:28 [INFO] [stdout] | [INFO] [stdout] 174 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 175 | match v { [INFO] [stdout] 176 | Value::Array(i) => assert_eq!( [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | / match v { [INFO] [stdout] 204 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 205 | | assert_eq!(enum_name, "Color".to_string()); [INFO] [stdout] 206 | | assert_eq!(variant, "Red".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 209 | | _ => panic!() [INFO] [stdout] 210 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:202:28 [INFO] [stdout] | [INFO] [stdout] 202 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 203 | match v { [INFO] [stdout] 204 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:231:13 [INFO] [stdout] | [INFO] [stdout] 231 | / match v { [INFO] [stdout] 232 | | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] 233 | | assert_eq!(enum_name, "Hello".to_string()); [INFO] [stdout] 234 | | assert_eq!(variant, "A".to_string()); [INFO] [stdout] ... | [INFO] [stdout] 237 | | _ => panic!() [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:230:28 [INFO] [stdout] | [INFO] [stdout] 230 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 231 | match v { [INFO] [stdout] 232 | Value::EnumVariant { enum_name, variant, value } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:254:13 [INFO] [stdout] | [INFO] [stdout] 254 | / match v { [INFO] [stdout] 255 | | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] 256 | | _ => panic!() [INFO] [stdout] 257 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:253:28 [INFO] [stdout] | [INFO] [stdout] 253 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 254 | match v { [INFO] [stdout] 255 | Value::Int(i) => assert_eq!(i, 5), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:275:13 [INFO] [stdout] | [INFO] [stdout] 275 | / match v { [INFO] [stdout] 276 | | Value::Int(i) => assert_eq!(i, 25), [INFO] [stdout] 277 | | _ => panic!() [INFO] [stdout] 278 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:274:28 [INFO] [stdout] | [INFO] [stdout] 274 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 275 | match v { [INFO] [stdout] 276 | Value::Int(i) => assert_eq!(i, 25), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | / match v { [INFO] [stdout] 302 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 303 | | _ => panic!() [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:300:28 [INFO] [stdout] | [INFO] [stdout] 300 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 301 | match v { [INFO] [stdout] 302 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:330:13 [INFO] [stdout] | [INFO] [stdout] 330 | / match v { [INFO] [stdout] 331 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 332 | | _ => panic!() [INFO] [stdout] 333 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:329:28 [INFO] [stdout] | [INFO] [stdout] 329 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 330 | match v { [INFO] [stdout] 331 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:356:13 [INFO] [stdout] | [INFO] [stdout] 356 | / match v { [INFO] [stdout] 357 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 358 | | _ => panic!() [INFO] [stdout] 359 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:355:28 [INFO] [stdout] | [INFO] [stdout] 355 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 356 | match v { [INFO] [stdout] 357 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | / match v { [INFO] [stdout] 384 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 385 | | _ => panic!() [INFO] [stdout] 386 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:382:28 [INFO] [stdout] | [INFO] [stdout] 382 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 383 | match v { [INFO] [stdout] 384 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:408:13 [INFO] [stdout] | [INFO] [stdout] 408 | / match v { [INFO] [stdout] 409 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 410 | | _ => panic!() [INFO] [stdout] 411 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:407:28 [INFO] [stdout] | [INFO] [stdout] 407 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 408 | match v { [INFO] [stdout] 409 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:436:13 [INFO] [stdout] | [INFO] [stdout] 436 | / match v { [INFO] [stdout] 437 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 438 | | _ => panic!() [INFO] [stdout] 439 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:435:28 [INFO] [stdout] | [INFO] [stdout] 435 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 436 | match v { [INFO] [stdout] 437 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:485:13 [INFO] [stdout] | [INFO] [stdout] 485 | / match v { [INFO] [stdout] 486 | | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] 487 | | _ => panic!() [INFO] [stdout] 488 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:484:28 [INFO] [stdout] | [INFO] [stdout] 484 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 485 | match v { [INFO] [stdout] 486 | Value::Int(i) => assert_eq!(i, 2), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> tests/typed.rs:505:13 [INFO] [stdout] | [INFO] [stdout] 505 | / match v { [INFO] [stdout] 506 | | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] 507 | | _ => panic!() [INFO] [stdout] 508 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> tests/typed.rs:504:28 [INFO] [stdout] | [INFO] [stdout] 504 | ControlFlow::Value(v) => { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 505 | match v { [INFO] [stdout] 506 | Value::Int(i) => assert_eq!(i, 1), [INFO] [stdout] | ^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.08s [INFO] running `Command { std: "docker" "inspect" "55ee7b73824cc0449c1cee03432feedfb417c2d9879030e1383d04d3dcab2948", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "55ee7b73824cc0449c1cee03432feedfb417c2d9879030e1383d04d3dcab2948", kill_on_drop: false }` [INFO] [stdout] 55ee7b73824cc0449c1cee03432feedfb417c2d9879030e1383d04d3dcab2948