[INFO] cloning repository https://github.com/ljp-projects/mosaic [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ljp-projects/mosaic" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fljp-projects%2Fmosaic", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fljp-projects%2Fmosaic'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 99ea2489d8d64405c40389e8bb4094351e3d0f30 [INFO] linting ljp-projects/mosaic/99ea2489d8d64405c40389e8bb4094351e3d0f30 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fljp-projects%2Fmosaic" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ljp-projects/mosaic [INFO] finished tweaking git repo https://github.com/ljp-projects/mosaic [INFO] tweaked toml for git repo https://github.com/ljp-projects/mosaic written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ljp-projects/mosaic 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/ljp-projects/mosaic already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cranelift-control v0.127.1 [INFO] [stderr] Downloaded wasmtime-internal-math v40.0.1 [INFO] [stderr] Downloaded cranelift-srcgen v0.127.1 [INFO] [stderr] Downloaded cranelift-assembler-x64 v0.127.1 [INFO] [stderr] Downloaded cranelift-entity v0.127.1 [INFO] [stderr] Downloaded cranelift-bforest v0.127.1 [INFO] [stderr] Downloaded cranelift-assembler-x64-meta v0.127.1 [INFO] [stderr] Downloaded cranelift-frontend v0.127.1 [INFO] [stderr] Downloaded regalloc2 v0.13.4 [INFO] [stderr] Downloaded cranelift-codegen-shared v0.127.1 [INFO] [stderr] Downloaded cranelift-bitset v0.127.1 [INFO] [stderr] Downloaded cranelift-object v0.127.1 [INFO] [stderr] Downloaded homedir v0.3.6 [INFO] [stderr] Downloaded mmap-rs v0.7.0 [INFO] [stderr] Downloaded cranelift-module v0.127.1 [INFO] [stderr] Downloaded target-lexicon v0.13.4 [INFO] [stderr] Downloaded cranelift-isle v0.127.1 [INFO] [stderr] Downloaded cranelift-codegen-meta v0.127.1 [INFO] [stderr] Downloaded cranelift-codegen v0.127.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2725216a2636e54776df35acf7e3a2fff423fac239f26bde2c002ca763e1122b [INFO] running `Command { std: "docker" "start" "-a" "2725216a2636e54776df35acf7e3a2fff423fac239f26bde2c002ca763e1122b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2725216a2636e54776df35acf7e3a2fff423fac239f26bde2c002ca763e1122b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2725216a2636e54776df35acf7e3a2fff423fac239f26bde2c002ca763e1122b", kill_on_drop: false }` [INFO] [stdout] 2725216a2636e54776df35acf7e3a2fff423fac239f26bde2c002ca763e1122b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 744a9dc423c4037a4551078ae2c69010c3df4397ed556f88f1def2cc8575c166 [INFO] running `Command { std: "docker" "start" "-a" "744a9dc423c4037a4551078ae2c69010c3df4397ed556f88f1def2cc8575c166", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Compiling cranelift-srcgen v0.127.1 [INFO] [stderr] Compiling cranelift-isle v0.127.1 [INFO] [stderr] Compiling cranelift-codegen-shared v0.127.1 [INFO] [stderr] Checking cranelift-bitset v0.127.1 [INFO] [stderr] Compiling target-lexicon v0.13.4 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Compiling libc v0.2.179 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking arbitrary v1.4.2 [INFO] [stderr] Checking bumpalo v3.19.1 [INFO] [stderr] Checking gimli v0.32.3 [INFO] [stderr] Compiling nix v0.30.1 [INFO] [stderr] Checking wasmtime-internal-math v40.0.1 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Compiling cranelift-assembler-x64-meta v0.127.1 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Checking cranelift-entity v0.127.1 [INFO] [stderr] Compiling object v0.37.3 [INFO] [stderr] Checking clap_builder v4.5.54 [INFO] [stderr] Checking cranelift-bforest v0.127.1 [INFO] [stderr] Checking combine v4.6.7 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking cranelift-control v0.127.1 [INFO] [stderr] Checking downcast-rs v2.0.2 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking regalloc2 v0.13.4 [INFO] [stderr] Compiling cranelift-codegen-meta v0.127.1 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling cranelift-assembler-x64 v0.127.1 [INFO] [stderr] Checking homedir v0.3.6 [INFO] [stderr] Compiling cranelift-codegen v0.127.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling enum-as-inner v0.6.1 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking sysctl v0.6.0 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking mmap-rs v0.7.0 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking cranelift-module v0.127.1 [INFO] [stderr] Checking cranelift-frontend v0.127.1 [INFO] [stderr] Checking cranelift-object v0.127.1 [INFO] [stderr] Checking mosaic-lang v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::alloc::alloc` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::alloc::alloc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ptr::null` [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::ptr::null; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cranelift_codegen::gimli` [INFO] [stdout] --> src/main.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use cranelift_codegen::gimli; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Architecture` [INFO] [stdout] --> src/main.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | use target_lexicon::{Architecture, Triple}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::cranelift::ast::flatten_ast` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::compiler::cranelift::ast::flatten_ast; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::TypeBound` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::parser::TypeBound; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `mangle_function` and `mangle_method` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:79:46 [INFO] [stdout] | [INFO] [stdout] 79 | use crate::compiler::cranelift::mangle::{mangle_function, mangle_method, mangle_type}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/cranelift/meta.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::traits::CompilationType` [INFO] [stdout] --> src/compiler/cranelift/meta.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::compiler::traits::CompilationType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `CompilationType` [INFO] [stdout] --> src/compiler/cranelift/module.rs:4:50 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::compiler::traits::{CompilationModule, CompilationType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/compiler/cranelift/module.rs:6:43 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::{BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Debug` [INFO] [stdout] --> src/compiler/cranelift/module.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::fmt::Debug; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AstNode` [INFO] [stdout] --> src/compiler/cranelift/types.rs:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::parser::{AstNode, ParseType, TypeBound}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/cranelift/types.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Indirection` [INFO] [stdout] --> src/compiler/cranelift/value.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::utils::{Indirection, OneOf}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::alloc::alloc` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::alloc::alloc; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ptr::null` [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::ptr::null; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ExtFuncData`, `ExternalName`, `FuncRef`, `GlobalValueData`, `UserExternalNameRef`, and `UserExternalName` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:37:56 [INFO] [stdout] | [INFO] [stdout] 37 | ...g, ExtFuncData, ExternalName, FuncRef, Function, GlobalValue, GlobalValueData, InstBuilder, MemFlags, Signature, StackSlot, StackSlotData, StackSlotKind, UserExternalName, UserExternalNameRef, U... [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cranelift_codegen::gimli` [INFO] [stdout] --> src/main.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use cranelift_codegen::gimli; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Init` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:42:72 [INFO] [stdout] | [INFO] [stdout] 42 | use cranelift_module::{default_libcall_names, DataDescription, FuncId, Init, Linkage, Module}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BTreeMap` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Architecture` [INFO] [stdout] --> src/main.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | use target_lexicon::{Architecture, Triple}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::indexing::FileIndexer` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | use crate::compiler::indexing::FileIndexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::cranelift::ast::flatten_ast` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::compiler::cranelift::ast::flatten_ast; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::TypeBound` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::parser::TypeBound; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `mangle_function`, `mangle_method`, and `mangle_type` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:79:46 [INFO] [stdout] | [INFO] [stdout] 79 | use crate::compiler::cranelift::mangle::{mangle_function, mangle_method, mangle_type}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::cranelift::types::CraneliftType` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | use crate::compiler::cranelift::types::CraneliftType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::utils::Indirection` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | use crate::utils::Indirection; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/cranelift/meta.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::traits::CompilationType` [INFO] [stdout] --> src/compiler/cranelift/meta.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::compiler::traits::CompilationType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `CompilationType` [INFO] [stdout] --> src/compiler/cranelift/module.rs:4:50 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::compiler::traits::{CompilationModule, CompilationType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/compiler/traits.rs:2:43 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/compiler/cranelift/module.rs:6:43 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::{BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/traits.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DowncastSync` [INFO] [stdout] --> src/compiler/traits.rs:9:44 [INFO] [stdout] | [INFO] [stdout] 9 | use downcast_rs::{impl_downcast, Downcast, DowncastSync}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ArmArchitecture` [INFO] [stdout] --> src/compiler/align.rs:10:57 [INFO] [stdout] | [INFO] [stdout] 10 | use target_lexicon::{Aarch64Architecture, Architecture, ArmArchitecture, CDataModel, Triple}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Debug` [INFO] [stdout] --> src/compiler/cranelift/module.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::fmt::Debug; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::AstNode` [INFO] [stdout] --> src/compiler/indexing.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::parser::AstNode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AstNode` [INFO] [stdout] --> src/compiler/cranelift/types.rs:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::parser::{AstNode, ParseType, TypeBound}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/cranelift/types.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Indirection` [INFO] [stdout] --> src/compiler/cranelift/value.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::utils::{Indirection, OneOf}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ExtFuncData`, `ExternalName`, `FuncRef`, `GlobalValueData`, `UserExternalNameRef`, and `UserExternalName` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:37:56 [INFO] [stdout] | [INFO] [stdout] 37 | ...g, ExtFuncData, ExternalName, FuncRef, Function, GlobalValue, GlobalValueData, InstBuilder, MemFlags, Signature, StackSlot, StackSlotData, StackSlotKind, UserExternalName, UserExternalNameRef, U... [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Init` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:42:72 [INFO] [stdout] | [INFO] [stdout] 42 | use cranelift_module::{default_libcall_names, DataDescription, FuncId, Init, Linkage, Module}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BTreeMap` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::indexing::FileIndexer` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | use crate::compiler::indexing::FileIndexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/compiler/traits.rs:2:43 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/traits.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DowncastSync` [INFO] [stdout] --> src/compiler/traits.rs:9:44 [INFO] [stdout] | [INFO] [stdout] 9 | use downcast_rs::{impl_downcast, Downcast, DowncastSync}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ArmArchitecture` [INFO] [stdout] --> src/compiler/align.rs:10:57 [INFO] [stdout] | [INFO] [stdout] 10 | use target_lexicon::{Aarch64Architecture, Architecture, ArmArchitecture, CDataModel, Triple}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `target_lexicon::Triple` [INFO] [stdout] --> src/compiler/align.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | use target_lexicon::Triple; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `alignment_of_cranelift_type_on_architecture` and `calculate_data_cranelift` [INFO] [stdout] --> src/compiler/align.rs:65:34 [INFO] [stdout] | [INFO] [stdout] 65 | use crate::compiler::align::{alignment_of_cranelift_type_on_architecture, calculate_data_cranelift}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::compiler::cranelift::types::CraneliftType` [INFO] [stdout] --> src/compiler/align.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | use crate::compiler::cranelift::types::CraneliftType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::utils::Indirection` [INFO] [stdout] --> src/compiler/align.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | use crate::utils::Indirection; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::AstNode` [INFO] [stdout] --> src/compiler/indexing.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::parser::AstNode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cranelift_codegen::entity::EntityRef` [INFO] [stdout] --> src/compiler/cranelift/builders.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use cranelift_codegen::entity::EntityRef; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler/analyser/mod.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 59 | AstNode::MemberExpr(_, r, _) => { [INFO] [stdout] | ---------------------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 62 | AstNode::MemberExpr(..) => continue, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cranelift_codegen::entity::EntityRef` [INFO] [stdout] --> src/compiler/cranelift/builders.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use cranelift_codegen::entity::EntityRef; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `file` [INFO] [stdout] --> src/compiler/cranelift/linker.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | ref file, [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `file: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target` [INFO] [stdout] --> src/compiler/cranelift/linker.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | ref target, [INFO] [stdout] | ^^^^^^^^^^ help: try ignoring the field: `target: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler/analyser/mod.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 59 | AstNode::MemberExpr(_, r, _) => { [INFO] [stdout] | ---------------------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 62 | AstNode::MemberExpr(..) => continue, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler/cranelift/mod.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | let mut obj_builder = [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `file` [INFO] [stdout] --> src/compiler/cranelift/linker.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | ref file, [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `file: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target` [INFO] [stdout] --> src/compiler/cranelift/linker.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | ref target, [INFO] [stdout] | ^^^^^^^^^^ help: try ignoring the field: `target: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ty` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:633:49 [INFO] [stdout] | [INFO] [stdout] 633 | let Some((offset, _, _, ty)) = meta.fields.iter().find(|(_, _, name, _)| name == prop) else { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ty` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler/cranelift/mod.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | let mut obj_builder = [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line_info` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:732:63 [INFO] [stdout] | [INFO] [stdout] 732 | AstNode::DataInitExpr { name, fields: raw_fields, line_info } => { [INFO] [stdout] | ^^^^^^^^^ help: try ignoring the field: `line_info: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:950:34 [INFO] [stdout] | [INFO] [stdout] 950 | ... let (f, fty) = self [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1284:28 [INFO] [stdout] | [INFO] [stdout] 1284 | (from, to) => Err(Box::new([CompilationError::InvalidCast( [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ty` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:633:49 [INFO] [stdout] | [INFO] [stdout] 633 | let Some((offset, _, _, ty)) = meta.fields.iter().find(|(_, _, name, _)| name == prop) else { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ty` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1763:39 [INFO] [stdout] | [INFO] [stdout] 1763 | AstNode::NumberLiteral(_, n) => Some(Type::Int32), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `inner` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1816:34 [INFO] [stdout] | [INFO] [stdout] 1816 | (Type::Slice(inner, len, m1, n1), Type::FatPtr(_, m2, n2)) if (m1 == m2 || (m1 && !m2)) && n1 == n2 => ty, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_inner` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `len` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1816:41 [INFO] [stdout] | [INFO] [stdout] 1816 | (Type::Slice(inner, len, m1, n1), Type::FatPtr(_, m2, n2)) if (m1 == m2 || (m1 && !m2)) && n1 == n2 => ty, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_len` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1823:22 [INFO] [stdout] | [INFO] [stdout] 1823 | (from, to) => return None, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1823:28 [INFO] [stdout] | [INFO] [stdout] 1823 | (from, to) => return None, [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line_info` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:732:63 [INFO] [stdout] | [INFO] [stdout] 732 | AstNode::DataInitExpr { name, fields: raw_fields, line_info } => { [INFO] [stdout] | ^^^^^^^^^ help: try ignoring the field: `line_info: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:950:34 [INFO] [stdout] | [INFO] [stdout] 950 | ... let (f, fty) = self [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1284:28 [INFO] [stdout] | [INFO] [stdout] 1284 | (from, to) => Err(Box::new([CompilationError::InvalidCast( [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:263:51 [INFO] [stdout] | [INFO] [stdout] 263 | CompilationError::UnknownModule(file, trace, modules) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:314:55 [INFO] [stdout] | [INFO] [stdout] 314 | CompilationError::UndefinedVariable(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:338:51 [INFO] [stdout] | [INFO] [stdout] 338 | CompilationError::UndefinedData(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:381:52 [INFO] [stdout] | [INFO] [stdout] 381 | CompilationError::DualDefinition(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:404:55 [INFO] [stdout] | [INFO] [stdout] 404 | CompilationError::UndefinedOperator(file, trace, op) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:420:50 [INFO] [stdout] | [INFO] [stdout] 420 | CompilationError::CannotMutate(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:436:57 [INFO] [stdout] | [INFO] [stdout] 436 | CompilationError::MismatchedTypeInDef(file, trace, name, expected, got) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:482:49 [INFO] [stdout] | [INFO] [stdout] 482 | CompilationError::InvalidCast(file, trace, from, to) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:501:55 [INFO] [stdout] | [INFO] [stdout] 501 | CompilationError::CannotMakePointer(file, trace, to) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:529:46 [INFO] [stdout] | [INFO] [stdout] 529 | CompilationError::NotFreed(file, trace, item) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1763:39 [INFO] [stdout] | [INFO] [stdout] 1763 | AstNode::NumberLiteral(_, n) => Some(Type::Int32), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `inner` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1816:34 [INFO] [stdout] | [INFO] [stdout] 1816 | (Type::Slice(inner, len, m1, n1), Type::FatPtr(_, m2, n2)) if (m1 == m2 || (m1 && !m2)) && n1 == n2 => ty, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_inner` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `len` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1816:41 [INFO] [stdout] | [INFO] [stdout] 1816 | (Type::Slice(inner, len, m1, n1), Type::FatPtr(_, m2, n2)) if (m1 == m2 || (m1 && !m2)) && n1 == n2 => ty, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_len` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1823:22 [INFO] [stdout] | [INFO] [stdout] 1823 | (from, to) => return None, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1823:28 [INFO] [stdout] | [INFO] [stdout] 1823 | (from, to) => return None, [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser.rs:599:27 [INFO] [stdout] | [INFO] [stdout] 599 | pub fn parse_complete(mut self) -> Result> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/parser.rs:920:30 [INFO] [stdout] | [INFO] [stdout] 920 | Some(Err(e)) => match self.parse_type() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/parser.rs:940:26 [INFO] [stdout] | [INFO] [stdout] 940 | Some(Err(e)) => match self.parse_type() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:263:51 [INFO] [stdout] | [INFO] [stdout] 263 | CompilationError::UnknownModule(file, trace, modules) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:314:55 [INFO] [stdout] | [INFO] [stdout] 314 | CompilationError::UndefinedVariable(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:338:51 [INFO] [stdout] | [INFO] [stdout] 338 | CompilationError::UndefinedData(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:381:52 [INFO] [stdout] | [INFO] [stdout] 381 | CompilationError::DualDefinition(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:404:55 [INFO] [stdout] | [INFO] [stdout] 404 | CompilationError::UndefinedOperator(file, trace, op) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:420:50 [INFO] [stdout] | [INFO] [stdout] 420 | CompilationError::CannotMutate(file, trace, name) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:436:57 [INFO] [stdout] | [INFO] [stdout] 436 | CompilationError::MismatchedTypeInDef(file, trace, name, expected, got) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:482:49 [INFO] [stdout] | [INFO] [stdout] 482 | CompilationError::InvalidCast(file, trace, from, to) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:501:55 [INFO] [stdout] | [INFO] [stdout] 501 | CompilationError::CannotMakePointer(file, trace, to) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trace` [INFO] [stdout] --> src/errors.rs:529:46 [INFO] [stdout] | [INFO] [stdout] 529 | CompilationError::NotFreed(file, trace, item) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_trace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser.rs:599:27 [INFO] [stdout] | [INFO] [stdout] 599 | pub fn parse_complete(mut self) -> Result> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_calls_of_func` is never used [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1836:8 [INFO] [stdout] | [INFO] [stdout] 173 | impl CraneliftGenerator { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1836 | fn get_calls_of_func( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `owner` is never read [INFO] [stdout] --> src/compiler/cranelift/value.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct OwnershipTrace { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 7 | /// Stores the name of the variable that owns the value, if any [INFO] [stdout] 8 | owner: OneOf, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `modifiers_of` is never used [INFO] [stdout] --> src/parser.rs:2802:4 [INFO] [stdout] | [INFO] [stdout] 2802 | fn modifiers_of(def: &ParsedFunctionDeclaration) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generics_of` is never used [INFO] [stdout] --> src/parser.rs:2806:4 [INFO] [stdout] | [INFO] [stdout] 2806 | fn generics_of(def: &ParsedFunctionDeclaration) -> &HashMap> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `argument_types_of` is never used [INFO] [stdout] --> src/parser.rs:2810:4 [INFO] [stdout] | [INFO] [stdout] 2810 | fn argument_types_of(def: &ParsedFunctionDeclaration) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_type_of` is never used [INFO] [stdout] --> src/parser.rs:2814:4 [INFO] [stdout] | [INFO] [stdout] 2814 | fn return_type_of(def: &ParsedFunctionDeclaration) -> &ParseType { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/parser.rs:920:30 [INFO] [stdout] | [INFO] [stdout] 920 | Some(Err(e)) => match self.parse_type() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/parser.rs:940:26 [INFO] [stdout] | [INFO] [stdout] 940 | Some(Err(e)) => match self.parse_type() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/analyser/mod.rs:148:53 [INFO] [stdout] | [INFO] [stdout] 148 | usages.extend(get_usages_of(symbol, &*arms.iter().map(|a| { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 149 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 | | [INFO] [stdout] 151 | | (&*code).clone() [INFO] [stdout] 152 | | }).flatten().collect::>())); [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ usages.extend(get_usages_of(symbol, &arms.iter().map(|a| { [INFO] [stdout] 149 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 + [INFO] [stdout] 151 + (&*code).clone() [INFO] [stdout] 152 ~ }).flatten().collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/analyser/mod.rs:148:67 [INFO] [stdout] | [INFO] [stdout] 148 | usages.extend(get_usages_of(symbol, &*arms.iter().map(|a| { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 149 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 | | [INFO] [stdout] 151 | | (&*code).clone() [INFO] [stdout] 152 | | }).flatten().collect::>())); [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 148 ~ usages.extend(get_usages_of(symbol, &*arms.iter().flat_map(|a| { [INFO] [stdout] 149 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 + [INFO] [stdout] 151 + (&*code).clone() [INFO] [stdout] 152 ~ }).collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/analyser/mod.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | (&*code).clone() [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] 151 - (&*code).clone() [INFO] [stdout] 151 + code.clone() [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 151 - (&*code).clone() [INFO] [stdout] 151 + &**code.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/compiler/analyser/mod.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | (&*code).clone() [INFO] [stdout] | ^^^^^^^^ help: change this to: `(*code)` [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/compiler/analyser/mod.rs:163:53 [INFO] [stdout] | [INFO] [stdout] 163 | usages.extend(get_usages_of(symbol, &*else_code)); [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] 163 - usages.extend(get_usages_of(symbol, &*else_code)); [INFO] [stdout] 163 + usages.extend(get_usages_of(symbol, else_code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 163 | usages.extend(get_usages_of(symbol, &**else_code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/analyser/mod.rs:178:53 [INFO] [stdout] | [INFO] [stdout] 178 | usages.extend(get_usages_of(symbol, &*fields.iter().map(|(_, v, )| v.as_ref().clone()).collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&fields.iter().map(|(_, v, )| v.as_ref().clone()).collect::>()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/analyser/mod.rs:192:53 [INFO] [stdout] | [INFO] [stdout] 192 | usages.extend(get_usages_of(symbol, &*code)); [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] 192 - usages.extend(get_usages_of(symbol, &*code)); [INFO] [stdout] 192 + usages.extend(get_usages_of(symbol, code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 192 | usages.extend(get_usages_of(symbol, &**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/analyser/mod.rs:196:99 [INFO] [stdout] | [INFO] [stdout] 196 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, &*code)), [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] 196 - AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, &*code)), [INFO] [stdout] 196 + AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, code)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 196 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, &**code)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:81:27 [INFO] [stdout] | [INFO] [stdout] 81 | let Some(scope) = self [INFO] [stdout] | ___________________________^ [INFO] [stdout] 82 | | .scopes [INFO] [stdout] 83 | | .iter() [INFO] [stdout] 84 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 85 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 85 - .last() [INFO] [stdout] 85 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/builders.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | / self.scopes [INFO] [stdout] 133 | | .iter() [INFO] [stdout] 134 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 135 | | .collect::>() [INFO] [stdout] 136 | | .len() [INFO] [stdout] 137 | | > 0 [INFO] [stdout] | |_______________^ [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] help: using `!is_empty` is clearer and more explicit [INFO] [stdout] | [INFO] [stdout] 132 ~ !self.scopes [INFO] [stdout] 133 + .iter() [INFO] [stdout] 134 + .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 135 + .collect::>().is_empty() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:144:21 [INFO] [stdout] | [INFO] [stdout] 144 | let scope = self [INFO] [stdout] | _____________________^ [INFO] [stdout] 145 | | .scopes [INFO] [stdout] 146 | | .iter() [INFO] [stdout] 147 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 148 | | .last()?; [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 - .last()?; [INFO] [stdout] 148 + .next_back()?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:162:27 [INFO] [stdout] | [INFO] [stdout] 162 | let Some(scope) = self [INFO] [stdout] | ___________________________^ [INFO] [stdout] 163 | | .scopes [INFO] [stdout] 164 | | .iter() [INFO] [stdout] 165 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 166 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 166 - .last() [INFO] [stdout] 166 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:203:27 [INFO] [stdout] | [INFO] [stdout] 203 | let Some(scope) = self [INFO] [stdout] | ___________________________^ [INFO] [stdout] 204 | | .scopes [INFO] [stdout] 205 | | .iter() [INFO] [stdout] 206 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 207 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 207 - .last() [INFO] [stdout] 207 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/compiler/cranelift/linker.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | / if triple.operating_system.is_like_darwin() { [INFO] [stdout] 53 | | return Err("Linking static binaries on Darwin or Darwin-like OSes is not possible.".into()) [INFO] [stdout] 54 | | } [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] 51 ~ EmitKind::StaticBinary [INFO] [stdout] 52 ~ if triple.operating_system.is_like_darwin() => { [INFO] [stdout] 53 | return Err("Linking static binaries on Darwin or Darwin-like OSes is not possible.".into()) [INFO] [stdout] 54 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:9:42 [INFO] [stdout] | [INFO] [stdout] 9 | CraneliftType::Declared(_, t) => format!("{}", mangle_type(t.deref())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `mangle_type(t.deref()).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: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | if arg_types.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!arg_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/compiler/cranelift/mangle.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | .map(|a| mangle_type(a)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `mangle_type` [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: method `get_calls_of_func` is never used [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1836:8 [INFO] [stdout] | [INFO] [stdout] 173 | impl CraneliftGenerator { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1836 | fn get_calls_of_func( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `owner` is never read [INFO] [stdout] --> src/compiler/cranelift/value.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct OwnershipTrace { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 7 | /// Stores the name of the variable that owns the value, if any [INFO] [stdout] 8 | owner: OneOf, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `modifiers_of` is never used [INFO] [stdout] --> src/parser.rs:2802:4 [INFO] [stdout] | [INFO] [stdout] 2802 | fn modifiers_of(def: &ParsedFunctionDeclaration) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generics_of` is never used [INFO] [stdout] --> src/parser.rs:2806:4 [INFO] [stdout] | [INFO] [stdout] 2806 | fn generics_of(def: &ParsedFunctionDeclaration) -> &HashMap> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `argument_types_of` is never used [INFO] [stdout] --> src/parser.rs:2810:4 [INFO] [stdout] | [INFO] [stdout] 2810 | fn argument_types_of(def: &ParsedFunctionDeclaration) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_type_of` is never used [INFO] [stdout] --> src/parser.rs:2814:4 [INFO] [stdout] | [INFO] [stdout] 2814 | fn return_type_of(def: &ParsedFunctionDeclaration) -> &ParseType { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/compiler/cranelift/module.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | / impl PartialOrd for CraneliftModule { [INFO] [stdout] 46 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 47 | | self.name.partial_cmp(&other.name) [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 47 - self.name.partial_cmp(&other.name) [INFO] [stdout] 48 - } [INFO] [stdout] 46 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/compiler/cranelift/module.rs:63:81 [INFO] [stdout] | [INFO] [stdout] 63 | Some(self.function_variants.get(name)?.iter().map(|(a, b)| (a.clone(), b.iter().cloned().collect::>())).collect()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/analyser/mod.rs:148:53 [INFO] [stdout] | [INFO] [stdout] 148 | usages.extend(get_usages_of(symbol, &*arms.iter().map(|a| { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 149 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 | | [INFO] [stdout] 151 | | (&*code).clone() [INFO] [stdout] 152 | | }).flatten().collect::>())); [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ usages.extend(get_usages_of(symbol, &arms.iter().map(|a| { [INFO] [stdout] 149 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 + [INFO] [stdout] 151 + (&*code).clone() [INFO] [stdout] 152 ~ }).flatten().collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/analyser/mod.rs:148:67 [INFO] [stdout] | [INFO] [stdout] 148 | usages.extend(get_usages_of(symbol, &*arms.iter().map(|a| { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 149 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 | | [INFO] [stdout] 151 | | (&*code).clone() [INFO] [stdout] 152 | | }).flatten().collect::>())); [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 148 ~ usages.extend(get_usages_of(symbol, &*arms.iter().flat_map(|a| { [INFO] [stdout] 149 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 150 + [INFO] [stdout] 151 + (&*code).clone() [INFO] [stdout] 152 ~ }).collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/analyser/mod.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | (&*code).clone() [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] 151 - (&*code).clone() [INFO] [stdout] 151 + code.clone() [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 151 - (&*code).clone() [INFO] [stdout] 151 + &**code.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/compiler/analyser/mod.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | (&*code).clone() [INFO] [stdout] | ^^^^^^^^ help: change this to: `(*code)` [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/compiler/analyser/mod.rs:163:53 [INFO] [stdout] | [INFO] [stdout] 163 | usages.extend(get_usages_of(symbol, &*else_code)); [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] 163 - usages.extend(get_usages_of(symbol, &*else_code)); [INFO] [stdout] 163 + usages.extend(get_usages_of(symbol, else_code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 163 | usages.extend(get_usages_of(symbol, &**else_code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/analyser/mod.rs:178:53 [INFO] [stdout] | [INFO] [stdout] 178 | usages.extend(get_usages_of(symbol, &*fields.iter().map(|(_, v, )| v.as_ref().clone()).collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&fields.iter().map(|(_, v, )| v.as_ref().clone()).collect::>()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/analyser/mod.rs:192:53 [INFO] [stdout] | [INFO] [stdout] 192 | usages.extend(get_usages_of(symbol, &*code)); [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] 192 - usages.extend(get_usages_of(symbol, &*code)); [INFO] [stdout] 192 + usages.extend(get_usages_of(symbol, code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 192 | usages.extend(get_usages_of(symbol, &**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/analyser/mod.rs:196:99 [INFO] [stdout] | [INFO] [stdout] 196 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, &*code)), [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] 196 - AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, &*code)), [INFO] [stdout] 196 + AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, code)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 196 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => usages.extend(get_usages_of(symbol, &**code)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/compiler/cranelift/types.rs:345:14 [INFO] [stdout] | [INFO] [stdout] 345 | .expect(&*format!("Unknown type '{name}'")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("{}", *format!("Unknown type '{name}'")))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/types.rs:345:21 [INFO] [stdout] | [INFO] [stdout] 345 | .expect(&*format!("Unknown type '{name}'")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("Unknown type '{name}'")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:81:27 [INFO] [stdout] | [INFO] [stdout] 81 | let Some(scope) = self [INFO] [stdout] | ___________________________^ [INFO] [stdout] 82 | | .scopes [INFO] [stdout] 83 | | .iter() [INFO] [stdout] 84 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 85 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 85 - .last() [INFO] [stdout] 85 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/compiler/cranelift/types.rs:369:18 [INFO] [stdout] | [INFO] [stdout] 369 | .expect(&*format!("Unknown type '{i}' (in {:?})", self.types.keys())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("{}", *format!("Unknown type '{i}' (in {:?})", self.types.keys())))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/types.rs:369:25 [INFO] [stdout] | [INFO] [stdout] 369 | .expect(&*format!("Unknown type '{i}' (in {:?})", self.types.keys())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("Unknown type '{i}' (in {:?})", self.types.keys())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/types.rs:376:81 [INFO] [stdout] | [INFO] [stdout] 376 | CraneliftType::CPtr(points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), *is_mutable, *is_nullable) [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/types.rs:384:48 [INFO] [stdout] | [INFO] [stdout] 384 | .map(|t| self.compile_type(&t, isa, &HashMap::default())), [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/types.rs:394:61 [INFO] [stdout] | [INFO] [stdout] 394 | points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/builders.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | / self.scopes [INFO] [stdout] 133 | | .iter() [INFO] [stdout] 134 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 135 | | .collect::>() [INFO] [stdout] 136 | | .len() [INFO] [stdout] 137 | | > 0 [INFO] [stdout] | |_______________^ [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] help: using `!is_empty` is clearer and more explicit [INFO] [stdout] | [INFO] [stdout] 132 ~ !self.scopes [INFO] [stdout] 133 + .iter() [INFO] [stdout] 134 + .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 135 + .collect::>().is_empty() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/compiler/cranelift/types.rs:356:9 [INFO] [stdout] | [INFO] [stdout] 356 | isa: &OwnedTargetIsa, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_isa` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/compiler/cranelift/types.rs:376:85 [INFO] [stdout] | [INFO] [stdout] 376 | CraneliftType::CPtr(points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), *is_mutable, *is_nullable) [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 384 | .map(|t| self.compile_type(&t, isa, &HashMap::default())), [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 394 | points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 402 | .map(|t| self.compile_type(t, isa, tgs)) [INFO] [stdout] | ^^^ [INFO] [stdout] 403 | .collect::>(); [INFO] [stdout] 404 | let ret = self.compile_type(ret, isa, tgs); [INFO] [stdout] | ^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:144:21 [INFO] [stdout] | [INFO] [stdout] 144 | let scope = self [INFO] [stdout] | _____________________^ [INFO] [stdout] 145 | | .scopes [INFO] [stdout] 146 | | .iter() [INFO] [stdout] 147 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 148 | | .last()?; [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 - .last()?; [INFO] [stdout] 148 + .next_back()?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:162:27 [INFO] [stdout] | [INFO] [stdout] 162 | let Some(scope) = self [INFO] [stdout] | ___________________________^ [INFO] [stdout] 163 | | .scopes [INFO] [stdout] 164 | | .iter() [INFO] [stdout] 165 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 166 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 166 - .last() [INFO] [stdout] 166 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/compiler/cranelift/builders.rs:203:27 [INFO] [stdout] | [INFO] [stdout] 203 | let Some(scope) = self [INFO] [stdout] | ___________________________^ [INFO] [stdout] 204 | | .scopes [INFO] [stdout] 205 | | .iter() [INFO] [stdout] 206 | | .filter(|vars| vars.contains_key(name)) [INFO] [stdout] 207 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 207 - .last() [INFO] [stdout] 207 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:17:46 [INFO] [stdout] | [INFO] [stdout] 17 | flattened.extend(flatten_ast(&*code)); [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] 17 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 17 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 17 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:18:46 [INFO] [stdout] | [INFO] [stdout] 18 | flattened.extend(flatten_ast(&*else_code)); [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] 18 - flattened.extend(flatten_ast(&*else_code)); [INFO] [stdout] 18 + flattened.extend(flatten_ast(else_code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 18 | flattened.extend(flatten_ast(&**else_code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/ast.rs:27:46 [INFO] [stdout] | [INFO] [stdout] 27 | flattened.extend(flatten_ast(&*arms.iter().map(|a| { [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 28 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 | | [INFO] [stdout] 30 | | flatten_ast(&*code) [INFO] [stdout] 31 | | }).flatten().collect::>())); [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ flattened.extend(flatten_ast(&arms.iter().map(|a| { [INFO] [stdout] 28 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 + [INFO] [stdout] 30 + flatten_ast(&*code) [INFO] [stdout] 31 ~ }).flatten().collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/cranelift/ast.rs:27:60 [INFO] [stdout] | [INFO] [stdout] 27 | flattened.extend(flatten_ast(&*arms.iter().map(|a| { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 28 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 | | [INFO] [stdout] 30 | | flatten_ast(&*code) [INFO] [stdout] 31 | | }).flatten().collect::>())); [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 27 ~ flattened.extend(flatten_ast(&*arms.iter().flat_map(|a| { [INFO] [stdout] 28 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 + [INFO] [stdout] 30 + flatten_ast(&*code) [INFO] [stdout] 31 ~ }).collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:30:33 [INFO] [stdout] | [INFO] [stdout] 30 | flatten_ast(&*code) [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] 30 - flatten_ast(&*code) [INFO] [stdout] 30 + flatten_ast(code) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 30 | flatten_ast(&**code) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:42:46 [INFO] [stdout] | [INFO] [stdout] 42 | flattened.extend(flatten_ast(&*else_code)); [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] 42 - flattened.extend(flatten_ast(&*else_code)); [INFO] [stdout] 42 + flattened.extend(flatten_ast(else_code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 42 | flattened.extend(flatten_ast(&**else_code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:50:73 [INFO] [stdout] | [INFO] [stdout] 50 | AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(&*a)), [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] 50 - AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(&*a)), [INFO] [stdout] 50 + AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(a)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 50 | AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(&**a)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:57:46 [INFO] [stdout] | [INFO] [stdout] 57 | flattened.extend(flatten_ast(&*args)); [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] 57 - flattened.extend(flatten_ast(&*args)); [INFO] [stdout] 57 + flattened.extend(flatten_ast(args)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 57 | flattened.extend(flatten_ast(&**args)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/ast.rs:66:46 [INFO] [stdout] | [INFO] [stdout] 66 | ...(flatten_ast(&*fields.iter().map(|(_, v, )| flatten_ast(&[v.as_ref().clone()])).flatten().collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&fields.iter().map(|(_, v, )| flatten_ast(&[v.as_ref().clone()])).flatten().collect::>()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/cranelift/ast.rs:66:62 [INFO] [stdout] | [INFO] [stdout] 66 | ...latten_ast(&*fields.iter().map(|(_, v, )| flatten_ast(&[v.as_ref().clone()])).flatten().collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(_, v, )| flatten_ast(&[v.as_ref().clone()]))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/compiler/cranelift/linker.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | / if triple.operating_system.is_like_darwin() { [INFO] [stdout] 53 | | return Err("Linking static binaries on Darwin or Darwin-like OSes is not possible.".into()) [INFO] [stdout] 54 | | } [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] 51 ~ EmitKind::StaticBinary [INFO] [stdout] 52 ~ if triple.operating_system.is_like_darwin() => { [INFO] [stdout] 53 | return Err("Linking static binaries on Darwin or Darwin-like OSes is not possible.".into()) [INFO] [stdout] 54 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:94:46 [INFO] [stdout] | [INFO] [stdout] 94 | flattened.extend(flatten_ast(&*code)); [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] 94 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 94 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 94 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:105:46 [INFO] [stdout] | [INFO] [stdout] 105 | flattened.extend(flatten_ast(&*code)); [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] 105 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 105 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 105 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:118:47 [INFO] [stdout] | [INFO] [stdout] 118 | } => flattened.extend(flatten_ast(&*code)), [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] 118 - } => flattened.extend(flatten_ast(&*code)), [INFO] [stdout] 118 + } => flattened.extend(flatten_ast(code)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 118 | } => flattened.extend(flatten_ast(&**code)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:125:46 [INFO] [stdout] | [INFO] [stdout] 125 | flattened.extend(flatten_ast(&*code)); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 125 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 125 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 125 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:134:46 [INFO] [stdout] | [INFO] [stdout] 134 | flattened.extend(flatten_ast(&*code)); [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] 134 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 134 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 134 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:138:92 [INFO] [stdout] | [INFO] [stdout] 138 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(&*code)), [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] 138 - AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(&*code)), [INFO] [stdout] 138 + AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(code)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 138 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(&**code)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:9:42 [INFO] [stdout] | [INFO] [stdout] 9 | CraneliftType::Declared(_, t) => format!("{}", mangle_type(t.deref())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `mangle_type(t.deref()).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: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/mangle.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | if arg_types.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!arg_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/compiler/cranelift/mangle.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | .map(|a| mangle_type(a)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `mangle_type` [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: the method `compile_body_expr` doesn't need a mutable reference [INFO] [stdout] --> src/compiler/cranelift/mod.rs:276:29 [INFO] [stdout] | [INFO] [stdout] 276 | ... &mut trace.nested_ctx(ContextKind::Idx), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 276 - &mut trace.nested_ctx(ContextKind::Idx), [INFO] [stdout] 276 + &trace.nested_ctx(ContextKind::Idx), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/compiler/cranelift/module.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | / impl PartialOrd for CraneliftModule { [INFO] [stdout] 46 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 47 | | self.name.partial_cmp(&other.name) [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 47 - self.name.partial_cmp(&other.name) [INFO] [stdout] 48 - } [INFO] [stdout] 46 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/compiler/cranelift/module.rs:63:81 [INFO] [stdout] | [INFO] [stdout] 63 | Some(self.function_variants.get(name)?.iter().map(|(a, b)| (a.clone(), b.iter().cloned().collect::>())).collect()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:754:40 [INFO] [stdout] | [INFO] [stdout] 754 | if !vty.cmp_eq(&ty) { [INFO] [stdout] | ^^^ help: change this to: `ty` [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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:758:48 [INFO] [stdout] | [INFO] [stdout] 758 | func.ins().stack_store(value.clone(), slot, offset.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*value` [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 `u16` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:758:69 [INFO] [stdout] | [INFO] [stdout] 758 | func.ins().stack_store(value.clone(), slot, offset.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*offset` [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: function call inside of `expect` [INFO] [stdout] --> src/compiler/cranelift/types.rs:345:14 [INFO] [stdout] | [INFO] [stdout] 345 | .expect(&*format!("Unknown type '{name}'")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("{}", *format!("Unknown type '{name}'")))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/types.rs:345:21 [INFO] [stdout] | [INFO] [stdout] 345 | .expect(&*format!("Unknown type '{name}'")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("Unknown type '{name}'")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:896:74 [INFO] [stdout] | [INFO] [stdout] 896 | ... let mangled_name = mangle_function(name, &*arg_types, ret_type); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&arg_types` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/compiler/cranelift/types.rs:369:18 [INFO] [stdout] | [INFO] [stdout] 369 | .expect(&*format!("Unknown type '{i}' (in {:?})", self.types.keys())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("{}", *format!("Unknown type '{i}' (in {:?})", self.types.keys())))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/types.rs:369:25 [INFO] [stdout] | [INFO] [stdout] 369 | .expect(&*format!("Unknown type '{i}' (in {:?})", self.types.keys())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("Unknown type '{i}' (in {:?})", self.types.keys())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/types.rs:376:81 [INFO] [stdout] | [INFO] [stdout] 376 | CraneliftType::CPtr(points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), *is_mutable, *is_nullable) [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/types.rs:384:48 [INFO] [stdout] | [INFO] [stdout] 384 | .map(|t| self.compile_type(&t, isa, &HashMap::default())), [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/types.rs:394:61 [INFO] [stdout] | [INFO] [stdout] 394 | points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), [INFO] [stdout] | ^^ help: change this to: `t` [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: iterating on a map's keys [INFO] [stdout] --> src/compiler/cranelift/mod.rs:899:79 [INFO] [stdout] | [INFO] [stdout] 899 | ... eprintln!("SIGNATURES of {name} -> {:?}", self.functions.iter().map(|(n, _)| n).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.functions.keys()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/compiler/cranelift/mod.rs:918:43 [INFO] [stdout] | [INFO] [stdout] 918 | ... let ret = func [INFO] [stdout] | _________________________________^ [INFO] [stdout] 919 | | ... .inst_results(ret) [INFO] [stdout] 920 | | ... .first() [INFO] [stdout] 921 | | ... .map(|v| v.clone()) [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 918 ~ let ret = func [INFO] [stdout] 919 + .inst_results(ret) [INFO] [stdout] 920 + .first().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:921:46 [INFO] [stdout] | [INFO] [stdout] 921 | ... .map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [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/compiler/cranelift/mod.rs:925:40 [INFO] [stdout] | [INFO] [stdout] 925 | ... if self.auto_frees.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.auto_frees.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: parameter is only used in recursion [INFO] [stdout] --> src/compiler/cranelift/types.rs:356:9 [INFO] [stdout] | [INFO] [stdout] 356 | isa: &OwnedTargetIsa, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_isa` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/compiler/cranelift/types.rs:376:85 [INFO] [stdout] | [INFO] [stdout] 376 | CraneliftType::CPtr(points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), *is_mutable, *is_nullable) [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 384 | .map(|t| self.compile_type(&t, isa, &HashMap::default())), [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 394 | points_to.clone().map(|t| self.compile_type(&t, isa, tgs)), [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 402 | .map(|t| self.compile_type(t, isa, tgs)) [INFO] [stdout] | ^^^ [INFO] [stdout] 403 | .collect::>(); [INFO] [stdout] 404 | let ret = self.compile_type(ret, isa, tgs); [INFO] [stdout] | ^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:929:80 [INFO] [stdout] | [INFO] [stdout] 929 | ... self.auto_frees.last_mut().unwrap().insert(ret.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `ret` [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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:932:50 [INFO] [stdout] | [INFO] [stdout] 932 | ... .insert((ret.clone(), mangled_name.clone()).into()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `ret` [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/compiler/cranelift/mod.rs:935:36 [INFO] [stdout] | [INFO] [stdout] 935 | ... if value_args.len() != 0 && fn_meta.modifiers.contains(&Modifier::Dealloc) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value_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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:937:58 [INFO] [stdout] | [INFO] [stdout] 937 | ... if item.value != ret.clone() { [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `ret` [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 are using an explicit closure for copying elements [INFO] [stdout] --> src/compiler/cranelift/mod.rs:999:39 [INFO] [stdout] | [INFO] [stdout] 999 | ... let ret = func [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1000 | | ... .inst_results(ret) [INFO] [stdout] 1001 | | ... .first() [INFO] [stdout] 1002 | | ... .map(|v| v.clone()) [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 999 ~ let ret = func [INFO] [stdout] 1000 + .inst_results(ret) [INFO] [stdout] 1001 + .first().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1002:42 [INFO] [stdout] | [INFO] [stdout] 1002 | ... .map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [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/compiler/cranelift/ast.rs:17:46 [INFO] [stdout] | [INFO] [stdout] 17 | flattened.extend(flatten_ast(&*code)); [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] 17 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 17 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 17 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:18:46 [INFO] [stdout] | [INFO] [stdout] 18 | flattened.extend(flatten_ast(&*else_code)); [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] 18 - flattened.extend(flatten_ast(&*else_code)); [INFO] [stdout] 18 + flattened.extend(flatten_ast(else_code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 18 | flattened.extend(flatten_ast(&**else_code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/ast.rs:27:46 [INFO] [stdout] | [INFO] [stdout] 27 | flattened.extend(flatten_ast(&*arms.iter().map(|a| { [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 28 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 | | [INFO] [stdout] 30 | | flatten_ast(&*code) [INFO] [stdout] 31 | | }).flatten().collect::>())); [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ flattened.extend(flatten_ast(&arms.iter().map(|a| { [INFO] [stdout] 28 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 + [INFO] [stdout] 30 + flatten_ast(&*code) [INFO] [stdout] 31 ~ }).flatten().collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/cranelift/ast.rs:27:60 [INFO] [stdout] | [INFO] [stdout] 27 | flattened.extend(flatten_ast(&*arms.iter().map(|a| { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 28 | | let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 | | [INFO] [stdout] 30 | | flatten_ast(&*code) [INFO] [stdout] 31 | | }).flatten().collect::>())); [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 27 ~ flattened.extend(flatten_ast(&*arms.iter().flat_map(|a| { [INFO] [stdout] 28 + let ParseBlock::Plain(ref code) = a.code; [INFO] [stdout] 29 + [INFO] [stdout] 30 + flatten_ast(&*code) [INFO] [stdout] 31 ~ }).collect::>())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:30:33 [INFO] [stdout] | [INFO] [stdout] 30 | flatten_ast(&*code) [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] 30 - flatten_ast(&*code) [INFO] [stdout] 30 + flatten_ast(code) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 30 | flatten_ast(&**code) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:42:46 [INFO] [stdout] | [INFO] [stdout] 42 | flattened.extend(flatten_ast(&*else_code)); [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] 42 - flattened.extend(flatten_ast(&*else_code)); [INFO] [stdout] 42 + flattened.extend(flatten_ast(else_code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 42 | flattened.extend(flatten_ast(&**else_code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:50:73 [INFO] [stdout] | [INFO] [stdout] 50 | AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(&*a)), [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] 50 - AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(&*a)), [INFO] [stdout] 50 + AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(a)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 50 | AstNode::ArrayLiteral(_, a) => flattened.extend(flatten_ast(&**a)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:57:46 [INFO] [stdout] | [INFO] [stdout] 57 | flattened.extend(flatten_ast(&*args)); [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] 57 - flattened.extend(flatten_ast(&*args)); [INFO] [stdout] 57 + flattened.extend(flatten_ast(args)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 57 | flattened.extend(flatten_ast(&**args)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/ast.rs:66:46 [INFO] [stdout] | [INFO] [stdout] 66 | ...(flatten_ast(&*fields.iter().map(|(_, v, )| flatten_ast(&[v.as_ref().clone()])).flatten().collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&fields.iter().map(|(_, v, )| flatten_ast(&[v.as_ref().clone()])).flatten().collect::>()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/cranelift/ast.rs:66:62 [INFO] [stdout] | [INFO] [stdout] 66 | ...latten_ast(&*fields.iter().map(|(_, v, )| flatten_ast(&[v.as_ref().clone()])).flatten().collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(_, v, )| flatten_ast(&[v.as_ref().clone()]))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1080:79 [INFO] [stdout] | [INFO] [stdout] 1080 | ... println!("(mangled = {mangled_name}) fns = {:?}", self.functions.iter().map(|(n, _)| n).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.functions.keys()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1099:35 [INFO] [stdout] | [INFO] [stdout] 1099 | let ret = func [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 1100 | | .inst_results(ret) [INFO] [stdout] 1101 | | .first() [INFO] [stdout] 1102 | | .map(|v| v.clone()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 1099 ~ let ret = func [INFO] [stdout] 1100 + .inst_results(ret) [INFO] [stdout] 1101 + .first().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:94:46 [INFO] [stdout] | [INFO] [stdout] 94 | flattened.extend(flatten_ast(&*code)); [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] 94 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 94 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 94 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1102:38 [INFO] [stdout] | [INFO] [stdout] 1102 | ... .map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [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/compiler/cranelift/ast.rs:105:46 [INFO] [stdout] | [INFO] [stdout] 105 | flattened.extend(flatten_ast(&*code)); [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] 105 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 105 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 105 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:118:47 [INFO] [stdout] | [INFO] [stdout] 118 | } => flattened.extend(flatten_ast(&*code)), [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] 118 - } => flattened.extend(flatten_ast(&*code)), [INFO] [stdout] 118 + } => flattened.extend(flatten_ast(code)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 118 | } => flattened.extend(flatten_ast(&**code)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:125:46 [INFO] [stdout] | [INFO] [stdout] 125 | flattened.extend(flatten_ast(&*code)); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 125 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 125 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 125 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:134:46 [INFO] [stdout] | [INFO] [stdout] 134 | flattened.extend(flatten_ast(&*code)); [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] 134 - flattened.extend(flatten_ast(&*code)); [INFO] [stdout] 134 + flattened.extend(flatten_ast(code)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 134 | flattened.extend(flatten_ast(&**code)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/compiler/cranelift/ast.rs:138:92 [INFO] [stdout] | [INFO] [stdout] 138 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(&*code)), [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] 138 - AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(&*code)), [INFO] [stdout] 138 + AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(code)), [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 138 | AstNode::DeferStmt(_, ParseBlock::Plain(code)) => flattened.extend(flatten_ast(&**code)), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1199:68 [INFO] [stdout] | [INFO] [stdout] 1199 | let (val, vty) = self.compile_body_expr(val, func, &trace)?; [INFO] [stdout] | ^^^^^^ help: change this to: `trace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1343:16 [INFO] [stdout] | [INFO] [stdout] 1343 | r#for: &String, [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] 1343 ~ r#for: &str, [INFO] [stdout] 1344 | r#in: &AstNode, [INFO] [stdout] ... [INFO] [stdout] 1396 | [INFO] [stdout] 1397 ~ self.var_builder.create_var(func, current, inner.clone(), r#for.to_owned(), true); [INFO] [stdout] 1398 | [INFO] [stdout] ... [INFO] [stdout] 1421 | [INFO] [stdout] 1422 ~ self.var_builder.create_var(func, current, inner.clone(), r#for.to_owned(), true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `compile_body_expr` doesn't need a mutable reference [INFO] [stdout] --> src/compiler/cranelift/mod.rs:276:29 [INFO] [stdout] | [INFO] [stdout] 276 | ... &mut trace.nested_ctx(ContextKind::Idx), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 276 - &mut trace.nested_ctx(ContextKind::Idx), [INFO] [stdout] 276 + &trace.nested_ctx(ContextKind::Idx), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1446:10 [INFO] [stdout] | [INFO] [stdout] 1446 | ) -> Result<(Option<(Value, Type)>, bool), Box<[CompilationError]>> { [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: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1594:12 [INFO] [stdout] | [INFO] [stdout] 1594 | if errors.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.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/compiler/cranelift/mod.rs:1608:10 [INFO] [stdout] | [INFO] [stdout] 1608 | ) -> Result<(Option<(Value, Type)>, bool), Box<[CompilationError]>> { [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: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1618:43 [INFO] [stdout] | [INFO] [stdout] 1618 | stmt => self.compile_body(&[stmt.clone()], func, trace)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(stmt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` 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/compiler/cranelift/mod.rs:1633:15 [INFO] [stdout] | [INFO] [stdout] 1633 | args: &Box<[(String, ParseType, Option)]>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&[(String, ParseType, Option)]` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1635:52 [INFO] [stdout] | [INFO] [stdout] 1635 | let ret_type = self.tg.compile_type_no_tgs(&ret_type, &self.isa); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `ret_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1663:55 [INFO] [stdout] | [INFO] [stdout] 1663 | variants.push((ret_type.clone(), arg_types.iter().cloned().collect::>())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1666:72 [INFO] [stdout] | [INFO] [stdout] 1666 | .insert(name.clone(), vec![(ret_type.clone(), arg_types.iter().cloned().collect::>())]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1707:36 [INFO] [stdout] | [INFO] [stdout] 1707 | func.ins().stack_store(value.clone(), slot, (index * bytes as usize) as i32); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `value` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1716:17 [INFO] [stdout] | [INFO] [stdout] 1716 | string: &String, [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] 1716 - string: &String, [INFO] [stdout] 1716 + string: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1840:42 [INFO] [stdout] | [INFO] [stdout] 1840 | let usages = get_usages_of(name, &*self.nodes); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.nodes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1842:14 [INFO] [stdout] | [INFO] [stdout] 1842 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1877:45 [INFO] [stdout] | [INFO] [stdout] 1877 | let ret_type = self.tg.compile_type(&ret_type, &self.isa, type_generics); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `ret_type` [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 which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1923:48 [INFO] [stdout] | [INFO] [stdout] 1923 | let fid = self.module.declare_function(&*mangled_name, linkage, &sig).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&mangled_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `compile_body` doesn't need a mutable reference [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1994:59 [INFO] [stdout] | [INFO] [stdout] 1994 | self.compile_body(code.as_ref(), &mut fn_builder, &mut trace)?; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 1994 - self.compile_body(code.as_ref(), &mut fn_builder, &mut trace)?; [INFO] [stdout] 1994 + self.compile_body(code.as_ref(), &mut fn_builder, &trace)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2020:37 [INFO] [stdout] | [INFO] [stdout] 2020 | ... let fields = fields.into_iter().map(|(m, n, t)| (m, n, self.tg.compile_type_no_tgs(t, &self.isa))).collect::>(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2023:74 [INFO] [stdout] | [INFO] [stdout] 2023 | let (data_size, data_offsets) = calculate_data_cranelift(&*alignments, &*sizes); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&alignments` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2023:88 [INFO] [stdout] | [INFO] [stdout] 2023 | let (data_size, data_offsets) = calculate_data_cranelift(&*alignments, &*sizes); [INFO] [stdout] | ^^^^^^^ help: try: `&sizes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2027:32 [INFO] [stdout] | [INFO] [stdout] 2027 | alignment: alignments.iter().max().unwrap_or(&1).clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*alignments.iter().max().unwrap_or(&1)` [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/compiler/cranelift/mod.rs:2028:65 [INFO] [stdout] | [INFO] [stdout] 2028 | ... fields: fields.into_iter().map(|(m, n, t)| (m.clone(), n.clone(), t)).zip(data_offsets).map(|((a, b, c), d)| (d, a, b, c)).c... [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*m` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:754:40 [INFO] [stdout] | [INFO] [stdout] 754 | if !vty.cmp_eq(&ty) { [INFO] [stdout] | ^^^ help: change this to: `ty` [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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:758:48 [INFO] [stdout] | [INFO] [stdout] 758 | func.ins().stack_store(value.clone(), slot, offset.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*value` [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 `u16` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:758:69 [INFO] [stdout] | [INFO] [stdout] 758 | func.ins().stack_store(value.clone(), slot, offset.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*offset` [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 which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:896:74 [INFO] [stdout] | [INFO] [stdout] 896 | ... let mangled_name = mangle_function(name, &*arg_types, ret_type); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&arg_types` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2174:12 [INFO] [stdout] | [INFO] [stdout] 2174 | if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.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: iterating on a map's keys [INFO] [stdout] --> src/compiler/cranelift/mod.rs:899:79 [INFO] [stdout] | [INFO] [stdout] 899 | ... eprintln!("SIGNATURES of {name} -> {:?}", self.functions.iter().map(|(n, _)| n).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.functions.keys()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2201:10 [INFO] [stdout] | [INFO] [stdout] 2201 | ) -> Result<(Option<(Value, CraneliftType)>, bool), Box<[CompilationError]>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/compiler/cranelift/mod.rs:918:43 [INFO] [stdout] | [INFO] [stdout] 918 | ... let ret = func [INFO] [stdout] | _________________________________^ [INFO] [stdout] 919 | | ... .inst_results(ret) [INFO] [stdout] 920 | | ... .first() [INFO] [stdout] 921 | | ... .map(|v| v.clone()) [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 918 ~ let ret = func [INFO] [stdout] 919 + .inst_results(ret) [INFO] [stdout] 920 + .first().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:921:46 [INFO] [stdout] | [INFO] [stdout] 921 | ... .map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [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/compiler/cranelift/mod.rs:925:40 [INFO] [stdout] | [INFO] [stdout] 925 | ... if self.auto_frees.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.auto_frees.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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:929:80 [INFO] [stdout] | [INFO] [stdout] 929 | ... self.auto_frees.last_mut().unwrap().insert(ret.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `ret` [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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:932:50 [INFO] [stdout] | [INFO] [stdout] 932 | ... .insert((ret.clone(), mangled_name.clone()).into()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `ret` [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/compiler/cranelift/mod.rs:935:36 [INFO] [stdout] | [INFO] [stdout] 935 | ... if value_args.len() != 0 && fn_meta.modifiers.contains(&Modifier::Dealloc) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value_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 `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:937:58 [INFO] [stdout] | [INFO] [stdout] 937 | ... if item.value != ret.clone() { [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `ret` [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 are using an explicit closure for copying elements [INFO] [stdout] --> src/compiler/cranelift/mod.rs:999:39 [INFO] [stdout] | [INFO] [stdout] 999 | ... let ret = func [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1000 | | ... .inst_results(ret) [INFO] [stdout] 1001 | | ... .first() [INFO] [stdout] 1002 | | ... .map(|v| v.clone()) [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 999 ~ let ret = func [INFO] [stdout] 1000 + .inst_results(ret) [INFO] [stdout] 1001 + .first().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1002:42 [INFO] [stdout] | [INFO] [stdout] 1002 | ... .map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:44:39 [INFO] [stdout] | [INFO] [stdout] 44 | fn register_type(&mut self, name: &String, ty: CraneliftType); [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | fn get_type(&self, name: &String) -> CraneliftType; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1080:79 [INFO] [stdout] | [INFO] [stdout] 1080 | ... println!("(mangled = {mangled_name}) fns = {:?}", self.functions.iter().map(|(n, _)| n).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.functions.keys()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | fn lookup_func(&self, name: &String) -> Option<&FunctionMeta>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:58:42 [INFO] [stdout] | [INFO] [stdout] 58 | fn lookup_func_variants(&self, name: &String) -> Option)>>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1099:35 [INFO] [stdout] | [INFO] [stdout] 1099 | let ret = func [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 1100 | | .inst_results(ret) [INFO] [stdout] 1101 | | .first() [INFO] [stdout] 1102 | | .map(|v| v.clone()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 1099 ~ let ret = func [INFO] [stdout] 1100 + .inst_results(ret) [INFO] [stdout] 1101 + .first().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1102:38 [INFO] [stdout] | [INFO] [stdout] 1102 | ... .map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [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/compiler/align.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | if field_alignments.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `field_alignments.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] error: used `unwrap()` on an `Option` value [INFO] [stdout] --> src/compiler/align.rs:47:26 [INFO] [stdout] | [INFO] [stdout] 47 | let max_alignment = *field_alignments.iter().max().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: if this value is `None`, it will panic [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/main.rs:1:9 [INFO] [stdout] | [INFO] [stdout] 1 | #![deny(clippy::unwrap_used)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/compiler/align.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / let mut field_offsets = vec![]; [INFO] [stdout] 50 | | field_offsets.reserve(field_sizes.len()); [INFO] [stdout] | |_____________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut field_offsets = Vec::with_capacity(field_sizes.len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/align.rs:81:74 [INFO] [stdout] | [INFO] [stdout] 81 | println!("{:?}", alignment_of_cranelift_type_on_architecture(&ty, &Triple::host())); [INFO] [stdout] | ^^^ help: change this to: `ty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1199:68 [INFO] [stdout] | [INFO] [stdout] 1199 | let (val, vty) = self.compile_body_expr(val, func, &trace)?; [INFO] [stdout] | ^^^^^^ help: change this to: `trace` [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] error: used `unwrap()` on an `Option` value [INFO] [stdout] --> src/compiler/align.rs:84:51 [INFO] [stdout] | [INFO] [stdout] 84 | ... let mut alignments = types.iter().map(|t| alignment_of_cranelift_type_on_architecture(&t, &Triple::host()).unwrap()).collect::... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: if this value is `None`, it will panic [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/align.rs:84:95 [INFO] [stdout] | [INFO] [stdout] 84 | ... let mut alignments = types.iter().map(|t| alignment_of_cranelift_type_on_architecture(&t, &Triple::host()).unwrap()).collect::... [INFO] [stdout] | ^^ help: change this to: `t` [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 which would be done by auto-deref [INFO] [stdout] --> src/compiler/align.rs:89:52 [INFO] [stdout] | [INFO] [stdout] 89 | println!("{:#?}", calculate_data_cranelift(&*alignments, &*alignments)); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&alignments` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/align.rs:89:66 [INFO] [stdout] | [INFO] [stdout] 89 | println!("{:#?}", calculate_data_cranelift(&*alignments, &*alignments)); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&alignments` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1343:16 [INFO] [stdout] | [INFO] [stdout] 1343 | r#for: &String, [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] 1343 ~ r#for: &str, [INFO] [stdout] 1344 | r#in: &AstNode, [INFO] [stdout] ... [INFO] [stdout] 1396 | [INFO] [stdout] 1397 ~ self.var_builder.create_var(func, current, inner.clone(), r#for.to_owned(), true); [INFO] [stdout] 1398 | [INFO] [stdout] ... [INFO] [stdout] 1421 | [INFO] [stdout] 1422 ~ self.var_builder.create_var(func, current, inner.clone(), r#for.to_owned(), true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1446:10 [INFO] [stdout] | [INFO] [stdout] 1446 | ) -> Result<(Option<(Value, Type)>, bool), Box<[CompilationError]>> { [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: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1594:12 [INFO] [stdout] | [INFO] [stdout] 1594 | if errors.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.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/compiler/cranelift/mod.rs:1608:10 [INFO] [stdout] | [INFO] [stdout] 1608 | ) -> Result<(Option<(Value, Type)>, bool), Box<[CompilationError]>> { [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: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1618:43 [INFO] [stdout] | [INFO] [stdout] 1618 | stmt => self.compile_body(&[stmt.clone()], func, trace)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(stmt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` 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/compiler/cranelift/mod.rs:1633:15 [INFO] [stdout] | [INFO] [stdout] 1633 | args: &Box<[(String, ParseType, Option)]>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&[(String, ParseType, Option)]` [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: literal with an empty format string [INFO] [stdout] --> src/errors.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | / "Expected a node matching ", [INFO] [stdout] 257 | | expected.to_string().italic(), [INFO] [stdout] 258 | | ", but got ", [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 255 ~ "Expected a node matching {}, but got {}.", [INFO] [stdout] 256 ~ expected.to_string().italic(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1635:52 [INFO] [stdout] | [INFO] [stdout] 1635 | let ret_type = self.tg.compile_type_no_tgs(&ret_type, &self.isa); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `ret_type` [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: `format!` in `writeln!` args [INFO] [stdout] --> src/errors.rs:283:17 [INFO] [stdout] | [INFO] [stdout] 283 | / writeln!( [INFO] [stdout] 284 | | f, [INFO] [stdout] 285 | | " {}{}{}{}", [INFO] [stdout] 286 | | "Module ".bold(), [INFO] [stdout] ... | [INFO] [stdout] 293 | | )?; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `writeln!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1663:55 [INFO] [stdout] | [INFO] [stdout] 1663 | variants.push((ret_type.clone(), arg_types.iter().cloned().collect::>())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1666:72 [INFO] [stdout] | [INFO] [stdout] 1666 | .insert(name.clone(), vec![(ret_type.clone(), arg_types.iter().cloned().collect::>())]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:297:21 [INFO] [stdout] | [INFO] [stdout] 297 | / " Maybe you need to install a module via ", [INFO] [stdout] 298 | | "mosaic install ".italic().yellow(), [INFO] [stdout] 299 | | modules[0].bold().italic().yellow(), [INFO] [stdout] 300 | | " or check ", [INFO] [stdout] 301 | | modules[0].bold(), [INFO] [stdout] 302 | | "'s documentation at ", [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 296 ~ " Maybe you need to install a module via {}{} or check {}'s documentation at {}", [INFO] [stdout] 297 | "mosaic install ".italic().yellow(), [INFO] [stdout] 298 ~ modules[0].bold().italic().yellow(), [INFO] [stdout] 299 ~ modules[0].bold(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1707:36 [INFO] [stdout] | [INFO] [stdout] 1707 | func.ins().stack_store(value.clone(), slot, (index * bytes as usize) as i32); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `value` [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: literal with an empty format string [INFO] [stdout] --> src/errors.rs:331:21 [INFO] [stdout] | [INFO] [stdout] 331 | " Try adding ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 330 - "{}{}{}{}", [INFO] [stdout] 331 - " Try adding ", [INFO] [stdout] 330 + " Try adding {}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1716:17 [INFO] [stdout] | [INFO] [stdout] 1716 | string: &String, [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] 1716 - string: &String, [INFO] [stdout] 1716 + string: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:355:21 [INFO] [stdout] | [INFO] [stdout] 355 | " Try adding ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 354 - "{}{}{}{}", [INFO] [stdout] 355 - " Try adding ", [INFO] [stdout] 354 + " Try adding {}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1840:42 [INFO] [stdout] | [INFO] [stdout] 1840 | let usages = get_usages_of(name, &*self.nodes); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.nodes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1842:14 [INFO] [stdout] | [INFO] [stdout] 1842 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:475:21 [INFO] [stdout] | [INFO] [stdout] 475 | " Try adding ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 474 - "{}{}{}{}", [INFO] [stdout] 475 - " Try adding ", [INFO] [stdout] 474 + " Try adding {}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1877:45 [INFO] [stdout] | [INFO] [stdout] 1877 | let ret_type = self.tg.compile_type(&ret_type, &self.isa, type_generics); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `ret_type` [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 which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1923:48 [INFO] [stdout] | [INFO] [stdout] 1923 | let fid = self.module.declare_function(&*mangled_name, linkage, &sig).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&mangled_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `compile_body` doesn't need a mutable reference [INFO] [stdout] --> src/compiler/cranelift/mod.rs:1994:59 [INFO] [stdout] | [INFO] [stdout] 1994 | self.compile_body(code.as_ref(), &mut fn_builder, &mut trace)?; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 1994 - self.compile_body(code.as_ref(), &mut fn_builder, &mut trace)?; [INFO] [stdout] 1994 + self.compile_body(code.as_ref(), &mut fn_builder, &trace)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2020:37 [INFO] [stdout] | [INFO] [stdout] 2020 | ... let fields = fields.into_iter().map(|(m, n, t)| (m, n, self.tg.compile_type_no_tgs(t, &self.isa))).collect::>(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2023:74 [INFO] [stdout] | [INFO] [stdout] 2023 | let (data_size, data_offsets) = calculate_data_cranelift(&*alignments, &*sizes); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&alignments` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:520:21 [INFO] [stdout] | [INFO] [stdout] 520 | " Try changing ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 519 - "{}{}{}{}{}{}", [INFO] [stdout] 520 - " Try changing ", [INFO] [stdout] 519 + " Try changing {}{}{}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2023:88 [INFO] [stdout] | [INFO] [stdout] 2023 | let (data_size, data_offsets) = calculate_data_cranelift(&*alignments, &*sizes); [INFO] [stdout] | ^^^^^^^ help: try: `&sizes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2027:32 [INFO] [stdout] | [INFO] [stdout] 2027 | alignment: alignments.iter().max().unwrap_or(&1).clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*alignments.iter().max().unwrap_or(&1)` [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: literal with an empty format string [INFO] [stdout] --> src/errors.rs:548:21 [INFO] [stdout] | [INFO] [stdout] 548 | / "Note: Required value to be freed because of explicit ", [INFO] [stdout] 549 | | "must_free ".italic(), [INFO] [stdout] 550 | | "modifier." [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 547 ~ "Note: Required value to be freed because of explicit {}modifier.", [INFO] [stdout] 548 ~ "must_free ".italic() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2028:65 [INFO] [stdout] | [INFO] [stdout] 2028 | ... fields: fields.into_iter().map(|(m, n, t)| (m.clone(), n.clone(), t)).zip(data_offsets).map(|((a, b, c), d)| (d, a, b, c)).c... [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*m` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lexer.rs:176:24 [INFO] [stdout] | [INFO] [stdout] 176 | if let None = linec.get().checked_add(1) { [INFO] [stdout] | -------^^^^----------------------------- help: try: `if linec.get().checked_add(1).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: length comparison to zero [INFO] [stdout] --> src/compiler/cranelift/mod.rs:2174:12 [INFO] [stdout] | [INFO] [stdout] 2174 | if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.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/compiler/cranelift/mod.rs:2201:10 [INFO] [stdout] | [INFO] [stdout] 2201 | ) -> Result<(Option<(Value, CraneliftType)>, bool), Box<[CompilationError]>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lexer.rs:223:35 [INFO] [stdout] | [INFO] [stdout] 223 | LineInfo::new(beginc.into(), endc, beginl.into(), endl), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider removing `.into()`: `beginc` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:44:39 [INFO] [stdout] | [INFO] [stdout] 44 | fn register_type(&mut self, name: &String, ty: CraneliftType); [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lexer.rs:223:56 [INFO] [stdout] | [INFO] [stdout] 223 | LineInfo::new(beginc.into(), endc, beginl.into(), endl), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider removing `.into()`: `beginl` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | fn get_type(&self, name: &String) -> CraneliftType; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/lexer.rs:271:21 [INFO] [stdout] | [INFO] [stdout] 271 | / loop { [INFO] [stdout] 272 | | let Some(next_c) = peek_char() else { [INFO] [stdout] 273 | | break; [INFO] [stdout] 274 | | }; [INFO] [stdout] ... | [INFO] [stdout] 282 | | next_char(true); [INFO] [stdout] 283 | | } [INFO] [stdout] | |_____________________^ help: try: `while let Some(next_c) = peek_char() { .. }` [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | fn lookup_func(&self, name: &String) -> Option<&FunctionMeta>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/traits.rs:58:42 [INFO] [stdout] | [INFO] [stdout] 58 | fn lookup_func_variants(&self, name: &String) -> Option)>>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/compiler/align.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | if field_alignments.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `field_alignments.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 loop could be written as a `while let` loop [INFO] [stdout] --> src/lexer.rs:302:21 [INFO] [stdout] | [INFO] [stdout] 302 | / loop { [INFO] [stdout] 303 | | let Some(next_c) = peek_char() else { [INFO] [stdout] 304 | | break; [INFO] [stdout] 305 | | }; [INFO] [stdout] ... | [INFO] [stdout] 320 | | next_char(true); [INFO] [stdout] 321 | | } [INFO] [stdout] | |_____________________^ help: try: `while let Some(next_c) = peek_char() { .. }` [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] error: used `unwrap()` on an `Option` value [INFO] [stdout] --> src/compiler/align.rs:47:26 [INFO] [stdout] | [INFO] [stdout] 47 | let max_alignment = *field_alignments.iter().max().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: if this value is `None`, it will panic [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/main.rs:1:9 [INFO] [stdout] | [INFO] [stdout] 1 | #![deny(clippy::unwrap_used)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/compiler/align.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / let mut field_offsets = vec![]; [INFO] [stdout] 50 | | field_offsets.reserve(field_sizes.len()); [INFO] [stdout] | |_____________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut field_offsets = Vec::with_capacity(field_sizes.len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:198:63 [INFO] [stdout] | [INFO] [stdout] 198 | fn from_str(file: &PathBuf, macro_name: &str, s: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:198:23 [INFO] [stdout] | [INFO] [stdout] 198 | fn from_str(file: &PathBuf, macro_name: &str, s: &str) -> Result { [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] 198 ~ fn from_str(file: &Path, macro_name: &str, s: &str) -> Result { [INFO] [stdout] 199 | match s { [INFO] [stdout] ... [INFO] [stdout] 206 | "stmt" => Ok(MacroArgKind::Stmt), [INFO] [stdout] 207 ~ s => Err(ParseError::UnknownNodeType(file.to_path_buf(), macro_name.to_owned(), s.to_owned())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | / "Expected a node matching ", [INFO] [stdout] 257 | | expected.to_string().italic(), [INFO] [stdout] 258 | | ", but got ", [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 255 ~ "Expected a node matching {}, but got {}.", [INFO] [stdout] 256 ~ expected.to_string().italic(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `writeln!` args [INFO] [stdout] --> src/errors.rs:283:17 [INFO] [stdout] | [INFO] [stdout] 283 | / writeln!( [INFO] [stdout] 284 | | f, [INFO] [stdout] 285 | | " {}{}{}{}", [INFO] [stdout] 286 | | "Module ".bold(), [INFO] [stdout] ... | [INFO] [stdout] 293 | | )?; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `writeln!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:297:21 [INFO] [stdout] | [INFO] [stdout] 297 | / " Maybe you need to install a module via ", [INFO] [stdout] 298 | | "mosaic install ".italic().yellow(), [INFO] [stdout] 299 | | modules[0].bold().italic().yellow(), [INFO] [stdout] 300 | | " or check ", [INFO] [stdout] 301 | | modules[0].bold(), [INFO] [stdout] 302 | | "'s documentation at ", [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 296 ~ " Maybe you need to install a module via {}{} or check {}'s documentation at {}", [INFO] [stdout] 297 | "mosaic install ".italic().yellow(), [INFO] [stdout] 298 ~ modules[0].bold().italic().yellow(), [INFO] [stdout] 299 ~ modules[0].bold(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:331:21 [INFO] [stdout] | [INFO] [stdout] 331 | " Try adding ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 330 - "{}{}{}{}", [INFO] [stdout] 331 - " Try adding ", [INFO] [stdout] 330 + " Try adding {}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:355:21 [INFO] [stdout] | [INFO] [stdout] 355 | " Try adding ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 354 - "{}{}{}{}", [INFO] [stdout] 355 - " Try adding ", [INFO] [stdout] 354 + " Try adding {}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `parser::StreamedParser` [INFO] [stdout] --> src/parser.rs:584:20 [INFO] [stdout] | [INFO] [stdout] 584 | let iter = self.clone().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `self.clone()` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:655:10 [INFO] [stdout] | [INFO] [stdout] 655 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:475:21 [INFO] [stdout] | [INFO] [stdout] 475 | " Try adding ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 474 - "{}{}{}{}", [INFO] [stdout] 475 - " Try adding ", [INFO] [stdout] 474 + " Try adding {}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:704:10 [INFO] [stdout] | [INFO] [stdout] 704 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:520:21 [INFO] [stdout] | [INFO] [stdout] 520 | " Try changing ", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 519 - "{}{}{}{}{}{}", [INFO] [stdout] 520 - " Try changing ", [INFO] [stdout] 519 + " Try changing {}{}{}{}{}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:728:57 [INFO] [stdout] | [INFO] [stdout] 728 | pub fn expect_char(&mut self, c: &char, m: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:768:36 [INFO] [stdout] | [INFO] [stdout] 768 | fn parse_fn_type(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/errors.rs:548:21 [INFO] [stdout] | [INFO] [stdout] 548 | / "Note: Required value to be freed because of explicit ", [INFO] [stdout] 549 | | "must_free ".italic(), [INFO] [stdout] 550 | | "modifier." [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 547 ~ "Note: Required value to be freed because of explicit {}modifier.", [INFO] [stdout] 548 ~ "must_free ".italic() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:769:27 [INFO] [stdout] | [INFO] [stdout] 769 | self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:773:30 [INFO] [stdout] | [INFO] [stdout] 773 | ... if self.expect_chars(&")", false, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:779:33 [INFO] [stdout] | [INFO] [stdout] 779 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:785:27 [INFO] [stdout] | [INFO] [stdout] 785 | self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:787:27 [INFO] [stdout] | [INFO] [stdout] 787 | self.expect_chars(&"->", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^^ help: change this to: `"->"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:797:39 [INFO] [stdout] | [INFO] [stdout] 797 | fn parse_ident_type(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:847:33 [INFO] [stdout] | [INFO] [stdout] 847 | fn parse_type(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:848:30 [INFO] [stdout] | [INFO] [stdout] 848 | ... if self.expect_chars(&"*", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).i... [INFO] [stdout] | ^^^^ help: change this to: `"*"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:849:48 [INFO] [stdout] | [INFO] [stdout] 849 | let is_mutable = self.expect_ident(&"mut", true).is_ok(); [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:852:35 [INFO] [stdout] | [INFO] [stdout] 852 | self.expect_ident(&"const", true)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `"const"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:855:49 [INFO] [stdout] | [INFO] [stdout] 855 | ... let is_nullable = self.expect_chars(&"?", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().c... [INFO] [stdout] | ^^^^ help: change this to: `"?"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:858:28 [INFO] [stdout] | [INFO] [stdout] 858 | let left = match self.parse_type() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 859 | | Ok(t) => t, [INFO] [stdout] 860 | | Err(e) => return Err(e), [INFO] [stdout] 861 | | }; [INFO] [stdout] | |_________________^ help: try instead: `self.parse_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:863:35 [INFO] [stdout] | [INFO] [stdout] 863 | ... self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:876:35 [INFO] [stdout] | [INFO] [stdout] 876 | ... self.expect_chars(&"[", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:878:28 [INFO] [stdout] | [INFO] [stdout] 878 | let left = match self.parse_type() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 879 | | Ok(t) => t, [INFO] [stdout] 880 | | Err(e) => return Err(e), [INFO] [stdout] 881 | | }; [INFO] [stdout] | |_________________^ help: try instead: `self.parse_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:883:35 [INFO] [stdout] | [INFO] [stdout] 883 | ... self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lexer.rs:176:24 [INFO] [stdout] | [INFO] [stdout] 176 | if let None = linec.get().checked_add(1) { [INFO] [stdout] | -------^^^^----------------------------- help: try: `if linec.get().checked_add(1).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 `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:893:24 [INFO] [stdout] | [INFO] [stdout] 893 | let left = match self.parse_type() { [INFO] [stdout] | ________________________^ [INFO] [stdout] 894 | | Ok(t) => t, [INFO] [stdout] 895 | | Err(e) => return Err(e), [INFO] [stdout] 896 | | }; [INFO] [stdout] | |_____________^ help: try instead: `self.parse_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:905:20 [INFO] [stdout] | [INFO] [stdout] 905 | let left = match self.parse_ident_type() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 906 | | Ok(t) => t, [INFO] [stdout] 907 | | Err(e) => return Err(e), [INFO] [stdout] 908 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.parse_ident_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:913:66 [INFO] [stdout] | [INFO] [stdout] 913 | pub fn parse_macro_list(&mut self, left: Option) -> Result>, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/lexer.rs:223:35 [INFO] [stdout] | [INFO] [stdout] 223 | LineInfo::new(beginc.into(), endc, beginl.into(), endl), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider removing `.into()`: `beginc` [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: `usize` [INFO] [stdout] --> src/lexer.rs:223:56 [INFO] [stdout] | [INFO] [stdout] 223 | LineInfo::new(beginc.into(), endc, beginl.into(), endl), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider removing `.into()`: `beginl` [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: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/parser.rs:914:21 [INFO] [stdout] | [INFO] [stdout] 914 | let begin = (|| { [INFO] [stdout] | _____________________^ [INFO] [stdout] 915 | | let Some(left) = left else { [INFO] [stdout] 916 | | let next = self.next_ast_node(); [INFO] [stdout] ... | [INFO] [stdout] 930 | | Ok(Either::Left(left)) [INFO] [stdout] 931 | | })()?; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:935:33 [INFO] [stdout] | [INFO] [stdout] 935 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:953:60 [INFO] [stdout] | [INFO] [stdout] 953 | pub fn parse_list(&mut self, left: Option) -> Result, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/lexer.rs:271:21 [INFO] [stdout] | [INFO] [stdout] 271 | / loop { [INFO] [stdout] 272 | | let Some(next_c) = peek_char() else { [INFO] [stdout] 273 | | break; [INFO] [stdout] 274 | | }; [INFO] [stdout] ... | [INFO] [stdout] 282 | | next_char(true); [INFO] [stdout] 283 | | } [INFO] [stdout] | |_____________________^ help: try: `while let Some(next_c) = peek_char() { .. }` [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] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/lexer.rs:302:21 [INFO] [stdout] | [INFO] [stdout] 302 | / loop { [INFO] [stdout] 303 | | let Some(next_c) = peek_char() else { [INFO] [stdout] 304 | | break; [INFO] [stdout] 305 | | }; [INFO] [stdout] ... | [INFO] [stdout] 320 | | next_char(true); [INFO] [stdout] 321 | | } [INFO] [stdout] | |_____________________^ help: try: `while let Some(next_c) = peek_char() { .. }` [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: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/parser.rs:954:27 [INFO] [stdout] | [INFO] [stdout] 954 | let begin = match (|| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 955 | | let Some(left) = left else { [INFO] [stdout] 956 | | let tk = self.next_ast_node(); [INFO] [stdout] ... | [INFO] [stdout] 970 | | Ok(left) [INFO] [stdout] 971 | | })() { [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:979:33 [INFO] [stdout] | [INFO] [stdout] 979 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:994:41 [INFO] [stdout] | [INFO] [stdout] 994 | pub fn parse_tg_bound(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/parser.rs:1012:44 [INFO] [stdout] | [INFO] [stdout] 1012 | Some(Ok(Token::Char(c, _))) if c == '!' => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1012 - Some(Ok(Token::Char(c, _))) if c == '!' => { [INFO] [stdout] 1012 + Some(Ok(Token::Char('!', _))) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:1003:50 [INFO] [stdout] | [INFO] [stdout] 1003 | Some(Ok(Token::Ident(i, _))) if i == "iter".to_string() => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"iter"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1004:35 [INFO] [stdout] | [INFO] [stdout] 1004 | ... self.expect_chars(&"[", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1008:35 [INFO] [stdout] | [INFO] [stdout] 1008 | ... self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1018:33 [INFO] [stdout] | [INFO] [stdout] 1018 | ... while self.expect_chars(&"+", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"+"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:1032:40 [INFO] [stdout] | [INFO] [stdout] 1032 | pub fn parse_tg_list(&mut self) -> Result>, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1033:27 [INFO] [stdout] | [INFO] [stdout] 1033 | self.expect_chars(&"<", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"<"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1035:30 [INFO] [stdout] | [INFO] [stdout] 1035 | ... if self.expect_chars(&">", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `">"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1042:33 [INFO] [stdout] | [INFO] [stdout] 1042 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1063:34 [INFO] [stdout] | [INFO] [stdout] 1063 | ... if self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1070:27 [INFO] [stdout] | [INFO] [stdout] 1070 | self.expect_chars(&">", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `">"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:1078:10 [INFO] [stdout] | [INFO] [stdout] 1078 | ) -> Result)>, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1079:43 [INFO] [stdout] | [INFO] [stdout] 1079 | ... if let Err(e) = self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().cu... [INFO] [stdout] | ^^^^ help: change this to: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1087:30 [INFO] [stdout] | [INFO] [stdout] 1087 | ... if self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1094:33 [INFO] [stdout] | [INFO] [stdout] 1094 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:198:63 [INFO] [stdout] | [INFO] [stdout] 198 | fn from_str(file: &PathBuf, macro_name: &str, s: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:198:23 [INFO] [stdout] | [INFO] [stdout] 198 | fn from_str(file: &PathBuf, macro_name: &str, s: &str) -> Result { [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] 198 ~ fn from_str(file: &Path, macro_name: &str, s: &str) -> Result { [INFO] [stdout] 199 | match s { [INFO] [stdout] ... [INFO] [stdout] 206 | "stmt" => Ok(MacroArgKind::Stmt), [INFO] [stdout] 207 ~ s => Err(ParseError::UnknownNodeType(file.to_path_buf(), macro_name.to_owned(), s.to_owned())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1115:31 [INFO] [stdout] | [INFO] [stdout] 1115 | ... self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1119:34 [INFO] [stdout] | [INFO] [stdout] 1119 | ... if self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1137:27 [INFO] [stdout] | [INFO] [stdout] 1137 | self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1148:33 [INFO] [stdout] | [INFO] [stdout] 1148 | ... match self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:1154:43 [INFO] [stdout] | [INFO] [stdout] 1154 | pub fn parse_block_expr(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1155:27 [INFO] [stdout] | [INFO] [stdout] 1155 | self.expect_chars(&"{", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"{"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1160:37 [INFO] [stdout] | [INFO] [stdout] 1160 | ... match self.expect_chars(&"}", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"}"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MacroArgKind` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:1293:39 [INFO] [stdout] | [INFO] [stdout] 1293 | ... expected: kind.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*kind` [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 could be replaced by its body itself [INFO] [stdout] --> src/parser.rs:1350:21 [INFO] [stdout] | [INFO] [stdout] 1350 | / match &*name { [INFO] [stdout] 1351 | | _ => todo!("Implement custom macros") [INFO] [stdout] 1352 | | } [INFO] [stdout] | |_____________________^ help: consider using the match body instead: `todo!("Implement custom macros")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1421:30 [INFO] [stdout] | [INFO] [stdout] 1421 | ... if self.expect_chars(&"[", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1436:37 [INFO] [stdout] | [INFO] [stdout] 1436 | ... match self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `parser::StreamedParser` [INFO] [stdout] --> src/parser.rs:584:20 [INFO] [stdout] | [INFO] [stdout] 584 | let iter = self.clone().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `self.clone()` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:655:10 [INFO] [stdout] | [INFO] [stdout] 655 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:704:10 [INFO] [stdout] | [INFO] [stdout] 704 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:728:57 [INFO] [stdout] | [INFO] [stdout] 728 | pub fn expect_char(&mut self, c: &char, m: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:768:36 [INFO] [stdout] | [INFO] [stdout] 768 | fn parse_fn_type(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:769:27 [INFO] [stdout] | [INFO] [stdout] 769 | self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:773:30 [INFO] [stdout] | [INFO] [stdout] 773 | ... if self.expect_chars(&")", false, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:779:33 [INFO] [stdout] | [INFO] [stdout] 779 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:785:27 [INFO] [stdout] | [INFO] [stdout] 785 | self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:787:27 [INFO] [stdout] | [INFO] [stdout] 787 | self.expect_chars(&"->", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^^ help: change this to: `"->"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:1448:24 [INFO] [stdout] | [INFO] [stdout] 1448 | ... if let Ok(_) = self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)) { [INFO] [stdout] | -------^^^^^--------------------------------------------------------------------------------------------------------------------------- help: try: `if self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).is_ok()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1448:50 [INFO] [stdout] | [INFO] [stdout] 1448 | ... if let Ok(_) = self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().cur... [INFO] [stdout] | ^^^^ help: change this to: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1449:42 [INFO] [stdout] | [INFO] [stdout] 1449 | ... if self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1467:45 [INFO] [stdout] | [INFO] [stdout] 1467 | ... match self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/parser.rs:1492:27 [INFO] [stdout] | [INFO] [stdout] 1492 | let begin = match (|| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 1493 | | let Some(AstNode::Identifier(_, left, ..)) = left else { [INFO] [stdout] 1494 | | let tk = self.lexer.next_token(); [INFO] [stdout] ... | [INFO] [stdout] 1515 | | Ok(left) [INFO] [stdout] 1516 | | })() { [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1523:33 [INFO] [stdout] | [INFO] [stdout] 1523 | ... while self.expect_chars(&"::", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_lin... [INFO] [stdout] | ^^^^^ help: change this to: `"::"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/parser.rs:1582:9 [INFO] [stdout] | [INFO] [stdout] 1582 | / match tk { [INFO] [stdout] 1583 | | Err(e) => return Some(Err(e)), [INFO] [stdout] 1584 | | _ => (), [INFO] [stdout] 1585 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = tk { return Some(Err(e)) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:1587:16 [INFO] [stdout] | [INFO] [stdout] 1587 | if let Ok(_) = self.expect_ident(&"as", true) { [INFO] [stdout] | -------^^^^^--------------------------------- help: try: `if self.expect_ident(&"as", true).is_ok()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1587:42 [INFO] [stdout] | [INFO] [stdout] 1587 | if let Ok(_) = self.expect_ident(&"as", true) { [INFO] [stdout] | ^^^^^ help: change this to: `"as"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1862:39 [INFO] [stdout] | [INFO] [stdout] 1862 | let start = self.expect_ident(&"mut", true).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1882:30 [INFO] [stdout] | [INFO] [stdout] 1882 | ... if self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1888:39 [INFO] [stdout] | [INFO] [stdout] 1888 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1914:35 [INFO] [stdout] | [INFO] [stdout] 1914 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1941:39 [INFO] [stdout] | [INFO] [stdout] 1941 | let start = self.expect_ident(&"let", true).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `"let"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1961:30 [INFO] [stdout] | [INFO] [stdout] 1961 | ... if self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1967:39 [INFO] [stdout] | [INFO] [stdout] 1967 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1993:35 [INFO] [stdout] | [INFO] [stdout] 1993 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:797:39 [INFO] [stdout] | [INFO] [stdout] 797 | fn parse_ident_type(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:847:33 [INFO] [stdout] | [INFO] [stdout] 847 | fn parse_type(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:848:30 [INFO] [stdout] | [INFO] [stdout] 848 | ... if self.expect_chars(&"*", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).i... [INFO] [stdout] | ^^^^ help: change this to: `"*"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:849:48 [INFO] [stdout] | [INFO] [stdout] 849 | let is_mutable = self.expect_ident(&"mut", true).is_ok(); [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:852:35 [INFO] [stdout] | [INFO] [stdout] 852 | self.expect_ident(&"const", true)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `"const"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2020:39 [INFO] [stdout] | [INFO] [stdout] 2020 | let start = self.expect_ident(&"include", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `"include"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2043:39 [INFO] [stdout] | [INFO] [stdout] 2043 | let start = self.expect_ident(&"if", true).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `"if"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2061:30 [INFO] [stdout] | [INFO] [stdout] 2061 | if self.expect_ident(&"else", true).is_ok() { [INFO] [stdout] | ^^^^^^^ help: change this to: `"else"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2093:39 [INFO] [stdout] | [INFO] [stdout] 2093 | let start = self.expect_ident(&"fn", true).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `"fn"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2097:38 [INFO] [stdout] | [INFO] [stdout] 2097 | ... if self.expect_chars(&"::", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))... [INFO] [stdout] | ^^^^^ help: change this to: `"::"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2129:44 [INFO] [stdout] | [INFO] [stdout] 2129 | ... let tg_args = if self.expect_chars(&"<", false, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().... [INFO] [stdout] | ^^^^ help: change this to: `"<"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/parser.rs:2146:44 [INFO] [stdout] | [INFO] [stdout] 2146 | let Ok(m) = Modifier::from_str(&*m) else { [INFO] [stdout] | ^^^ help: try: `&m` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2155:33 [INFO] [stdout] | [INFO] [stdout] 2155 | ... match self.expect_chars(&"->", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_lin... [INFO] [stdout] | ^^^^^ help: change this to: `"->"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:855:49 [INFO] [stdout] | [INFO] [stdout] 855 | ... let is_nullable = self.expect_chars(&"?", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().c... [INFO] [stdout] | ^^^^ help: change this to: `"?"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:858:28 [INFO] [stdout] | [INFO] [stdout] 858 | let left = match self.parse_type() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 859 | | Ok(t) => t, [INFO] [stdout] 860 | | Err(e) => return Err(e), [INFO] [stdout] 861 | | }; [INFO] [stdout] | |_________________^ help: try instead: `self.parse_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:863:35 [INFO] [stdout] | [INFO] [stdout] 863 | ... self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:876:35 [INFO] [stdout] | [INFO] [stdout] 876 | ... self.expect_chars(&"[", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:878:28 [INFO] [stdout] | [INFO] [stdout] 878 | let left = match self.parse_type() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 879 | | Ok(t) => t, [INFO] [stdout] 880 | | Err(e) => return Err(e), [INFO] [stdout] 881 | | }; [INFO] [stdout] | |_________________^ help: try instead: `self.parse_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:883:35 [INFO] [stdout] | [INFO] [stdout] 883 | ... self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:893:24 [INFO] [stdout] | [INFO] [stdout] 893 | let left = match self.parse_type() { [INFO] [stdout] | ________________________^ [INFO] [stdout] 894 | | Ok(t) => t, [INFO] [stdout] 895 | | Err(e) => return Err(e), [INFO] [stdout] 896 | | }; [INFO] [stdout] | |_____________^ help: try instead: `self.parse_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2188:39 [INFO] [stdout] | [INFO] [stdout] 2188 | let start = self.expect_ident(&"extern", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `"extern"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/parser.rs:905:20 [INFO] [stdout] | [INFO] [stdout] 905 | let left = match self.parse_ident_type() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 906 | | Ok(t) => t, [INFO] [stdout] 907 | | Err(e) => return Err(e), [INFO] [stdout] 908 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.parse_ident_type()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:913:66 [INFO] [stdout] | [INFO] [stdout] 913 | pub fn parse_macro_list(&mut self, left: Option) -> Result>, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2215:35 [INFO] [stdout] | [INFO] [stdout] 2215 | let _ = self.expect_ident(&"fn", true); [INFO] [stdout] | ^^^^^ help: change this to: `"fn"` [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: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/parser.rs:914:21 [INFO] [stdout] | [INFO] [stdout] 914 | let begin = (|| { [INFO] [stdout] | _____________________^ [INFO] [stdout] 915 | | let Some(left) = left else { [INFO] [stdout] 916 | | let next = self.next_ast_node(); [INFO] [stdout] ... | [INFO] [stdout] 930 | | Ok(Either::Left(left)) [INFO] [stdout] 931 | | })()?; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2240:33 [INFO] [stdout] | [INFO] [stdout] 2240 | ... match self.expect_chars(&"->", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_lin... [INFO] [stdout] | ^^^^^ help: change this to: `"->"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:935:33 [INFO] [stdout] | [INFO] [stdout] 935 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2264:39 [INFO] [stdout] | [INFO] [stdout] 2264 | let start = self.expect_ident(&"return", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `"return"` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:953:60 [INFO] [stdout] | [INFO] [stdout] 953 | pub fn parse_list(&mut self, left: Option) -> Result, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2281:39 [INFO] [stdout] | [INFO] [stdout] 2281 | let start = self.expect_ident(&"for", true).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `"for"` [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: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/parser.rs:954:27 [INFO] [stdout] | [INFO] [stdout] 954 | let begin = match (|| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 955 | | let Some(left) = left else { [INFO] [stdout] 956 | | let tk = self.next_ast_node(); [INFO] [stdout] ... | [INFO] [stdout] 970 | | Ok(left) [INFO] [stdout] 971 | | })() { [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2301:35 [INFO] [stdout] | [INFO] [stdout] 2301 | let _ = self.expect_ident(&"in", true).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `"in"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:979:33 [INFO] [stdout] | [INFO] [stdout] 979 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2326:39 [INFO] [stdout] | [INFO] [stdout] 2326 | let start = self.expect_ident(&"while", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"while"` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:994:41 [INFO] [stdout] | [INFO] [stdout] 994 | pub fn parse_tg_bound(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/parser.rs:1012:44 [INFO] [stdout] | [INFO] [stdout] 1012 | Some(Ok(Token::Char(c, _))) if c == '!' => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1012 - Some(Ok(Token::Char(c, _))) if c == '!' => { [INFO] [stdout] 1012 + Some(Ok(Token::Char('!', _))) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2351:39 [INFO] [stdout] | [INFO] [stdout] 2351 | let start = self.expect_ident(&"type", true).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `"type"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:1003:50 [INFO] [stdout] | [INFO] [stdout] 1003 | Some(Ok(Token::Ident(i, _))) if i == "iter".to_string() => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"iter"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1004:35 [INFO] [stdout] | [INFO] [stdout] 1004 | ... self.expect_chars(&"[", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/parser.rs:2371:9 [INFO] [stdout] | [INFO] [stdout] 2371 | / match self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_... [INFO] [stdout] 2372 | | Err(e) => return Some(Err(e)), [INFO] [stdout] 2373 | | Ok(_) => (), [INFO] [stdout] 2374 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)) { return Some(Err(e)) }` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2371:33 [INFO] [stdout] | [INFO] [stdout] 2371 | ... match self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1008:35 [INFO] [stdout] | [INFO] [stdout] 1008 | ... self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1018:33 [INFO] [stdout] | [INFO] [stdout] 1018 | ... while self.expect_chars(&"+", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"+"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2390:35 [INFO] [stdout] | [INFO] [stdout] 2390 | let _ = self.expect_ident(&"macro", true); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"macro"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:2411:19 [INFO] [stdout] | [INFO] [stdout] 2411 | while let Ok(_) = self.expect_char(&'$', true) { [INFO] [stdout] | ----------^^^^^------------------------------- help: try: `while self.expect_char(&'$', true).is_ok()` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:1032:40 [INFO] [stdout] | [INFO] [stdout] 1032 | pub fn parse_tg_list(&mut self) -> Result>, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1033:27 [INFO] [stdout] | [INFO] [stdout] 1033 | self.expect_chars(&"<", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"<"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1035:30 [INFO] [stdout] | [INFO] [stdout] 1035 | ... if self.expect_chars(&">", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `">"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1042:33 [INFO] [stdout] | [INFO] [stdout] 1042 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2448:39 [INFO] [stdout] | [INFO] [stdout] 2448 | let start = self.expect_ident(&"defer", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"defer"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1063:34 [INFO] [stdout] | [INFO] [stdout] 1063 | ... if self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1070:27 [INFO] [stdout] | [INFO] [stdout] 1070 | self.expect_chars(&">", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `">"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2474:39 [INFO] [stdout] | [INFO] [stdout] 2474 | let start = self.expect_ident(&"match", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"match"` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:1078:10 [INFO] [stdout] | [INFO] [stdout] 1078 | ) -> Result)>, ParseError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1079:43 [INFO] [stdout] | [INFO] [stdout] 1079 | ... if let Err(e) = self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().cu... [INFO] [stdout] | ^^^^ help: change this to: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2490:34 [INFO] [stdout] | [INFO] [stdout] 2490 | if self.expect_ident(&"else", true).is_ok() { [INFO] [stdout] | ^^^^^^^ help: change this to: `"else"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1087:30 [INFO] [stdout] | [INFO] [stdout] 1087 | ... if self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1094:33 [INFO] [stdout] | [INFO] [stdout] 1094 | ... while self.expect_chars(&",", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `","` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1115:31 [INFO] [stdout] | [INFO] [stdout] 1115 | ... self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2558:39 [INFO] [stdout] | [INFO] [stdout] 2558 | let start = self.expect_ident(&"data", true).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `"data"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1119:34 [INFO] [stdout] | [INFO] [stdout] 1119 | ... if self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1137:27 [INFO] [stdout] | [INFO] [stdout] 1137 | self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2585:33 [INFO] [stdout] | [INFO] [stdout] 2585 | while self.expect_ident(&"let", false).is_ok() || self.expect_ident(&"mut", false).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"let"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2585:77 [INFO] [stdout] | [INFO] [stdout] 2585 | while self.expect_ident(&"let", false).is_ok() || self.expect_ident(&"mut", false).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2586:34 [INFO] [stdout] | [INFO] [stdout] 2586 | if self.expect_ident(&"let", true).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"let"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1148:33 [INFO] [stdout] | [INFO] [stdout] 1148 | ... match self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/parser.rs:1154:43 [INFO] [stdout] | [INFO] [stdout] 1154 | pub fn parse_block_expr(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2616:41 [INFO] [stdout] | [INFO] [stdout] 2616 | } else if self.expect_ident(&"mut", true).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1155:27 [INFO] [stdout] | [INFO] [stdout] 1155 | self.expect_chars(&"{", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))?; [INFO] [stdout] | ^^^^ help: change this to: `"{"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1160:37 [INFO] [stdout] | [INFO] [stdout] 1160 | ... match self.expect_chars(&"}", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"}"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2668:39 [INFO] [stdout] | [INFO] [stdout] 2668 | let start = self.expect_ident(&"guard", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"guard"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2681:27 [INFO] [stdout] | [INFO] [stdout] 2681 | self.expect_ident(&"else", true).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `"else"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2701:39 [INFO] [stdout] | [INFO] [stdout] 2701 | let start = self.expect_ident(&"sizeof", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `"sizeof"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:2725:16 [INFO] [stdout] | [INFO] [stdout] 2725 | ... if let Ok(_) = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)) { [INFO] [stdout] | -------^^^^^--------------------------------------------------------------------------------------------------------------------------- help: try: `if self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).is_ok()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2725:42 [INFO] [stdout] | [INFO] [stdout] 2725 | ... if let Ok(_) = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().cur... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2743:39 [INFO] [stdout] | [INFO] [stdout] 2743 | let start = self.expect_ident(&"break", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"break"` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:103:37 [INFO] [stdout] | [INFO] [stdout] 103 | Token::Char(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:104:39 [INFO] [stdout] | [INFO] [stdout] 104 | Token::String(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:105:38 [INFO] [stdout] | [INFO] [stdout] 105 | Token::Ident(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:106:39 [INFO] [stdout] | [INFO] [stdout] 106 | Token::Number(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:108:37 [INFO] [stdout] | [INFO] [stdout] 108 | Token::Byte(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `MacroArgKind` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:1293:39 [INFO] [stdout] | [INFO] [stdout] 1293 | ... expected: kind.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*kind` [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 could be replaced by its body itself [INFO] [stdout] --> src/parser.rs:1350:21 [INFO] [stdout] | [INFO] [stdout] 1350 | / match &*name { [INFO] [stdout] 1351 | | _ => todo!("Implement custom macros") [INFO] [stdout] 1352 | | } [INFO] [stdout] | |_____________________^ help: consider using the match body instead: `todo!("Implement custom macros")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1421:30 [INFO] [stdout] | [INFO] [stdout] 1421 | ... if self.expect_chars(&"[", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1436:37 [INFO] [stdout] | [INFO] [stdout] 1436 | ... match self.expect_chars(&"]", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"]"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:1448:24 [INFO] [stdout] | [INFO] [stdout] 1448 | ... if let Ok(_) = self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)) { [INFO] [stdout] | -------^^^^^--------------------------------------------------------------------------------------------------------------------------- help: try: `if self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).is_ok()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1448:50 [INFO] [stdout] | [INFO] [stdout] 1448 | ... if let Ok(_) = self.expect_chars(&"(", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().cur... [INFO] [stdout] | ^^^^ help: change this to: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1449:42 [INFO] [stdout] | [INFO] [stdout] 1449 | ... if self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1467:45 [INFO] [stdout] | [INFO] [stdout] 1467 | ... match self.expect_chars(&")", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `")"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/parser.rs:1492:27 [INFO] [stdout] | [INFO] [stdout] 1492 | let begin = match (|| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 1493 | | let Some(AstNode::Identifier(_, left, ..)) = left else { [INFO] [stdout] 1494 | | let tk = self.lexer.next_token(); [INFO] [stdout] ... | [INFO] [stdout] 1515 | | Ok(left) [INFO] [stdout] 1516 | | })() { [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] ::: src/errors.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ExpectedToken(PathBuf, Token, Token), [INFO] [stdout] | ------------------------------------ the variant `ExpectedToken` contains at least 152 bytes [INFO] [stdout] 22 | UnexpectedEOF(PathBuf, String), [INFO] [stdout] 23 | InvalidNode(PathBuf, AstNode), [INFO] [stdout] | ----------------------------- the variant `InvalidNode` contains at least 232 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | / InvalidMacroArg { [INFO] [stdout] 29 | | file: PathBuf, [INFO] [stdout] 30 | | arg_idx: usize, [INFO] [stdout] 31 | | arg_name: String, [INFO] [stdout] ... | [INFO] [stdout] 34 | | got_node: Either, [INFO] [stdout] 35 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] ... [INFO] [stdout] 42 | MismatchedTypeInDef(PathBuf, Trace, String, Rc, Rc), [INFO] [stdout] | --------------------------------------------------------------------------------------------- the variant `MismatchedTypeInDef` contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 45 | InvalidCast(PathBuf, Trace, Rc, Rc), [INFO] [stdout] | ----------------------------------------------------------------------------- the variant `InvalidCast` contains at least 128 bytes [INFO] [stdout] 46 | CannotMakePointer(PathBuf, Trace, String), [INFO] [stdout] 47 | NotFreed(PathBuf, Trace, MustFreeMeta), [INFO] [stdout] | -------------------------------------- the variant `NotFreed` contains at least 128 bytes [INFO] [stdout] 48 | InvalidSignature(PathBuf, Trace, String, Rc, Vec>), [INFO] [stdout] | ----------------------------------------------------------------------------------------------- the variant `InvalidSignature` contains at least 160 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `errors::CompilationError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1523:33 [INFO] [stdout] | [INFO] [stdout] 1523 | ... while self.expect_chars(&"::", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_lin... [INFO] [stdout] | ^^^^^ help: change this to: `"::"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/parser.rs:1582:9 [INFO] [stdout] | [INFO] [stdout] 1582 | / match tk { [INFO] [stdout] 1583 | | Err(e) => return Some(Err(e)), [INFO] [stdout] 1584 | | _ => (), [INFO] [stdout] 1585 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = tk { return Some(Err(e)) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:1587:16 [INFO] [stdout] | [INFO] [stdout] 1587 | if let Ok(_) = self.expect_ident(&"as", true) { [INFO] [stdout] | -------^^^^^--------------------------------- help: try: `if self.expect_ident(&"as", true).is_ok()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1587:42 [INFO] [stdout] | [INFO] [stdout] 1587 | if let Ok(_) = self.expect_ident(&"as", true) { [INFO] [stdout] | ^^^^^ help: change this to: `"as"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1862:39 [INFO] [stdout] | [INFO] [stdout] 1862 | let start = self.expect_ident(&"mut", true).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1882:30 [INFO] [stdout] | [INFO] [stdout] 1882 | ... if self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1888:39 [INFO] [stdout] | [INFO] [stdout] 1888 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1914:35 [INFO] [stdout] | [INFO] [stdout] 1914 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1941:39 [INFO] [stdout] | [INFO] [stdout] 1941 | let start = self.expect_ident(&"let", true).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `"let"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1961:30 [INFO] [stdout] | [INFO] [stdout] 1961 | ... if self.expect_chars(&":", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).... [INFO] [stdout] | ^^^^ help: change this to: `":"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1967:39 [INFO] [stdout] | [INFO] [stdout] 1967 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:1993:35 [INFO] [stdout] | [INFO] [stdout] 1993 | ... let _ = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_li... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2020:39 [INFO] [stdout] | [INFO] [stdout] 2020 | let start = self.expect_ident(&"include", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `"include"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2043:39 [INFO] [stdout] | [INFO] [stdout] 2043 | let start = self.expect_ident(&"if", true).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `"if"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2061:30 [INFO] [stdout] | [INFO] [stdout] 2061 | if self.expect_ident(&"else", true).is_ok() { [INFO] [stdout] | ^^^^^^^ help: change this to: `"else"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2093:39 [INFO] [stdout] | [INFO] [stdout] 2093 | let start = self.expect_ident(&"fn", true).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `"fn"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2097:38 [INFO] [stdout] | [INFO] [stdout] 2097 | ... if self.expect_chars(&"::", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line))... [INFO] [stdout] | ^^^^^ help: change this to: `"::"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2129:44 [INFO] [stdout] | [INFO] [stdout] 2129 | ... let tg_args = if self.expect_chars(&"<", false, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().... [INFO] [stdout] | ^^^^ help: change this to: `"<"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/parser.rs:2146:44 [INFO] [stdout] | [INFO] [stdout] 2146 | let Ok(m) = Modifier::from_str(&*m) else { [INFO] [stdout] | ^^^ help: try: `&m` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2155:33 [INFO] [stdout] | [INFO] [stdout] 2155 | ... match self.expect_chars(&"->", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_lin... [INFO] [stdout] | ^^^^^ help: change this to: `"->"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2188:39 [INFO] [stdout] | [INFO] [stdout] 2188 | let start = self.expect_ident(&"extern", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `"extern"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2215:35 [INFO] [stdout] | [INFO] [stdout] 2215 | let _ = self.expect_ident(&"fn", true); [INFO] [stdout] | ^^^^^ help: change this to: `"fn"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2240:33 [INFO] [stdout] | [INFO] [stdout] 2240 | ... match self.expect_chars(&"->", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_lin... [INFO] [stdout] | ^^^^^ help: change this to: `"->"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2264:39 [INFO] [stdout] | [INFO] [stdout] 2264 | let start = self.expect_ident(&"return", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `"return"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2281:39 [INFO] [stdout] | [INFO] [stdout] 2281 | let start = self.expect_ident(&"for", true).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `"for"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2301:35 [INFO] [stdout] | [INFO] [stdout] 2301 | let _ = self.expect_ident(&"in", true).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `"in"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2326:39 [INFO] [stdout] | [INFO] [stdout] 2326 | let start = self.expect_ident(&"while", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"while"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2351:39 [INFO] [stdout] | [INFO] [stdout] 2351 | let start = self.expect_ident(&"type", true).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `"type"` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/parser.rs:2371:9 [INFO] [stdout] | [INFO] [stdout] 2371 | / match self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_... [INFO] [stdout] 2372 | | Err(e) => return Some(Err(e)), [INFO] [stdout] 2373 | | Ok(_) => (), [INFO] [stdout] 2374 | | }; [INFO] [stdout] | |_________^ help: try: `if let Err(e) = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)) { return Some(Err(e)) }` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2371:33 [INFO] [stdout] | [INFO] [stdout] 2371 | ... match self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2390:35 [INFO] [stdout] | [INFO] [stdout] 2390 | let _ = self.expect_ident(&"macro", true); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"macro"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:2411:19 [INFO] [stdout] | [INFO] [stdout] 2411 | while let Ok(_) = self.expect_char(&'$', true) { [INFO] [stdout] | ----------^^^^^------------------------------- help: try: `while self.expect_char(&'$', true).is_ok()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2448:39 [INFO] [stdout] | [INFO] [stdout] 2448 | let start = self.expect_ident(&"defer", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"defer"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2474:39 [INFO] [stdout] | [INFO] [stdout] 2474 | let start = self.expect_ident(&"match", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"match"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2490:34 [INFO] [stdout] | [INFO] [stdout] 2490 | if self.expect_ident(&"else", true).is_ok() { [INFO] [stdout] | ^^^^^^^ help: change this to: `"else"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2558:39 [INFO] [stdout] | [INFO] [stdout] 2558 | let start = self.expect_ident(&"data", true).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `"data"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2585:33 [INFO] [stdout] | [INFO] [stdout] 2585 | while self.expect_ident(&"let", false).is_ok() || self.expect_ident(&"mut", false).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"let"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2585:77 [INFO] [stdout] | [INFO] [stdout] 2585 | while self.expect_ident(&"let", false).is_ok() || self.expect_ident(&"mut", false).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2586:34 [INFO] [stdout] | [INFO] [stdout] 2586 | if self.expect_ident(&"let", true).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"let"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2616:41 [INFO] [stdout] | [INFO] [stdout] 2616 | } else if self.expect_ident(&"mut", true).is_ok() { [INFO] [stdout] | ^^^^^^ help: change this to: `"mut"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2668:39 [INFO] [stdout] | [INFO] [stdout] 2668 | let start = self.expect_ident(&"guard", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"guard"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2681:27 [INFO] [stdout] | [INFO] [stdout] 2681 | self.expect_ident(&"else", true).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `"else"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2701:39 [INFO] [stdout] | [INFO] [stdout] 2701 | let start = self.expect_ident(&"sizeof", true).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `"sizeof"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/parser.rs:2725:16 [INFO] [stdout] | [INFO] [stdout] 2725 | ... if let Ok(_) = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)) { [INFO] [stdout] | -------^^^^^--------------------------------------------------------------------------------------------------------------------------- help: try: `if self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().current_line)).is_ok()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2725:42 [INFO] [stdout] | [INFO] [stdout] 2725 | ... if let Ok(_) = self.expect_chars(&"=", true, &LineInfo::new_one_char(self.lexer.state().current_char, self.lexer.state().cur... [INFO] [stdout] | ^^^^ help: change this to: `"="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:2743:39 [INFO] [stdout] | [INFO] [stdout] 2743 | let start = self.expect_ident(&"break", true).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"break"` [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] [stderr] error: could not compile `mosaic-lang` (bin "msc" test) due to 2 previous errors; 280 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: using `clone` on type `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:103:37 [INFO] [stdout] | [INFO] [stdout] 103 | Token::Char(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:104:39 [INFO] [stdout] | [INFO] [stdout] 104 | Token::String(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:105:38 [INFO] [stdout] | [INFO] [stdout] 105 | Token::Ident(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:106:39 [INFO] [stdout] | [INFO] [stdout] 106 | Token::Number(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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 `LineInfo` which implements the `Copy` trait [INFO] [stdout] --> src/tokens.rs:108:37 [INFO] [stdout] | [INFO] [stdout] 108 | Token::Byte(_, info) => info.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*info` [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] [stderr] error: could not compile `mosaic-lang` (bin "msc") due to 1 previous error; 282 warnings emitted [INFO] running `Command { std: "docker" "inspect" "744a9dc423c4037a4551078ae2c69010c3df4397ed556f88f1def2cc8575c166", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "744a9dc423c4037a4551078ae2c69010c3df4397ed556f88f1def2cc8575c166", kill_on_drop: false }` [INFO] [stdout] 744a9dc423c4037a4551078ae2c69010c3df4397ed556f88f1def2cc8575c166