[INFO] cloning repository https://github.com/spade-lang/spade [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/spade-lang/spade" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fspade-lang%2Fspade", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fspade-lang%2Fspade'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a2d24eac9eb0d31cd5b4b45eda8c2401a7e92fdf [INFO] linting spade-lang/spade against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fspade-lang%2Fspade" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/spade-lang/spade [INFO] finished tweaking git repo https://github.com/spade-lang/spade [INFO] tweaked toml for git repo https://github.com/spade-lang/spade written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/spade-lang/spade 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/spade-lang/spade 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] Updating git repository `https://gitlab.com/spade-lang/swim.git` [INFO] [stderr] Updating git submodule `https://gitlab.com/spade-lang/spade.git` [INFO] [stderr] Updating git submodule `https://gitlab.com/TheZoq2/vatch.git` [INFO] [stderr] Updating git repository `https://gitlab.com/surfer-project/surfer.git` [INFO] [stderr] Updating git submodule `https://github.com/jkarns275/f128.git` [INFO] [stderr] Updating git submodule `https://github.com/ics-jku/instruction-decoder.git` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Downloaded target-triple v1.0.0 [INFO] [stderr] Downloaded spade-codespan v0.12.0 [INFO] [stderr] Downloaded recursive v0.1.1 [INFO] [stderr] Downloaded spade-codespan-reporting v0.12.0 [INFO] [stderr] Downloaded doc-comment v0.3.4 [INFO] [stderr] Downloaded tracing-tree v0.4.1 [INFO] [stderr] Downloaded extism-manifest v1.13.0 [INFO] [stderr] Downloaded vcd v0.6.1 [INFO] [stderr] Downloaded tower-lsp-macros v0.6.0 [INFO] [stderr] Downloaded extism-pdk-derive v1.4.1 [INFO] [stderr] Downloaded markup5ever v0.35.0 [INFO] [stderr] Downloaded extism-convert-macros v1.13.0 [INFO] [stderr] Downloaded pyo3-macros v0.21.2 [INFO] [stderr] Downloaded nesty v0.2.0 [INFO] [stderr] Downloaded extism-convert v1.13.0 [INFO] [stderr] Downloaded local-impl v0.1.2 [INFO] [stderr] Downloaded argh_shared v0.1.13 [INFO] [stderr] Downloaded cxxbridge-flags v1.0.192 [INFO] [stderr] Downloaded ansi-escapes v0.2.0 [INFO] [stderr] Downloaded manyhow-macros v0.11.4 [INFO] [stderr] Downloaded askama_macros v0.15.1 [INFO] [stderr] Downloaded match_token v0.35.0 [INFO] [stderr] Downloaded serde_ignored v0.1.14 [INFO] [stderr] Downloaded trybuild v1.0.114 [INFO] [stderr] Downloaded serde_stacker v0.1.14 [INFO] [stderr] Downloaded pyo3-build-config v0.21.2 [INFO] [stderr] Downloaded argh v0.1.13 [INFO] [stderr] Downloaded xdg v2.5.2 [INFO] [stderr] Downloaded assert_fs v1.1.3 [INFO] [stderr] Downloaded auto_impl v0.5.0 [INFO] [stderr] Downloaded rmp-serde v1.3.1 [INFO] [stderr] Downloaded askama v0.15.1 [INFO] [stderr] Downloaded archery v1.2.2 [INFO] [stderr] Downloaded manyhow v0.11.4 [INFO] [stderr] Downloaded ammonia v4.1.2 [INFO] [stderr] Downloaded argh_derive v0.1.13 [INFO] [stderr] Downloaded insta v1.46.0 [INFO] [stderr] Downloaded lsp-types v0.93.2 [INFO] [stderr] Downloaded tower-lsp v0.17.0 [INFO] [stderr] Downloaded cssparser v0.35.0 [INFO] [stderr] Downloaded pyo3-macros-backend v0.21.2 [INFO] [stderr] Downloaded pyo3-ffi v0.21.2 [INFO] [stderr] Downloaded cxxbridge-macro v1.0.192 [INFO] [stderr] Downloaded html5ever v0.35.0 [INFO] [stderr] Downloaded cxxbridge-cmd v1.0.192 [INFO] [stderr] Downloaded askama_parser v0.15.1 [INFO] [stderr] Downloaded cxx-build v1.0.192 [INFO] [stderr] Downloaded zip v5.1.1 [INFO] [stderr] Downloaded imbl v6.1.0 [INFO] [stderr] Downloaded askama_derive v0.15.1 [INFO] [stderr] Downloaded prettydiff v0.9.0 [INFO] [stderr] Downloaded cxx v1.0.192 [INFO] [stderr] Downloaded lzma-rust2 v0.13.0 [INFO] [stderr] Downloaded extism-pdk v1.4.1 [INFO] [stderr] Downloaded pyo3 v0.21.2 [INFO] [stderr] Downloaded spdx v0.10.9 [INFO] [stderr] Downloaded rust-fuzzy-search v0.1.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] ebdd7228a0fdc7e618f968b020ccdc089672be65bc7a9703545b783eae2d0a99 [INFO] running `Command { std: "docker" "start" "-a" "ebdd7228a0fdc7e618f968b020ccdc089672be65bc7a9703545b783eae2d0a99", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ebdd7228a0fdc7e618f968b020ccdc089672be65bc7a9703545b783eae2d0a99", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ebdd7228a0fdc7e618f968b020ccdc089672be65bc7a9703545b783eae2d0a99", kill_on_drop: false }` [INFO] [stdout] ebdd7228a0fdc7e618f968b020ccdc089672be65bc7a9703545b783eae2d0a99 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 6cffd533a45db8e02dbc54c7127a9d468947834ba10e040b5d6f1b051a906383 [INFO] running `Command { std: "docker" "start" "-a" "6cffd533a45db8e02dbc54c7127a9d468947834ba10e040b5d6f1b051a906383", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling memchr v2.7.6 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling regex-syntax v0.8.8 [INFO] [stderr] Checking bumpalo v3.19.1 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking nesty v0.2.0 [INFO] [stderr] Compiling owo-colors v4.2.3 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Compiling stacker v0.1.22 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Compiling object v0.32.2 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking bitmaps v3.2.1 [INFO] [stderr] Compiling indoc v2.0.7 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking archery v1.2.2 [INFO] [stderr] Checking rand_xoshiro v0.7.0 [INFO] [stderr] Checking indenter v0.3.4 [INFO] [stderr] Compiling color-spantrace v0.3.0 [INFO] [stderr] Checking eyre v0.6.12 [INFO] [stderr] Checking imbl-sized-chunks v0.1.3 [INFO] [stderr] Checking object v0.37.3 [INFO] [stderr] Compiling tikv-jemalloc-sys v0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 [INFO] [stderr] Compiling typeid v1.0.3 [INFO] [stderr] Compiling winnow v0.7.14 [INFO] [stderr] Compiling siphasher v1.0.1 [INFO] [stderr] Compiling phf_shared v0.11.3 [INFO] [stderr] Compiling pyo3-build-config v0.21.2 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Compiling ar_archive_writer v0.2.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling portable-atomic v1.13.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling psm v0.1.28 [INFO] [stderr] Checking backtrace v0.3.76 [INFO] [stderr] Compiling logos-codegen v0.16.0 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Compiling camino v1.2.2 [INFO] [stderr] Checking rustix v1.1.3 [INFO] [stderr] Compiling pyo3-ffi v0.21.2 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Compiling string_cache_codegen v0.5.4 [INFO] [stderr] Compiling phf_codegen v0.11.3 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Compiling web_atoms v0.1.3 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling spade-macros v0.17.0 (/opt/rustwide/workdir/spade-macros) [INFO] [stderr] Compiling logos-derive v0.16.0 [INFO] [stderr] Compiling local-impl v0.1.2 [INFO] [stderr] Compiling derive-where v1.6.0 [INFO] [stderr] Checking logos v0.16.0 [INFO] [stderr] Compiling recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Checking recursive v0.1.1 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking cobs v0.3.0 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling pulldown-cmark v0.13.0 [INFO] [stderr] Checking tracing-error v0.2.1 [INFO] [stderr] Checking tracing-tree v0.4.1 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking color-eyre v0.6.5 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Checking unindent v0.2.4 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking heapless v0.7.17 [INFO] [stderr] Checking spade-codespan-reporting v0.12.0 [INFO] [stderr] Checking imbl v6.1.0 [INFO] [stderr] Checking ron v0.12.0 [INFO] [stderr] Checking postcard v1.1.3 [INFO] [stderr] Checking spade-codespan v0.12.0 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Compiling proc-macro-utils v0.10.0 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Checking futf v0.1.5 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Compiling pyo3-macros-backend v0.21.2 [INFO] [stderr] Checking spade-common v0.17.0 (/opt/rustwide/workdir/spade-common) [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-common/src/interning.rs:9:57 [INFO] [stdout] | [INFO] [stdout] 9 | pub static INTERNER: LazyLock = LazyLock::new(|| Interner::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Interner::new` [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: you should consider adding a `Default` implementation for `Interner` [INFO] [stdout] --> spade-common/src/interning.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new() -> Self { [INFO] [stdout] 17 | | Self { [INFO] [stdout] 18 | | inner: Mutex::new(( [INFO] [stdout] 19 | | FxHashSet::with_capacity_and_hasher(256, FxBuildHasher::default()), [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 + impl Default for Interner { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> spade-common/src/interning.rs:19:58 [INFO] [stdout] | [INFO] [stdout] 19 | FxHashSet::with_capacity_and_hasher(256, FxBuildHasher::default()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 19 - FxHashSet::with_capacity_and_hasher(256, FxBuildHasher::default()), [INFO] [stdout] 19 + FxHashSet::with_capacity_and_hasher(256, FxBuildHasher), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LocMap` [INFO] [stdout] --> spade-common/src/loc_map.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | inner: HashMap::new(), [INFO] [stdout] 18 | | } [INFO] [stdout] 19 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 + impl Default for LocMap { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> spade-common/src/loc_map.rs:28:14 [INFO] [stdout] | [INFO] [stdout] 28 | .or_insert(Default::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> spade-common/src/loc_map.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | .or_insert(Default::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> spade-common/src/loc_map.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | .or_insert(Default::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> spade-common/src/loc_map.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|(start, ends)| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 39 | | ends.range(loc.span.end()..) [INFO] [stdout] 40 | | .map(|(end, things)| { [INFO] [stdout] 41 | | let with_locs = things.iter().map(|thing| { [INFO] [stdout] ... | [INFO] [stdout] 47 | | }) [INFO] [stdout] 48 | | .flatten() [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] 38 ~ .flat_map(|(start, ends)| { [INFO] [stdout] 39 + ends.range(loc.span.end()..) [INFO] [stdout] 40 + .map(|(end, things)| { [INFO] [stdout] 41 + let with_locs = things.iter().map(|thing| { [INFO] [stdout] 42 + Loc::new(thing, Span::new(*start, *end), loc.file_id) [INFO] [stdout] 43 + }); [INFO] [stdout] 44 + with_locs [INFO] [stdout] 45 + }) [INFO] [stdout] 46 + .flatten() [INFO] [stdout] 47 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> spade-common/src/loc_map.rs:40:30 [INFO] [stdout] | [INFO] [stdout] 40 | ... .map(|(end, things)| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 41 | | ... let with_locs = things.iter().map(|thing| { [INFO] [stdout] 42 | | ... Loc::new(thing, Span::new(*start, *end), loc.file_id) [INFO] [stdout] 43 | | ... }); [INFO] [stdout] 44 | | ... with_locs [INFO] [stdout] 45 | | ... }) [INFO] [stdout] 46 | | ... .flatten() [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] 40 ~ .flat_map(|(end, things)| { [INFO] [stdout] 41 + let with_locs = things.iter().map(|thing| { [INFO] [stdout] 42 + Loc::new(thing, Span::new(*start, *end), loc.file_id) [INFO] [stdout] 43 + }); [INFO] [stdout] 44 + with_locs [INFO] [stdout] 45 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-common/src/name.rs:176:45 [INFO] [stdout] | [INFO] [stdout] 176 | .map(|x| PathSegment::Named((*x).clone())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*(*x)` [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> spade-common/src/name.rs:279:1 [INFO] [stdout] | [INFO] [stdout] 279 | / impl std::cmp::PartialOrd for NameID { [INFO] [stdout] 280 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 281 | | Some(self.0.cmp(&other.0)) [INFO] [stdout] 282 | | } [INFO] [stdout] 283 | | } [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] 280 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 281 - Some(self.0.cmp(&other.0)) [INFO] [stdout] 282 - } [INFO] [stdout] 280 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling toml_parser v1.0.6+spec-1.1.0 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking spade-diagnostics v0.17.0 (/opt/rustwide/workdir/spade-diagnostics) [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> spade-diagnostics/src/diag_list.rs:36:53 [INFO] [stdout] | [INFO] [stdout] 36 | std::backtrace::Backtrace::capture().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking spade-types v0.17.0 (/opt/rustwide/workdir/spade-types) [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> spade-types/src/meta_types.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / if self > other { [INFO] [stdout] 63 | | false [INFO] [stdout] 64 | | } else { [INFO] [stdout] 65 | | true [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self <= other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> spade-types/src/lib.rs:78:36 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn assume_array(&self) -> (&Box, &BigInt) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `&ConcreteType` [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] [stderr] Checking spade-hir v0.17.0 (/opt/rustwide/workdir/spade-hir) [INFO] [stderr] Checking spade-ast v0.17.0 (/opt/rustwide/workdir/spade-ast) [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-ast/src/lib.rs:145:1 [INFO] [stdout] | [INFO] [stdout] 145 | / pub enum NamedArgument { [INFO] [stdout] 146 | | Full(Loc, Loc), [INFO] [stdout] | | -------------------------------------- the largest variant contains at least 256 bytes [INFO] [stdout] 147 | | /// Binds a local variable to an argument with the same name [INFO] [stdout] 148 | | Short(Loc), [INFO] [stdout] | | ---------------------- the second-largest variant contains at least 32 bytes [INFO] [stdout] 149 | | } [INFO] [stdout] | |_^ the entire enum is at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 146 - Full(Loc, Loc), [INFO] [stdout] 146 + Full(Loc, Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-ast/src/lib.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | / pub enum WhereClause { [INFO] [stdout] 169 | | / GenericInt { [INFO] [stdout] 170 | | | target: Loc, [INFO] [stdout] 171 | | | kind: Inequality, [INFO] [stdout] 172 | | | expression: Loc, [INFO] [stdout] 173 | | | if_unsatisfied: Option, [INFO] [stdout] 174 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 289 bytes [INFO] [stdout] 175 | | / TraitBounds { [INFO] [stdout] 176 | | | target: Loc, [INFO] [stdout] 177 | | | traits: Vec>, [INFO] [stdout] 178 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 64 bytes [INFO] [stdout] 179 | | } [INFO] [stdout] | |___^ the entire enum is at least 304 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 172 - expression: Loc, [INFO] [stdout] 172 + expression: Box>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-ast/src/lib.rs:356:19 [INFO] [stdout] | [INFO] [stdout] 356 | branches: Loc, Option>, Loc)>>, [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: large size difference between variants [INFO] [stdout] --> spade-ast/src/lib.rs:526:1 [INFO] [stdout] | [INFO] [stdout] 526 | / pub enum Statement { [INFO] [stdout] 527 | | Label(Loc), [INFO] [stdout] 528 | | Declaration(Vec>), [INFO] [stdout] 529 | | Binding(Binding), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 448 bytes [INFO] [stdout] ... | [INFO] [stdout] 532 | | Register(Loc), [INFO] [stdout] | | ----------------------- the largest variant contains at least 1360 bytes [INFO] [stdout] ... | [INFO] [stdout] 539 | | Assert(Loc), [INFO] [stdout] 540 | | } [INFO] [stdout] | |_^ the entire enum is at least 1360 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 532 - Register(Loc), [INFO] [stdout] 532 + Register(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-ast/src/lib.rs:620:1 [INFO] [stdout] | [INFO] [stdout] 620 | / pub enum Attribute { [INFO] [stdout] 621 | | SpadecParenSugar, [INFO] [stdout] 622 | | VerilogAttrs { [INFO] [stdout] 623 | | entries: Vec<(Loc, Option>)>, [INFO] [stdout] ... | [INFO] [stdout] 628 | | / Deprecated { [INFO] [stdout] 629 | | | since: Option>, [INFO] [stdout] 630 | | | note: Option>, [INFO] [stdout] 631 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 80 bytes [INFO] [stdout] ... | [INFO] [stdout] 643 | | / WalTrace { [INFO] [stdout] 644 | | | clk: Option>, [INFO] [stdout] 645 | | | rst: Option>, [INFO] [stdout] 646 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 448 bytes [INFO] [stdout] ... | [INFO] [stdout] 655 | | Inline, [INFO] [stdout] 656 | | } [INFO] [stdout] | |___^ the entire enum is at least 448 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 645 - rst: Option>, [INFO] [stdout] 645 + rst: Box>>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking spade-mir v0.17.0 (/opt/rustwide/workdir/spade-mir) [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-ast/src/lib.rs:896:1 [INFO] [stdout] | [INFO] [stdout] 896 | / pub enum Item { [INFO] [stdout] 897 | | Unit(Loc), [INFO] [stdout] | | --------------- the largest variant contains at least 688 bytes [INFO] [stdout] 898 | | TraitDef(Loc), [INFO] [stdout] 899 | | Type(Loc), [INFO] [stdout] ... | [INFO] [stdout] 903 | | ImplBlock(Loc), [INFO] [stdout] | | ------------------------- the second-largest variant contains at least 304 bytes [INFO] [stdout] 904 | | } [INFO] [stdout] | |_^ the entire enum is at least 688 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 897 - Unit(Loc), [INFO] [stdout] 897 + Unit(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking spade-parser v0.17.0 (/opt/rustwide/workdir/spade-parser) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> spade-hir/src/symbol_table.rs:749:17 [INFO] [stdout] | [INFO] [stdout] 749 | loc: loc, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> spade-hir/src/symbol_table.rs:775:13 [INFO] [stdout] | [INFO] [stdout] 775 | id_tracker: id_tracker, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `id_tracker` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> spade-mir/src/diff.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / /// Functions for diffing and comparing mir code while ignoring exact variable IDs [INFO] [stdout] 15 | | [INFO] [stdout] | |_^ [INFO] [stdout] 16 | pub struct VarMap { [INFO] [stdout] | ----------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> spade-mir/src/macros.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / /// Requires the crate to be in scope, i.e. `use spade_mir;` [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | #[macro_export] [INFO] [stdout] 5 | macro_rules! value_name { [INFO] [stdout] | ----------------------- the comment documents this macro definition [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Macros for writing mir. [INFO] [stdout] 2 ~ //! Requires the crate to be in scope, i.e. `use spade_mir;` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking url v2.5.8 [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> spade-mir/src/aliasing.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | / !(binding.operator == Operator::Alias [INFO] [stdout] 120 | | && final_aliases.contains_key(&binding.operands[0])) [INFO] [stdout] 121 | | && !(binding.operator == Operator::Alias [INFO] [stdout] 122 | | && final_aliases.contains_key(&binding.name)) [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 - !(binding.operator == Operator::Alias [INFO] [stdout] 120 - && final_aliases.contains_key(&binding.operands[0])) [INFO] [stdout] 121 - && !(binding.operator == Operator::Alias [INFO] [stdout] 122 - && final_aliases.contains_key(&binding.name)) [INFO] [stdout] 119 + !(binding.operator == Operator::Alias && final_aliases.contains_key(&binding.operands[0]) || binding.operator == Operator::Alias && final_aliases.contains_key(&binding.name)) [INFO] [stdout] | [INFO] [stdout] 119 - !(binding.operator == Operator::Alias [INFO] [stdout] 120 - && final_aliases.contains_key(&binding.operands[0])) [INFO] [stdout] 121 - && !(binding.operator == Operator::Alias [INFO] [stdout] 122 - && final_aliases.contains_key(&binding.name)) [INFO] [stdout] 119 + binding.operator != Operator::Alias || !final_aliases.contains_key(&binding.operands[0]) && !final_aliases.contains_key(&binding.name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-mir/src/codegen/mod.rs:444:33 [INFO] [stdout] | [INFO] [stdout] 444 | Operator::ConstructArray { .. } => { [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-mir/src/codegen/mod.rs:473:17 [INFO] [stdout] | [INFO] [stdout] 473 | format!("{}", op_names[0]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `op_names[0].to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-mir/src/codegen/mod.rs:989:77 [INFO] [stdout] | [INFO] [stdout] 989 | ... if param_string.is_empty() { "".into() } else { format!("{}", param_string)}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `param_string.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-mir/src/codegen/mod.rs:1398:19 [INFO] [stdout] | [INFO] [stdout] 1398 | body.join(&statement_declaration(stmt, source_code, &mut name_map)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `statement_declaration(stmt, source_code, &mut name_map)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-mir/src/codegen/mod.rs:1401:19 [INFO] [stdout] | [INFO] [stdout] 1401 | body.join(&statement_code(stmt, &mut ctx)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `statement_code(stmt, &mut ctx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> spade-mir/src/diff.rs:249:41 [INFO] [stdout] | [INFO] [stdout] 249 | var_map.try_update_name(&*e1, &*e2) [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `e1` [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] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> spade-mir/src/diff.rs:249:47 [INFO] [stdout] | [INFO] [stdout] 249 | var_map.try_update_name(&*e1, &*e2) [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `e2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-mir/src/diff_printing.rs:158:49 [INFO] [stdout] | [INFO] [stdout] 158 | let name = translate_val_name(name, &lhs_trans, &rhs_trans); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `lhs_trans` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-mir/src/diff_printing.rs:158:61 [INFO] [stdout] | [INFO] [stdout] 158 | let name = translate_val_name(name, &lhs_trans, &rhs_trans); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `rhs_trans` [INFO] [stdout] | [INFO] [stdout] = 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 use of `format!` [INFO] [stdout] --> spade-mir/src/diff_printing.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | format!("Error") [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Error".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> spade-mir/src/passes/auto_clock_gating.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | variants: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - variants: &Vec>, [INFO] [stdout] 12 + variants: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> spade-mir/src/passes/auto_clock_gating.rs:54:43 [INFO] [stdout] | [INFO] [stdout] 54 | if variants.len() == 2 && variants[0].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `variants[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-mir/src/passes/deduplicate_mut_wires.rs:38:29 [INFO] [stdout] | [INFO] [stdout] 38 | Operator::IndexArray { .. } [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-mir/src/passes/deduplicate_mut_wires.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | | Operator::SignExtend { .. } [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-mir/src/passes/deduplicate_mut_wires.rs:90:31 [INFO] [stdout] | [INFO] [stdout] 90 | | Operator::ZeroExtend { .. } [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> spade-mir/src/passes/deduplicate_mut_wires.rs:143:10 [INFO] [stdout] | [INFO] [stdout] 143 | .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: redundant closure [INFO] [stdout] --> spade-mir/src/passes/deduplicate_mut_wires.rs:176:44 [INFO] [stdout] | [INFO] [stdout] 176 | target: target.map(|t| get_replacement(t)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&get_replacement` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-mir/src/passes/deduplicate_mut_wires.rs:177:42 [INFO] [stdout] | [INFO] [stdout] 177 | value: value.map(|v| get_replacement(v)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&get_replacement` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> spade-mir/src/passes/split_compound_regs.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | members: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 33 - members: &Vec, [INFO] [stdout] 33 + members: &[Type], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> spade-mir/src/renaming.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 198 | / reset.as_mut().map(|(trig, val)| { [INFO] [stdout] 199 | | *trig = state.get(trig); [INFO] [stdout] 200 | | *val = state.get(val); [INFO] [stdout] 201 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 198 - reset.as_mut().map(|(trig, val)| { [INFO] [stdout] 199 - *trig = state.get(trig); [INFO] [stdout] 200 - *val = state.get(val); [INFO] [stdout] 201 - }); [INFO] [stdout] 198 + if let Some((trig, val)) = reset.as_mut() { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> spade-mir/src/renaming.rs:203:21 [INFO] [stdout] | [INFO] [stdout] 203 | traced.as_mut().map(|traced| *traced = state.get(traced)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 203 - traced.as_mut().map(|traced| *traced = state.get(traced)); [INFO] [stdout] 203 + if let Some(traced) = traced.as_mut() { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> spade-mir/src/types.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / match self { [INFO] [stdout] 106 | | Type::Tuple(unit) if unit.is_empty() => false, [INFO] [stdout] 107 | | _ => true, [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 105 - match self { [INFO] [stdout] 106 - Type::Tuple(unit) if unit.is_empty() => false, [INFO] [stdout] 107 - _ => true, [INFO] [stdout] 108 - } [INFO] [stdout] 105 + !matches!(self, Type::Tuple(unit) if unit.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> spade-mir/src/verilator_wrapper.rs:228:24 [INFO] [stdout] | [INFO] [stdout] 228 | [0] if size_u64 % 32 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `!size_u64.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling pyo3 v0.21.2 [INFO] [stderr] Compiling toml_datetime v0.7.5+spec-1.1.0 [INFO] [stderr] Checking vcd v0.6.1 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Checking tendril v0.4.3 [INFO] [stderr] Compiling itertools v0.14.0 [INFO] [stderr] Compiling pyo3-macros v0.21.2 [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-hir/src/expression.rs:231:30 [INFO] [stdout] | [INFO] [stdout] 231 | verilog_attr_groups: Vec, Option>)>>, [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-hir/src/expression.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | Vec<(Loc, Option>, Loc)>, [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] [stderr] Compiling askama_parser v0.15.1 [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> spade-hir/src/expression.rs:317:5 [INFO] [stdout] | [INFO] [stdout] 317 | pub fn assume_block(&self) -> std::result::Result<&Block, ()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ImplTab` [INFO] [stdout] --> spade-hir/src/impl_tab.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | Self { [INFO] [stdout] 22 | | inner: HashMap::default(), [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 + impl Default for ImplTab { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-hir/src/param_util.rs:110:35 [INFO] [stdout] | [INFO] [stdout] 110 | Diagnostic::error(&name, format!("No such argument: {name}")) [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-hir/src/param_util.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | Diagnostic::error(&new, format!("{new} specified multiple times")) [INFO] [stdout] | ^^^^ help: change this to: `new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-hir/src/param_util.rs:149:5 [INFO] [stdout] | [INFO] [stdout] 149 | Vec<(&'a Loc, &'a TypeLike, Option<&'a Loc>)>, [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: using `clone` on type `Option<&Loc>` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/param_util.rs:173:22 [INFO] [stdout] | [INFO] [stdout] 173 | Some(default.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*default` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/param_util.rs:264:53 [INFO] [stdout] | [INFO] [stdout] 264 | ... .map(|(name, _, _)| name.inner.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/param_util.rs:294:34 [INFO] [stdout] | [INFO] [stdout] 294 | ... new: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/param_util.rs:298:34 [INFO] [stdout] | [INFO] [stdout] 298 | bound.insert(target.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/param_util.rs:304:35 [INFO] [stdout] | [INFO] [stdout] 304 | ... name: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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] --> spade-hir/src/param_util.rs:329:59 [INFO] [stdout] | [INFO] [stdout] 329 | if let Some(default) = params.arg_default(&name).unwrap() { [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir/src/param_util.rs:330:50 [INFO] [stdout] | [INFO] [stdout] 330 | let index = params.arg_index(&name).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir/src/param_util.rs:331:63 [INFO] [stdout] | [INFO] [stdout] 331 | let target_type = params.try_get_arg_type(&name).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir/src/pretty_debug.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 124 | if self.0.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.0.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | format!("[attribute list omitted]") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[attribute list omitted]".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:164:39 [INFO] [stdout] | [INFO] [stdout] 164 | TypeSpec::TraitSelf(_) => format!("Self"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Self".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:165:38 [INFO] [stdout] | [INFO] [stdout] 165 | TypeSpec::Wildcard(_) => format!("_"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:193:17 [INFO] [stdout] | [INFO] [stdout] 193 | format!("{}", inner.pretty_debug()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `inner.pretty_debug().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | format!("{}", inner.pretty_debug()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `inner.pretty_debug().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:354:18 [INFO] [stdout] | [INFO] [stdout] 354 | } => format!("[pipeline ref omitted]"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[pipeline ref omitted]".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:384:44 [INFO] [stdout] | [INFO] [stdout] 384 | crate::ExprKind::StageValid => format!("stage.valid"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"stage.valid".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:385:44 [INFO] [stdout] | [INFO] [stdout] 385 | crate::ExprKind::StageReady => format!("stage.ready"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"stage.ready".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:387:17 [INFO] [stdout] | [INFO] [stdout] 387 | format!("") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:389:38 [INFO] [stdout] | [INFO] [stdout] 389 | crate::ExprKind::Null => format!(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:527:48 [INFO] [stdout] | [INFO] [stdout] 527 | Statement::PipelineRegMarker(_) => format!("[pipeline reg marker]"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[pipeline reg marker]".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_debug.rs:533:46 [INFO] [stdout] | [INFO] [stdout] 533 | Statement::WalSuffixed { .. } => format!("[val suffixed]"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[val suffixed]".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_print.rs:65:38 [INFO] [stdout] | [INFO] [stdout] 65 | ... .map(|t| format!("{}", t.pretty_print())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.pretty_print().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_print.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | format!("{}", inner.pretty_print()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `inner.pretty_print().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_print.rs:135:17 [INFO] [stdout] | [INFO] [stdout] 135 | format!("{}", inner.pretty_print()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `inner.pretty_print().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_print.rs:204:39 [INFO] [stdout] | [INFO] [stdout] 204 | TypeSpec::TraitSelf(_) => format!("self"), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"self".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/pretty_print.rs:205:38 [INFO] [stdout] | [INFO] [stdout] 205 | TypeSpec::Wildcard(_) => format!("_"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-hir/src/query.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / pub enum Thing { [INFO] [stdout] 19 | | Pattern(Pattern), [INFO] [stdout] 20 | | Expr(Expression), [INFO] [stdout] 21 | | Statement(Statement), [INFO] [stdout] | | -------------------- the largest variant contains at least 2768 bytes [INFO] [stdout] 22 | | Executable(ExecutableItem), [INFO] [stdout] | | -------------------------- the second-largest variant contains at least 1120 bytes [INFO] [stdout] 23 | | } [INFO] [stdout] | |_^ the entire enum is at least 2768 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 21 - Statement(Statement), [INFO] [stdout] 21 + Statement(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> spade-hir/src/query.rs:66:26 [INFO] [stdout] | [INFO] [stdout] 66 | self.ids.get(&id).map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir/src/query.rs:180:43 [INFO] [stdout] | [INFO] [stdout] 180 | self.visit_statements(&stmt) [INFO] [stdout] | ^^^^^ help: change this to: `stmt` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir/src/query.rs:237:40 [INFO] [stdout] | [INFO] [stdout] 237 | self.visit_pattern(&pat); [INFO] [stdout] | ^^^^ help: change this to: `pat` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir/src/query.rs:242:40 [INFO] [stdout] | [INFO] [stdout] 242 | self.visit_pattern(&pat); [INFO] [stdout] | ^^^^ help: change this to: `pat` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir/src/query.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | self.visit_pattern(&pat); [INFO] [stdout] | ^^^^ help: change this to: `pat` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:244:19 [INFO] [stdout] | [INFO] [stdout] 244 | name: self.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:271:19 [INFO] [stdout] | [INFO] [stdout] 271 | name: self.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.name` [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: large size difference between variants [INFO] [stdout] --> spade-hir/src/symbol_table.rs:296:1 [INFO] [stdout] | [INFO] [stdout] 296 | / pub enum Thing { [INFO] [stdout] 297 | | /// Definition of a named type [INFO] [stdout] 298 | | Struct(Loc), [INFO] [stdout] 299 | | EnumVariant(Loc), [INFO] [stdout] | | ----------------------------- the second-largest variant contains at least 272 bytes [INFO] [stdout] 300 | | Unit(Loc), [INFO] [stdout] | | ------------------- the largest variant contains at least 480 bytes [INFO] [stdout] ... | [INFO] [stdout] 315 | | Dummy, [INFO] [stdout] 316 | | } [INFO] [stdout] | |_^ the entire enum is at least 480 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 300 - Unit(Loc), [INFO] [stdout] 300 + Unit(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-hir/src/symbol_table.rs:425:31 [INFO] [stdout] | [INFO] [stdout] 425 | TypeDeclKind::Enum { .. } => "enum".to_string(), [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-hir/src/symbol_table.rs:427:32 [INFO] [stdout] | [INFO] [stdout] 427 | TypeDeclKind::Alias { .. } => "type alias".to_string(), [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:731:53 [INFO] [stdout] | [INFO] [stdout] 731 | self.ensure_is_unique(&Path::ident_with_loc(name.clone()))?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:744:53 [INFO] [stdout] | [INFO] [stdout] 744 | self.ensure_is_unique(&Path::ident_with_loc(name.clone()))?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:785:25 [INFO] [stdout] | [INFO] [stdout] 785 | Path::ident(name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:803:68 [INFO] [stdout] | [INFO] [stdout] 803 | if let Some(id) = self.try_lookup_id(&Path::ident_with_loc(ident.clone()), false) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:812:51 [INFO] [stdout] | [INFO] [stdout] 812 | let name_id = self.add_local_variable(ident.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:822:32 [INFO] [stdout] | [INFO] [stdout] 822 | let path = Path::ident(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:860:57 [INFO] [stdout] | [INFO] [stdout] 860 | DeclarationState::Undefined(_) => Some((ident.clone(), state.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir/src/symbol_table.rs:861:59 [INFO] [stdout] | [INFO] [stdout] 861 | DeclarationState::Undecleared(_) => Some((ident.clone(), state.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-hir/src/symbol_table.rs:872:10 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 872 | ) -> Result<(NameID, &Thing), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-hir/src/symbol_table.rs:888:10 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 888 | ) -> Result<(NameID, &Thing), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:897:10 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 897 | ) -> Result<(NameID, &Thing), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:934:18 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 934 | ) -> Result<(NameID, Loc<$result>), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 972 | / thing_accessors! { [INFO] [stdout] 973 | | unit_by_id, lookup_unit, lookup_unit_in_namespace, UnitHead, NotAUnit { [INFO] [stdout] 974 | | Thing::Unit(head) => head.clone(), [INFO] [stdout] 975 | | Thing::EnumVariant(variant) => variant.as_unit_head().at_loc(variant), [INFO] [stdout] ... | [INFO] [stdout] 997 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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: this warning originates in the macro `thing_accessors` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-hir/src/symbol_table.rs:958:18 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 958 | ) -> Result<(NameID, Loc<$result>), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 972 | / thing_accessors! { [INFO] [stdout] 973 | | unit_by_id, lookup_unit, lookup_unit_in_namespace, UnitHead, NotAUnit { [INFO] [stdout] 974 | | Thing::Unit(head) => head.clone(), [INFO] [stdout] 975 | | Thing::EnumVariant(variant) => variant.as_unit_head().at_loc(variant), [INFO] [stdout] ... | [INFO] [stdout] 997 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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: this warning originates in the macro `thing_accessors` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-hir/src/symbol_table.rs:1018:10 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 1018 | ) -> Result<(NameID, Loc), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:1079:56 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 1079 | pub fn lookup_variable(&self, name: &Loc) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:1096:60 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 1096 | pub fn try_lookup_variable(&self, name: &Loc) -> Result, LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:1121:72 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 1121 | pub fn lookup_id(&self, name: &Loc, check_metadata: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:1132:10 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 1132 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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] --> spade-hir/src/symbol_table.rs:1192:10 [INFO] [stdout] | [INFO] [stdout] 24 | NotATypeSymbol(Loc, Thing), [INFO] [stdout] | -------------------------------- the largest variant contains at least 520 bytes [INFO] [stdout] 25 | NotAVariable(Loc, Thing), [INFO] [stdout] | ------------------------------ the variant `NotAVariable` contains at least 520 bytes [INFO] [stdout] 26 | NotAUnit(Loc, Thing), [INFO] [stdout] | -------------------------- the variant `NotAUnit` contains at least 520 bytes [INFO] [stdout] 27 | NotAnEnumVariant(Loc, Thing), [INFO] [stdout] | ---------------------------------- the variant `NotAnEnumVariant` contains at least 520 bytes [INFO] [stdout] 28 | NotAPatternableType(Loc, Thing), [INFO] [stdout] | ------------------------------------- the variant `NotAPatternableType` contains at least 520 bytes [INFO] [stdout] 29 | NotAStruct(Loc, Thing), [INFO] [stdout] | ---------------------------- the variant `NotAStruct` contains at least 520 bytes [INFO] [stdout] 30 | NotAValue(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotAValue` contains at least 520 bytes [INFO] [stdout] 31 | NotAComptimeValue(Loc, Thing), [INFO] [stdout] | ----------------------------------- the variant `NotAComptimeValue` contains at least 520 bytes [INFO] [stdout] 32 | NotATrait(Loc, Thing), [INFO] [stdout] | --------------------------- the variant `NotATrait` contains at least 520 bytes [INFO] [stdout] ... [INFO] [stdout] 36 | / NotVisible { [INFO] [stdout] 37 | | target_segment: PathSegment, [INFO] [stdout] 38 | | invisible_segment: PathSegment, [INFO] [stdout] 39 | | /// This is present if the reason the target item is invisible is because of a module [INFO] [stdout] ... | [INFO] [stdout] 47 | | suggest_modifications: bool, [INFO] [stdout] 48 | | }, [INFO] [stdout] | |_____- the variant `NotVisible` contains at least 153 bytes [INFO] [stdout] ... [INFO] [stdout] 1192 | ) -> Result<(usize, Path, Option>>), LookupError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `symbol_table::LookupError`, 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-hir/src/symbol_table.rs:1192:10 [INFO] [stdout] | [INFO] [stdout] 1192 | ) -> Result<(usize, Path, Option>>), LookupError> { [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: large size difference between variants [INFO] [stdout] --> spade-hir/src/lib.rs:174:1 [INFO] [stdout] | [INFO] [stdout] 174 | / pub enum PipelineRegMarkerExtra { [INFO] [stdout] 175 | | Condition(Loc), [INFO] [stdout] | | -------------------------- the largest variant contains at least 512 bytes [INFO] [stdout] 176 | |/ Count { [INFO] [stdout] 177 | || count: Loc, [INFO] [stdout] 178 | || count_typeexpr_id: ExprID, [INFO] [stdout] 179 | || }, [INFO] [stdout] | ||_____- the second-largest variant contains at least 96 bytes [INFO] [stdout] 180 | | } [INFO] [stdout] | |__^ the entire enum is at least 512 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 175 - Condition(Loc), [INFO] [stdout] 175 + Condition(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-hir/src/lib.rs:183:1 [INFO] [stdout] | [INFO] [stdout] 183 | / pub enum Statement { [INFO] [stdout] 184 | | Error, [INFO] [stdout] 185 | | Binding(Binding), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 1744 bytes [INFO] [stdout] 186 | | Expression(Loc), [INFO] [stdout] 187 | | Register(Register), [INFO] [stdout] | | ------------------ the largest variant contains at least 2768 bytes [INFO] [stdout] ... | [INFO] [stdout] 199 | | }, [INFO] [stdout] 200 | | } [INFO] [stdout] | |_^ the entire enum is at least 2768 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 187 - Register(Register), [INFO] [stdout] 187 + Register(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/lib.rs:449:54 [INFO] [stdout] | [INFO] [stdout] 449 | TypeSpec::Generic(Generic::Hidden(_)) => format!("(hidden generic)"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"(hidden generic)".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir/src/lib.rs:485:74 [INFO] [stdout] | [INFO] [stdout] 485 | .map(|e| e.inner.clone().replace_in(from, to).at_loc(&e)) [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir/src/lib.rs:487:29 [INFO] [stdout] | [INFO] [stdout] 487 | .at_loc(&tp) [INFO] [stdout] | ^^^ help: change this to: `tp` [INFO] [stdout] | [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] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling toml_edit v0.23.10+spec-1.0.0 [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-hir/src/lib.rs:918:1 [INFO] [stdout] | [INFO] [stdout] 918 | / pub enum Item { [INFO] [stdout] 919 | | Unit(Loc), [INFO] [stdout] | | --------------- the largest variant contains at least 1120 bytes [INFO] [stdout] 920 | | ExternUnit(UnitName, Loc), [INFO] [stdout] | | ----------------------------------- the second-largest variant contains at least 552 bytes [INFO] [stdout] 921 | | } [INFO] [stdout] | |_^ the entire enum is at least 1120 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 919 - Unit(Loc), [INFO] [stdout] 919 + Unit(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> spade-hir/src/lib.rs:935:1 [INFO] [stdout] | [INFO] [stdout] 935 | / pub enum ExecutableItem { [INFO] [stdout] 936 | | EnumInstance { base_enum: NameID, variant: usize }, [INFO] [stdout] 937 | | StructInstance, [INFO] [stdout] 938 | | Unit(Loc), [INFO] [stdout] | | --------------- the largest variant contains at least 1120 bytes [INFO] [stdout] 939 | | ExternUnit(UnitName, Loc), [INFO] [stdout] | | ----------------------------------- the second-largest variant contains at least 552 bytes [INFO] [stdout] 940 | | } [INFO] [stdout] | |_^ the entire enum is at least 1120 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 938 - Unit(Loc), [INFO] [stdout] 938 + Unit(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> spade-hir/src/lib.rs:977:1 [INFO] [stdout] | [INFO] [stdout] 977 | / impl std::cmp::PartialOrd for TraitName { [INFO] [stdout] 978 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 979 | | StrippedTraitName::from(self).partial_cmp(&StrippedTraitName::from(other)) [INFO] [stdout] 980 | | } [INFO] [stdout] 981 | | } [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] 978 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 979 - StrippedTraitName::from(self).partial_cmp(&StrippedTraitName::from(other)) [INFO] [stdout] 980 - } [INFO] [stdout] 978 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> spade-hir/src/lib.rs:1108:21 [INFO] [stdout] | [INFO] [stdout] 1108 | args.get(0) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> spade-hir/src/lib.rs:1119:21 [INFO] [stdout] | [INFO] [stdout] 1119 | args.get(0) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> spade-hir/src/lib.rs:1127:21 [INFO] [stdout] | [INFO] [stdout] 1127 | args.get(0) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir/src/lib.rs:1140:25 [INFO] [stdout] | [INFO] [stdout] 1140 | format!("") [INFO] [stdout] | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> spade-hir/src/lib.rs:1195:16 [INFO] [stdout] | [INFO] [stdout] 1195 | if let Some(_) = self.executables.get_key_value(&name) { [INFO] [stdout] | -------^^^^^^^---------------------------------------- help: try: `if self.executables.get_key_value(&name).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking spade-typeinference v0.17.0 (/opt/rustwide/workdir/spade-typeinference) [INFO] [stderr] Checking spade-ast-lowering v0.17.0 (/opt/rustwide/workdir/spade-ast-lowering) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> spade-typeinference/src/lib.rs:2677:5 [INFO] [stdout] | [INFO] [stdout] 2677 | / /// be updated even less often, but `unify` is a pretty natural point to do so. [INFO] [stdout] 2678 | | [INFO] [stdout] | |_^ [INFO] [stdout] 2679 | fn unify_inner( [INFO] [stdout] | -------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling manyhow-macros v0.11.4 [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> spade-ast-lowering/src/builtins.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | let mut id = std::u64::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 16 - let mut id = std::u64::MAX; [INFO] [stdout] 16 + let mut id = u64::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/builtins.rs:52:29 [INFO] [stdout] | [INFO] [stdout] 52 | ... a.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*a)` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/builtins.rs:67:29 [INFO] [stdout] | [INFO] [stdout] 67 | ... name.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*name)` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:49:74 [INFO] [stdout] | [INFO] [stdout] 49 | let path = ctx.symtab.current_namespace().push_ident(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:74:37 [INFO] [stdout] | [INFO] [stdout] 74 | Path::ident(name.clone()).at_loc(&name), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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] --> spade-ast-lowering/src/global_symbols.rs:74:58 [INFO] [stdout] | [INFO] [stdout] 74 | Path::ident(name.clone()).at_loc(&name), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:75:49 [INFO] [stdout] | [INFO] [stdout] 75 | Thing::Module(em.loc(), name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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] --> spade-ast-lowering/src/global_symbols.rs:83:50 [INFO] [stdout] | [INFO] [stdout] 83 | ... name: name_id.at_loc(&name), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:110:60 [INFO] [stdout] | [INFO] [stdout] 110 | ast::Item::Module(m) => ctx.in_named_namespace(m.name.clone(), |ctx| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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] --> spade-ast-lowering/src/global_symbols.rs:137:16 [INFO] [stdout] | [INFO] [stdout] 137 | if path.0.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.0.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:198:33 [INFO] [stdout] | [INFO] [stdout] 198 | Path::ident(m.name.clone()).at_loc(&m.name), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:199:44 [INFO] [stdout] | [INFO] [stdout] 199 | Thing::Module(m.loc(), m.name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:203:40 [INFO] [stdout] | [INFO] [stdout] 203 | ctx.in_named_namespace(m.name.clone(), |ctx| gather_types(&m.body, ctx))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:227:33 [INFO] [stdout] | [INFO] [stdout] 227 | Path::ident(r#trait.name.clone()).at_loc(&r#trait.name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r#trait.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:230:35 [INFO] [stdout] | [INFO] [stdout] 230 | ... name: r#trait.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r#trait.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:266:39 [INFO] [stdout] | [INFO] [stdout] 266 | Some(name) => name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:267:33 [INFO] [stdout] | [INFO] [stdout] 267 | None => u.path.0.last().unwrap().unwrap_named().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*u.path.0.last().unwrap().unwrap_named()` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:302:45 [INFO] [stdout] | [INFO] [stdout] 302 | let path = Path::ident_with_loc(def.name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `def.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:342:36 [INFO] [stdout] | [INFO] [stdout] 342 | ctx.in_named_namespace(m.name.clone(), |ctx| gather_symbols(&m.body, ctx))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:370:27 [INFO] [stdout] | [INFO] [stdout] 370 | .join(Path::ident(unit.head.name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unit.head.name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:414:27 [INFO] [stdout] | [INFO] [stdout] 414 | name: name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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] --> spade-ast-lowering/src/global_symbols.rs:415:47 [INFO] [stdout] | [INFO] [stdout] 415 | traits: visit_trait_specs(&traits, &TypeSpecKind::TraitBound, ctx)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `traits` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:422:27 [INFO] [stdout] | [INFO] [stdout] 422 | name: name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:460:10 [INFO] [stdout] | [INFO] [stdout] 460 | .map(Loc::strip_ref) [INFO] [stdout] | __________^ [INFO] [stdout] 461 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(Loc::strip_ref)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:465:21 [INFO] [stdout] | [INFO] [stdout] 465 | let new_thing = t.name.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:501:51 [INFO] [stdout] | [INFO] [stdout] 501 | .lookup_type_symbol(&Path::ident_with_loc(t.name.clone()), false) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:537:13 [INFO] [stdout] | [INFO] [stdout] 537 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:551:55 [INFO] [stdout] | [INFO] [stdout] 551 | .lookup_type_symbol(&Path::ident_with_loc(arg.name().clone()), false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*arg.name()` [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] --> spade-ast-lowering/src/global_symbols.rs:575:39 [INFO] [stdout] | [INFO] [stdout] 575 | meta: visit_meta_type(&meta)?, [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:620:37 [INFO] [stdout] | [INFO] [stdout] 620 | member_names.insert(variant.name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variant.name` [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] --> spade-ast-lowering/src/global_symbols.rs:643:35 [INFO] [stdout] | [INFO] [stdout] 643 | if ty.is_port(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:646:46 [INFO] [stdout] | [INFO] [stdout] 646 | ... .secondary_label(&e.name, "This is an enum")); [INFO] [stdout] | ^^^^^^^ help: change this to: `e.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:648:36 [INFO] [stdout] | [INFO] [stdout] 648 | if ty.is_inout(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:651:46 [INFO] [stdout] | [INFO] [stdout] 651 | ... .secondary_label(&e.name, "This is an enum")); [INFO] [stdout] | ^^^^^^^ help: change this to: `e.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:682:27 [INFO] [stdout] | [INFO] [stdout] 682 | name: variant.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variant.name` [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: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:758:42 [INFO] [stdout] | [INFO] [stdout] 758 | .secondary_label(&s.name, "This is a struct")); [INFO] [stdout] | ^^^^^^^ help: change this to: `s.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:779:46 [INFO] [stdout] | [INFO] [stdout] 779 | ... .secondary_label(&s.name, "This is not a port struct") [INFO] [stdout] | ^^^^^^^ help: change this to: `s.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:782:33 [INFO] [stdout] | [INFO] [stdout] 782 | ... &s.name, [INFO] [stdout] | ^^^^^^^ help: change this to: `s.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:811:37 [INFO] [stdout] | [INFO] [stdout] 811 | Path::ident(suffix.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*suffix` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:845:31 [INFO] [stdout] | [INFO] [stdout] 845 | name: t.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:884:37 [INFO] [stdout] | [INFO] [stdout] 884 | Path::ident(suffix.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*suffix` [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] --> spade-ast-lowering/src/global_symbols.rs:914:34 [INFO] [stdout] | [INFO] [stdout] 914 | if type_spec.is_port(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:917:38 [INFO] [stdout] | [INFO] [stdout] 917 | .secondary_label(&a.name, "This is an alias")); [INFO] [stdout] | ^^^^^^^ help: change this to: `a.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:919:35 [INFO] [stdout] | [INFO] [stdout] 919 | if type_spec.is_inout(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:922:38 [INFO] [stdout] | [INFO] [stdout] 922 | .secondary_label(&a.name, "This is an alias")); [INFO] [stdout] | ^^^^^^^ help: change this to: `a.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:957:50 [INFO] [stdout] | [INFO] [stdout] 957 | current_name = visited_edges.get(¤t_name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `current_name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/global_symbols.rs:1038:77 [INFO] [stdout] | [INFO] [stdout] 1038 | edges.insert(name.inner.clone(), prev_name.inner.clone().at_loc(&name)); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | &unit.head.name, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `unit.head.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:141:37 [INFO] [stdout] | [INFO] [stdout] 141 | trait_members.push((name.inner.clone(), u.head.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:152:21 [INFO] [stdout] | [INFO] [stdout] 152 | name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:246:56 [INFO] [stdout] | [INFO] [stdout] 246 | ¶m.map_ref(|_| Path::ident(param.inner.name().clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*param.inner.name()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | / return Err( [INFO] [stdout] 328 | | Diagnostic::error(&block.target, "Impls target cannot be impl type") [INFO] [stdout] 329 | | .primary_label("Impl target cannot be impl type"), [INFO] [stdout] 330 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 327 ~ Err( [INFO] [stdout] 328 + Diagnostic::error(&block.target, "Impls target cannot be impl type") [INFO] [stdout] 329 + .primary_label("Impl target cannot be impl type"), [INFO] [stdout] 330 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:333:13 [INFO] [stdout] | [INFO] [stdout] 333 | / return Err( [INFO] [stdout] 334 | | Diagnostic::error(&block.target, "Impl target cannot be wildcard") [INFO] [stdout] 335 | | .primary_label("Impl target cannot be wildcard"), [INFO] [stdout] 336 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 333 ~ Err( [INFO] [stdout] 334 + Diagnostic::error(&block.target, "Impl target cannot be wildcard") [INFO] [stdout] 335 + .primary_label("Impl target cannot be wildcard"), [INFO] [stdout] 336 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:281:68 [INFO] [stdout] | [INFO] [stdout] 281 | let (target_name, sym) = ctx.symtab.lookup_type_symbol(&name, true)?; [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 function has too many arguments (8/7) [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:341:1 [INFO] [stdout] | [INFO] [stdout] 341 | / pub fn create_trait_from_unit_heads( [INFO] [stdout] 342 | | name: TraitName, [INFO] [stdout] 343 | | type_params: &Option>>>, [INFO] [stdout] 344 | | subtraits: &Vec>, [INFO] [stdout] ... | [INFO] [stdout] 349 | | ctx: &mut Context, [INFO] [stdout] 350 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:368:59 [INFO] [stdout] | [INFO] [stdout] 368 | ... traits: visit_trait_specs(&traits, &TypeSpecKind::TraitBound, ctx)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `traits` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:378:29 [INFO] [stdout] | [INFO] [stdout] 378 | ... ident.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/impls.rs:389:74 [INFO] [stdout] | [INFO] [stdout] 389 | ... name: hir::Generic::Named(name_id.at_loc(&ident)), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:403:74 [INFO] [stdout] | [INFO] [stdout] 403 | ... name: hir::Generic::Named(name_id.at_loc(&ident)), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:424:17 [INFO] [stdout] | [INFO] [stdout] 424 | head.name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `head.name.inner` [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] --> spade-ast-lowering/src/impls.rs:454:50 [INFO] [stdout] | [INFO] [stdout] 454 | current_name = visited_edges.get(¤t_name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `current_name` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:641:13 [INFO] [stdout] | [INFO] [stdout] 641 | &impl_method.name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `impl_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:654:30 [INFO] [stdout] | [INFO] [stdout] 654 | .secondary_label(&trait_method.name, "But the trait definition isn't") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `trait_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:666:17 [INFO] [stdout] | [INFO] [stdout] 666 | &impl_method.name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `impl_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:723:30 [INFO] [stdout] | [INFO] [stdout] 723 | .secondary_label(&trait_method.name, "But this is not generic")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `trait_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:788:33 [INFO] [stdout] | [INFO] [stdout] 788 | .at_loc(&inner) [INFO] [stdout] | ^^^^^^ help: change this to: `inner` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:903:42 [INFO] [stdout] | [INFO] [stdout] 903 | .secondary_label(&trait_method.name, "Method defined here"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `trait_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:997:18 [INFO] [stdout] | [INFO] [stdout] 997 | .map(|params| hir::ParameterList(params)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `hir::ParameterList` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:990:27 [INFO] [stdout] | [INFO] [stdout] 990 | name: param.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `param.name` [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] --> spade-ast-lowering/src/impls.rs:1002:13 [INFO] [stdout] | [INFO] [stdout] 1002 | &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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1101:92 [INFO] [stdout] | [INFO] [stdout] 1101 | Ok(hir::ConstGeneric::Add(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1104:92 [INFO] [stdout] | [INFO] [stdout] 1104 | Ok(hir::ConstGeneric::Sub(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1107:92 [INFO] [stdout] | [INFO] [stdout] 1107 | Ok(hir::ConstGeneric::Mul(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1110:92 [INFO] [stdout] | [INFO] [stdout] 1110 | Ok(hir::ConstGeneric::Div(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1113:92 [INFO] [stdout] | [INFO] [stdout] 1113 | Ok(hir::ConstGeneric::Mod(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1116:78 [INFO] [stdout] | [INFO] [stdout] 1116 | Ok(hir::ConstGeneric::IntBitsFor(map_boilerplate(inner)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1119:79 [INFO] [stdout] | [INFO] [stdout] 1119 | Ok(hir::ConstGeneric::UintBitsFor(map_boilerplate(inner)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1122:91 [INFO] [stdout] | [INFO] [stdout] 1122 | Ok(hir::ConstGeneric::Eq(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1125:94 [INFO] [stdout] | [INFO] [stdout] 1125 | Ok(hir::ConstGeneric::NotEq(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1128:91 [INFO] [stdout] | [INFO] [stdout] 1128 | Ok(hir::ConstGeneric::Lt(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1131:91 [INFO] [stdout] | [INFO] [stdout] 1131 | Ok(hir::ConstGeneric::Gt(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1134:91 [INFO] [stdout] | [INFO] [stdout] 1134 | Ok(hir::ConstGeneric::Le(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1137:91 [INFO] [stdout] | [INFO] [stdout] 1137 | Ok(hir::ConstGeneric::Ge(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1140:78 [INFO] [stdout] | [INFO] [stdout] 1140 | Ok(hir::ConstGeneric::LogicalNot(map_boilerplate(inner)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1146:17 [INFO] [stdout] | [INFO] [stdout] 1146 | .at_loc(&cg)), [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1151:17 [INFO] [stdout] | [INFO] [stdout] 1151 | .at_loc(&cg)), [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1156:17 [INFO] [stdout] | [INFO] [stdout] 1156 | .at_loc(&cg)), [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1026:5 [INFO] [stdout] | [INFO] [stdout] 1026 | ctx: &mut Context, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1035:13 [INFO] [stdout] | [INFO] [stdout] 1035 | ctx, [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1197:17 [INFO] [stdout] | [INFO] [stdout] 1197 | .at_loc(&te)), [INFO] [stdout] | ^^^ help: change this to: `te` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1373:39 [INFO] [stdout] | [INFO] [stdout] 1373 | let specs = set.entry(f.clone()).or_default(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*f` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:102:36 [INFO] [stdout] | [INFO] [stdout] 102 | ... .push((name.clone(), previous.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:103:50 [INFO] [stdout] | [INFO] [stdout] 103 | visited_variables.insert(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:124:58 [INFO] [stdout] | [INFO] [stdout] 124 | .map(|(_, clk, _)| ctx.symtab.add_local_variable(clk.clone()).at_loc(&clk)); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*clk` [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] --> spade-ast-lowering/src/lambda.rs:124:78 [INFO] [stdout] | [INFO] [stdout] 124 | .map(|(_, clk, _)| ctx.symtab.add_local_variable(clk.clone()).at_loc(&clk)); [INFO] [stdout] | ^^^^ help: change this to: `clk` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:145:37 [INFO] [stdout] | [INFO] [stdout] 145 | let output_generic_param_name = output_type_name.clone().at_loc(unit_kind); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `output_type_name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | .chain(Some(output_generic_param_name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `output_generic_param_name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:174:26 [INFO] [stdout] | [INFO] [stdout] 174 | .map(|p| p.ident().unwrap().inner.clone().at_loc(&p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `p.ident().unwrap().inner` [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] --> spade-ast-lowering/src/lambda.rs:174:66 [INFO] [stdout] | [INFO] [stdout] 174 | .map(|p| p.ident().unwrap().inner.clone().at_loc(&p)), [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:182:23 [INFO] [stdout] | [INFO] [stdout] 182 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:189:13 [INFO] [stdout] | [INFO] [stdout] 189 | / outer_generic_params [INFO] [stdout] 190 | | .iter() [INFO] [stdout] 191 | | .map(|tp| { [INFO] [stdout] 192 | | Ok(ast::TypeParam::TypeWithMeta { [INFO] [stdout] ... | [INFO] [stdout] 209 | | .collect::>>()? [INFO] [stdout] 210 | | .into_iter(), [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 209 - .collect::>>()? [INFO] [stdout] 210 - .into_iter(), [INFO] [stdout] 209 + .collect::>>()?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:193:31 [INFO] [stdout] | [INFO] [stdout] 193 | name: tp.ident().unwrap().inner.clone().at_loc(tp), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tp.ident().unwrap().inner` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:235:15 [INFO] [stdout] | [INFO] [stdout] 235 | name: type_name.clone().at_loc(&debug_loc), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `type_name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:239:23 [INFO] [stdout] | [INFO] [stdout] 239 | name: type_name.clone().at_loc(&debug_loc), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `type_name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:252:59 [INFO] [stdout] | [INFO] [stdout] 252 | ... (ast::AttributeList::empty(), name_ident.clone(), ty) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*name_ident` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:287:45 [INFO] [stdout] | [INFO] [stdout] 287 | ... Path::ident(output_type_name.clone().nowhere()).nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `output_type_name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | Path::ident(type_name.clone().nowhere()).nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `type_name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:310:62 [INFO] [stdout] | [INFO] [stdout] 310 | ... ast::TypeSpec::Named(Path::ident(name.clone()).at_loc(name), None) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:461:6 [INFO] [stdout] | [INFO] [stdout] 461 | ) -> Result<( [INFO] [stdout] | ______^ [INFO] [stdout] 462 | | Option<(ast::AttributeList, Loc, Loc)>, [INFO] [stdout] 463 | | Vec>, [INFO] [stdout] 464 | | )> { [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: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:481:29 [INFO] [stdout] | [INFO] [stdout] 481 | ... p.0.last().unwrap().unwrap_named().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*p.0.last().unwrap().unwrap_named()` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/pipelines.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/type_level_if.rs:76:24 [INFO] [stdout] | [INFO] [stdout] 76 | .primary_label(format!("Invalid body of gen if"))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Invalid body of gen if".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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/type_level_if.rs:89:46 [INFO] [stdout] | [INFO] [stdout] 89 | let absorbed = absorb_statements(&new_body, &body.statements, ctx)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `new_body` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:144:33 [INFO] [stdout] | [INFO] [stdout] 144 | .at_loc(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:186:39 [INFO] [stdout] | [INFO] [stdout] 186 | let on_true = expand_body(&on_true, PathSegment::IfT, ctx)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `on_true` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:187:40 [INFO] [stdout] | [INFO] [stdout] 187 | let on_false = expand_body(&on_false, PathSegment::IfT, ctx)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `on_false` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:234:29 [INFO] [stdout] | [INFO] [stdout] 234 | .at_loc(&depth)] [INFO] [stdout] | ^^^^^^ help: change this to: `depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-ast-lowering/src/types.rs:34:43 [INFO] [stdout] | [INFO] [stdout] 34 | TypeDeclKind::Enum { .. } => false, [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-ast-lowering/src/types.rs:36:44 [INFO] [stdout] | [INFO] [stdout] 36 | TypeDeclKind::Alias { .. } => false, [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-ast-lowering/src/types.rs:94:43 [INFO] [stdout] | [INFO] [stdout] 94 | TypeDeclKind::Enum { .. } => false, [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:166:17 [INFO] [stdout] | [INFO] [stdout] 166 | ident.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:191:17 [INFO] [stdout] | [INFO] [stdout] 191 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:220:36 [INFO] [stdout] | [INFO] [stdout] 220 | let path = Path::ident(ident.clone()).at_loc(ident); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/lib.rs:236:53 [INFO] [stdout] | [INFO] [stdout] 236 | name: Generic::Named(name_id.at_loc(&ident)), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:247:36 [INFO] [stdout] | [INFO] [stdout] 247 | let path = Path::ident(name.clone()).at_loc(name); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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] --> spade-ast-lowering/src/lib.rs:252:53 [INFO] [stdout] | [INFO] [stdout] 252 | name: Generic::Named(name_id.at_loc(&name)), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:470:37 [INFO] [stdout] | [INFO] [stdout] 470 | / ... return Err(Diagnostic::error(name, format!("Tuple members can only be types, found {other_meta}")) [INFO] [stdout] 471 | | ... .primary_label(format!("Expected type, found {other_meta}")) [INFO] [stdout] 472 | | ... .secondary_label(&inner, format!("{name} is defined as {other_meta} here"))) [INFO] [stdout] | |__________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 470 ~ Err(Diagnostic::error(name, format!("Tuple members can only be types, found {other_meta}")) [INFO] [stdout] 471 + .primary_label(format!("Expected type, found {other_meta}")) [INFO] [stdout] 472 + .secondary_label(&inner, format!("{name} is defined as {other_meta} here"))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:478:25 [INFO] [stdout] | [INFO] [stdout] 478 | / return Err(Diagnostic::error( [INFO] [stdout] 479 | | p, [INFO] [stdout] 480 | | "Tuple elements must be types, not type level integers", [INFO] [stdout] 481 | | ) [INFO] [stdout] 482 | | .primary_label("Tuples cannot contain non-types")) [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 478 ~ Err(Diagnostic::error( [INFO] [stdout] 479 + p, [INFO] [stdout] 480 + "Tuple elements must be types, not type level integers", [INFO] [stdout] 481 + ) [INFO] [stdout] 482 + .primary_label("Tuples cannot contain non-types")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:532:30 [INFO] [stdout] | [INFO] [stdout] 532 | if inner.is_port(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/lib.rs:539:31 [INFO] [stdout] | [INFO] [stdout] 539 | if inner.is_inout(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/lib.rs:575:64 [INFO] [stdout] | [INFO] [stdout] 575 | ctx.item_list.hidden_constraints.push(specs.at_loc(&t)); [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] --> spade-ast-lowering/src/lib.rs:576:69 [INFO] [stdout] | [INFO] [stdout] 576 | Ok(hir::TypeSpec::Generic(Generic::Hidden(new_id.at_loc(&t)))) [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: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:641:62 [INFO] [stdout] | [INFO] [stdout] 641 | diag.span_suggest_insert_before(suggest_msg, &l.args[0].1, "self, ") [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `l.args[0].1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:689:26 [INFO] [stdout] | [INFO] [stdout] 689 | arg_names.insert(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:701:19 [INFO] [stdout] | [INFO] [stdout] 701 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:818:10 [INFO] [stdout] | [INFO] [stdout] 818 | .map(Loc::strip_ref) [INFO] [stdout] | __________^ [INFO] [stdout] 819 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(Loc::strip_ref)` [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: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:950:15 [INFO] [stdout] | [INFO] [stdout] 950 | name: head.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `head.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:978:40 [INFO] [stdout] | [INFO] [stdout] 978 | .primary_label(format!("Expected type level integer")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expected type level integer".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1157:17 [INFO] [stdout] | [INFO] [stdout] 1157 | format!("This expression is not supported in a type expression"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"This expression is not supported in a type expression".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1324:27 [INFO] [stdout] | [INFO] [stdout] 1324 | .join(Path::ident(name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1392:31 [INFO] [stdout] | [INFO] [stdout] 1392 | wal_suffix = Some(suffix.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*suffix` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1423:51 [INFO] [stdout] | [INFO] [stdout] 1423 | ctx.symtab.add_local_variable(ident.clone()).at_loc(ident), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1440:36 [INFO] [stdout] | [INFO] [stdout] 1440 | ctx.symtab.re_add_type(ident.clone(), name_id.inner.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/lib.rs:1449:42 [INFO] [stdout] | [INFO] [stdout] 1449 | .map_ref(|body| visit_expression(&body, ctx)); [INFO] [stdout] | ^^^^^ help: change this to: `body` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1461:41 [INFO] [stdout] | [INFO] [stdout] 1461 | ... suffix: suffix.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `suffix.inner` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1565:43 [INFO] [stdout] | [INFO] [stdout] 1565 | Some(ty) => format!("({})", ty.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1704:17 [INFO] [stdout] | [INFO] [stdout] 1704 | / std::iter::repeat("_") [INFO] [stdout] 1705 | | .take(expected) [INFO] [stdout] | |___________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("_", expected)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1735:21 [INFO] [stdout] | [INFO] [stdout] 1735 | / return Err( [INFO] [stdout] 1736 | | Diagnostic::error(ident, format!("{ident} was already defined")) [INFO] [stdout] 1737 | | .secondary_label(previous, "First defined here") [INFO] [stdout] 1738 | | .primary_label("Later defined here") [INFO] [stdout] 1739 | | .secondary_label(state.loc(), format!("{ident} declared here")) [INFO] [stdout] 1740 | | .note("Declared variables can only be defined once"), [INFO] [stdout] 1741 | | ); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1735 ~ Err( [INFO] [stdout] 1736 + Diagnostic::error(ident, format!("{ident} was already defined")) [INFO] [stdout] 1737 + .secondary_label(previous, "First defined here") [INFO] [stdout] 1738 + .primary_label("Later defined here") [INFO] [stdout] 1739 + .secondary_label(state.loc(), format!("{ident} declared here")) [INFO] [stdout] 1740 + .note("Declared variables can only be defined once"), [INFO] [stdout] 1741 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1720:51 [INFO] [stdout] | [INFO] [stdout] 1720 | .mark_declaration_defined(ident.clone(), ident.loc()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1726:41 [INFO] [stdout] | [INFO] [stdout] 1726 | Thing::Variable(ident.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1731:51 [INFO] [stdout] | [INFO] [stdout] 1731 | .mark_declaration_defined(ident.clone(), ident.loc()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1747:33 [INFO] [stdout] | [INFO] [stdout] 1747 | Path::ident(ident.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1748:37 [INFO] [stdout] | [INFO] [stdout] 1748 | Thing::Variable(ident.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/lib.rs:1766:49 [INFO] [stdout] | [INFO] [stdout] 1766 | inner: Some(Box::new(pat.at_loc(&inner))), [INFO] [stdout] | ^^^^^^ help: change this to: `inner` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1817:33 [INFO] [stdout] | [INFO] [stdout] 1817 | ... }| ident.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.inner` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1825:73 [INFO] [stdout] | [INFO] [stdout] 1825 | ... ast::Pattern::Path(Path::ident_with_loc(target.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1833:46 [INFO] [stdout] | [INFO] [stdout] 1833 | ... new: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1838:42 [INFO] [stdout] | [INFO] [stdout] 1838 | ... bound.insert(target.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1841:43 [INFO] [stdout] | [INFO] [stdout] 1841 | ... name: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1851:41 [INFO] [stdout] | [INFO] [stdout] 1851 | ... target: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1886:41 [INFO] [stdout] | [INFO] [stdout] 1886 | ... target: arg.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `arg.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1911:42 [INFO] [stdout] | [INFO] [stdout] 1911 | .add_declaration(name.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1954:41 [INFO] [stdout] | [INFO] [stdout] 1954 | ... suffix: suffix.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `suffix.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2017:24 [INFO] [stdout] | [INFO] [stdout] 2017 | let cond = match cond { [INFO] [stdout] | ________________________^ [INFO] [stdout] 2018 | | Some(cond) => Some(cond.visit(visit_expression, ctx)), [INFO] [stdout] 2019 | | None => None, [INFO] [stdout] 2020 | | }; [INFO] [stdout] | |_____________^ help: try: `cond.as_ref().map(|cond| cond.visit(visit_expression, ctx))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2048:50 [INFO] [stdout] | [INFO] [stdout] 2048 | .lookup_type_symbol(&Path::ident(name.clone()).at_loc(name), false)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2095:29 [INFO] [stdout] | [INFO] [stdout] 2095 | ... name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2100:85 [INFO] [stdout] | [INFO] [stdout] 2100 | let expr = ast::Expression::Identifier(Path::ident_with_loc(name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2104:29 [INFO] [stdout] | [INFO] [stdout] 2104 | ... name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2159:18 [INFO] [stdout] | [INFO] [stdout] 2159 | .map(|params| hir::ArgumentList::Named(params)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `hir::ArgumentList::Named` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2145:67 [INFO] [stdout] | [INFO] [stdout] 2145 | ast::TypeSpec::Named(Path::ident_with_loc(name.clone()), None).at_loc(name), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2150:62 [INFO] [stdout] | [INFO] [stdout] 2150 | Ok(hir::expression::NamedArgument::Short(name.clone(), arg)) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2155:61 [INFO] [stdout] | [INFO] [stdout] 2155 | Ok(hir::expression::NamedArgument::Full(name.clone(), arg)) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2393:41 [INFO] [stdout] | [INFO] [stdout] 2393 | ... Path::ident(label.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*label` [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] --> spade-ast-lowering/src/lib.rs:2449:43 [INFO] [stdout] | [INFO] [stdout] 2449 | let loc = ().between_locs(&target, &index); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/lib.rs:2449:52 [INFO] [stdout] | [INFO] [stdout] 2449 | let loc = ().between_locs(&target, &index); [INFO] [stdout] | ^^^^^^ help: change this to: `index` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2464:13 [INFO] [stdout] | [INFO] [stdout] 2464 | field.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*field` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2477:23 [INFO] [stdout] | [INFO] [stdout] 2477 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2618:33 [INFO] [stdout] | [INFO] [stdout] 2618 | ... format!("or a type level uint"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"or a type level uint".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2680:62 [INFO] [stdout] | [INFO] [stdout] 2680 | ... .lookup_type_symbol(&Path::ident(name.clone()).at_loc(name), false)? [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2693:45 [INFO] [stdout] | [INFO] [stdout] 2693 | let path = Path::ident_with_loc(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2705:73 [INFO] [stdout] | [INFO] [stdout] 2705 | ... .add_undecleared_at_offset(pipeline_offset, name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2881:25 [INFO] [stdout] | [INFO] [stdout] 2881 | .unwrap_or_else(|| hir::AttributeList::empty()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `hir::AttributeList::empty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2844:64 [INFO] [stdout] | [INFO] [stdout] 2844 | .lookup_variable(&Path::ident_with_loc(state.clone()))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*state` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2870:37 [INFO] [stdout] | [INFO] [stdout] 2870 | ... suffix: suffix.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `suffix.inner` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2901:20 [INFO] [stdout] | [INFO] [stdout] 2901 | verilog_attrs: &Vec<(Loc, Option>)>, [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] 2901 ~ verilog_attrs: &[(Loc, Option>)], [INFO] [stdout] 2902 | ) -> bool { [INFO] [stdout] ... [INFO] [stdout] 2907 | } => { [INFO] [stdout] 2908 ~ verilog_attr_groups.push(verilog_attrs.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:297:41 [INFO] [stdout] | [INFO] [stdout] 297 | visit_unit(&None, e, &None, &vec![], ctx)?; [INFO] [stdout] | ^^^^^^^ help: you can use a slice directly: `&[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling basic-toml v0.1.10 [INFO] [stderr] Compiling zeroize_derive v1.4.3 [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:194:64 [INFO] [stdout] | [INFO] [stdout] 194 | KnownType::Bool(b) => ConstraintExpr::Bool(b.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `b` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:311:27 [INFO] [stdout] | [INFO] [stdout] 311 | replaces: replaces.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*replaces` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | inside: inside.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*inside` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:349:25 [INFO] [stdout] | [INFO] [stdout] 349 | ConstraintExpr::Var(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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:447:60 [INFO] [stdout] | [INFO] [stdout] 447 | ... .push(().at_loc(&rhs).map(|_| (expr.clone(), replacement.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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] --> spade-typeinference/src/constraints.rs:455:50 [INFO] [stdout] | [INFO] [stdout] 455 | ... val: KnownType::Bool(val.clone()), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*val` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:459:60 [INFO] [stdout] | [INFO] [stdout] 459 | ... .push(().at_loc(&rhs).map(|_| (expr.clone(), replacement.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:471:60 [INFO] [stdout] | [INFO] [stdout] 471 | ... .push(().at_loc(&rhs).map(|_| (expr.clone(), replacement.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:493:55 [INFO] [stdout] | [INFO] [stdout] 493 | | ConstraintExpr::Sub(_) => Some((expr.clone(), rhs)), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:90:38 [INFO] [stdout] | [INFO] [stdout] 90 | ... .map(|p| format!("{}", p.display_with_meta(meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `p.display_with_meta(meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:111:34 [INFO] [stdout] | [INFO] [stdout] 111 | .map(|t| format!("{}", t.display_with_meta(meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:145:25 [INFO] [stdout] | [INFO] [stdout] 145 | format!("_") [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:168:41 [INFO] [stdout] | [INFO] [stdout] 168 | KnownType::Tuple => format!("Tuple"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Tuple".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:169:41 [INFO] [stdout] | [INFO] [stdout] 169 | KnownType::Array => format!("Array"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Array".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:170:40 [INFO] [stdout] | [INFO] [stdout] 170 | KnownType::Wire => format!("&"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"&".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:171:44 [INFO] [stdout] | [INFO] [stdout] 171 | KnownType::Inverted => format!("inv &"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"inv &".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:172:41 [INFO] [stdout] | [INFO] [stdout] 172 | KnownType::Error => format!("{{error}}"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{error}".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc<()>` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/equation.rs:288:17 [INFO] [stdout] | [INFO] [stdout] 288 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:476:38 [INFO] [stdout] | [INFO] [stdout] 476 | ... .map(|p| format!("{}", p.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `p.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:497:34 [INFO] [stdout] | [INFO] [stdout] 497 | .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:527:17 [INFO] [stdout] | [INFO] [stdout] 527 | / format!( [INFO] [stdout] 528 | | "{}", [INFO] [stdout] 529 | | traits [INFO] [stdout] 530 | | .inner [INFO] [stdout] ... | [INFO] [stdout] 533 | | .join("+"), [INFO] [stdout] 534 | | ) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 527 ~ traits [INFO] [stdout] 528 + .inner [INFO] [stdout] 529 + .iter() [INFO] [stdout] 530 + .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] 531 + .join("+").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:532:34 [INFO] [stdout] | [INFO] [stdout] 532 | .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc<()>` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/equation.rs:547:13 [INFO] [stdout] | [INFO] [stdout] 547 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*loc` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> spade-typeinference/src/equation.rs:549:20 [INFO] [stdout] | [INFO] [stdout] 549 | params.into_iter().map(|p| p.insert(type_state)).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] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-typeinference/src/error.rs:51:10 [INFO] [stdout] | [INFO] [stdout] 51 | ) -> std::result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:208:25 [INFO] [stdout] | [INFO] [stdout] 208 | format!("{}", e.failing.display_with_meta(display_meta, type_state)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `e.failing.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | format!("{}", g.failing.display_with_meta(display_meta, type_state)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `g.failing.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:232:25 [INFO] [stdout] | [INFO] [stdout] 232 | format!("{}", traits[0].display_with_meta(display_meta, type_state)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `traits[0].display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:270:25 [INFO] [stdout] | [INFO] [stdout] 270 | / format!( [INFO] [stdout] 271 | | "{}", [INFO] [stdout] 272 | | expected [INFO] [stdout] 273 | | .failing [INFO] [stdout] 274 | | .display_with_meta(is_meta_error, type_state) [INFO] [stdout] 275 | | ), [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 270 ~ expected [INFO] [stdout] 271 + .failing [INFO] [stdout] 272 ~ .display_with_meta(is_meta_error, type_state).to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:280:25 [INFO] [stdout] | [INFO] [stdout] 280 | / format!( [INFO] [stdout] 281 | | "{}", [INFO] [stdout] 282 | | got.failing.display_with_meta(is_meta_error, type_state) [INFO] [stdout] 283 | | ), [INFO] [stdout] | |_________________________^ help: consider using `.to_string()`: `got.failing.display_with_meta(is_meta_error, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:92:45 [INFO] [stdout] | [INFO] [stdout] 92 | value: ConstantInt::Generic(generic.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*generic` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:114:72 [INFO] [stdout] | [INFO] [stdout] 114 | self.add_equation(TypedExpression::Id(*depth_typeexpr_id), depth.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `depth` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:120:56 [INFO] [stdout] | [INFO] [stdout] 120 | self.add_equation(key.clone(), var.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | let var = self.owned.equations.get(&key).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.owned.equations.get(&key).unwrap()` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:135:25 [INFO] [stdout] | [INFO] [stdout] 135 | total_offset.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `total_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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:138:58 [INFO] [stdout] | [INFO] [stdout] 138 | ... Box::new(ConstraintExpr::Var(self.get_pipeline_state(expression)? [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 139 | | ... .current_stage_depth.clone())) [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 138 ~ Box::new(ConstraintExpr::Var(self.get_pipeline_state(expression)? [INFO] [stdout] 139 ~ .current_stage_depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:157:35 [INFO] [stdout] | [INFO] [stdout] 157 | definition_depth: pipeline_state [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 158 | | .total_depth [INFO] [stdout] 159 | | .clone(), [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 157 ~ definition_depth: pipeline_state [INFO] [stdout] 158 ~ .total_depth, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:160:32 [INFO] [stdout] | [INFO] [stdout] 160 | current_stage: pipeline_state.current_stage_depth.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pipeline_state.current_stage_depth` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:314:39 [INFO] [stdout] | [INFO] [stdout] 314 | let true_inner_type = inner_types[index.inner as usize].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_types[index.inner as usize]` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | field: field.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*field` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:408:25 [INFO] [stdout] | [INFO] [stdout] 408 | method: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:500:87 [INFO] [stdout] | [INFO] [stdout] 500 | let inverted = TypeVar::Known(expression.loc(), KnownType::Inverted, vec![inner_type.clone()]).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:553:17 [INFO] [stdout] | [INFO] [stdout] 553 | array_size.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:557:24 [INFO] [stdout] | [INFO] [stdout] 557 | array: array_type.clone().at_loc(target), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:558:29 [INFO] [stdout] | [INFO] [stdout] 558 | array_size: array_size.clone().at_loc(index) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:589:66 [INFO] [stdout] | [INFO] [stdout] 589 | let in_array_type = TypeVar::array(expression.loc(), inner_type.clone(), in_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:589:86 [INFO] [stdout] | [INFO] [stdout] 589 | let in_array_type = TypeVar::array(expression.loc(), inner_type.clone(), in_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `in_array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:591:67 [INFO] [stdout] | [INFO] [stdout] 591 | let out_array_type = TypeVar::array(expression.loc(), inner_type.clone(), out_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:591:87 [INFO] [stdout] | [INFO] [stdout] 591 | let out_array_type = TypeVar::array(expression.loc(), inner_type.clone(), out_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `out_array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:603:59 [INFO] [stdout] | [INFO] [stdout] 603 | let out_size_constraint = ConstraintExpr::Var(end_var.clone()) - ConstraintExpr::Var(start_var.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `end_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:603:98 [INFO] [stdout] | [INFO] [stdout] 603 | let out_size_constraint = ConstraintExpr::Var(end_var.clone()) - ConstraintExpr::Var(start_var.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:606:83 [INFO] [stdout] | [INFO] [stdout] 606 | ...expr: expression.loc(), start: start_var.clone().at_loc(&start_loc), end: end_var.clone().at_loc(&end_loc) }.check_or_add(self, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:606:126 [INFO] [stdout] | [INFO] [stdout] 606 | ...clone().at_loc(&start_loc), end: end_var.clone().at_loc(&end_loc) }.check_or_add(self, ctx)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `end_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:763:25 [INFO] [stdout] | [INFO] [stdout] 763 | result_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:770:25 [INFO] [stdout] | [INFO] [stdout] 770 | lhs_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lhs_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:794:25 [INFO] [stdout] | [INFO] [stdout] 794 | result_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:801:25 [INFO] [stdout] | [INFO] [stdout] 801 | lhs_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lhs_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:807:41 [INFO] [stdout] | [INFO] [stdout] 807 | self.add_constraint(rhs_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `rhs_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:876:74 [INFO] [stdout] | [INFO] [stdout] 876 | let reference_type = TypeVar::wire(expression.loc(), result_type.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:882:74 [INFO] [stdout] | [INFO] [stdout] 882 | let reference_type = TypeVar::wire(expression.loc(), result_type.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> spade-typeinference/src/method_resolution.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | fn into_impl_target(&self) -> Option; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> spade-typeinference/src/method_resolution.rs:107:10 [INFO] [stdout] | [INFO] [stdout] 107 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> spade-typeinference/src/method_resolution.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> spade-typeinference/src/method_resolution.rs:115:10 [INFO] [stdout] | [INFO] [stdout] 115 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> spade-typeinference/src/mir_type_lowering.rs:18:30 [INFO] [stdout] | [INFO] [stdout] 18 | fn into_typed_expression(&self) -> Loc; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/mir_type_lowering.rs:118:37 [INFO] [stdout] | [INFO] [stdout] 118 | ... arg.name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `arg.name.inner` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/mir_type_lowering.rs:146:33 [INFO] [stdout] | [INFO] [stdout] 146 | ... ident.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.inner` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/mir_type_lowering.rs:161:39 [INFO] [stdout] | [INFO] [stdout] 161 | ... .map(|t| (name.inner.clone(), t.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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: large size difference between variants [INFO] [stdout] --> spade-typeinference/src/requirements.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / pub enum Requirement { [INFO] [stdout] 30 | | HasField { [INFO] [stdout] 31 | | /// The type which should have the associated field [INFO] [stdout] 32 | | target_type: Loc, [INFO] [stdout] ... | [INFO] [stdout] 38 | | / HasMethod { [INFO] [stdout] 39 | | | call_kind: CallKind, [INFO] [stdout] 40 | | | /// The ID of the expression which causes this requirement [INFO] [stdout] 41 | | | expr_id: Loc, [INFO] [stdout] ... | | [INFO] [stdout] 54 | | | prev_generic_list: GenericListToken, [INFO] [stdout] 55 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 368 bytes [INFO] [stdout] ... | [INFO] [stdout] 83 | | / WhereInequality { [INFO] [stdout] 84 | | | var: Generic, [INFO] [stdout] 85 | | | lhs: Loc, [INFO] [stdout] 86 | | | rhs: Loc, [INFO] [stdout] ... | | [INFO] [stdout] 89 | | | callsite: Option>, [INFO] [stdout] 90 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 161 bytes [INFO] [stdout] 91 | | /// The provided TypeVarID should all share a base type [INFO] [stdout] 92 | | SharedBase(Vec>), [INFO] [stdout] 93 | | } [INFO] [stdout] | |___^ the entire enum is at least 368 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 39 - call_kind: CallKind, [INFO] [stdout] 39 + call_kind: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-typeinference/src/requirements.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | return Ok(RequirementResult::Satisfied(vec![])) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 232 - return Ok(RequirementResult::Satisfied(vec![])) [INFO] [stdout] 232 + Ok(RequirementResult::Satisfied(vec![])) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-typeinference/src/requirements.rs:277:29 [INFO] [stdout] | [INFO] [stdout] 277 | / ... return Ok(RequirementResult::UnsatisfiedNow(Diagnostic::error( [INFO] [stdout] 278 | | ... expr_id, [INFO] [stdout] 279 | | ... format!( [INFO] [stdout] 280 | | ... "{target_type} has no method `{method}`", [INFO] [stdout] 281 | | ... target_type = target_type.display(type_state) [INFO] [stdout] 282 | | ... ), [INFO] [stdout] 283 | | ... ))) [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 277 ~ Ok(RequirementResult::UnsatisfiedNow(Diagnostic::error( [INFO] [stdout] 278 + expr_id, [INFO] [stdout] 279 + format!( [INFO] [stdout] 280 + "{target_type} has no method `{method}`", [INFO] [stdout] 281 + target_type = target_type.display(type_state) [INFO] [stdout] 282 + ), [INFO] [stdout] 283 + ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-typeinference/src/requirements.rs:112:30 [INFO] [stdout] | [INFO] [stdout] 112 | .resolve(&type_state) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `type_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/requirements.rs:185:66 [INFO] [stdout] | [INFO] [stdout] 185 | ... TypeVar::backward(loc.loc(), inner[0].clone(), type_state) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner[0]` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/requirements.rs:188:82 [INFO] [stdout] | [INFO] [stdout] 188 | ... TypeVar::Known(_, KnownType::Inverted, inner) => inner[0].clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner[0]` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/requirements.rs:201:35 [INFO] [stdout] | [INFO] [stdout] 201 | ... from: expr.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*expr` [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] --> spade-typeinference/src/requirements.rs:239:25 [INFO] [stdout] | [INFO] [stdout] 239 | &ctx.trait_impls, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `ctx.trait_impls` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/requirements.rs:251:51 [INFO] [stdout] | [INFO] [stdout] 251 | &FunctionLikeName::Method(method.inner.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `method.inner` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/requirements.rs:649:43 [INFO] [stdout] | [INFO] [stdout] 649 | ... from: ty.clone(), [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ty` [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] Compiling anyhow v1.0.100 [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SharedTypeState` [INFO] [stdout] --> spade-typeinference/src/shared.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | / pub fn new() -> Self { [INFO] [stdout] 36 | | Self { [INFO] [stdout] 37 | | inner: RwLock::new(SharedTypeStateInner { [INFO] [stdout] 38 | | generic_lists: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 34 + impl Default for SharedTypeState { [INFO] [stdout] 35 + fn default() -> Self { [INFO] [stdout] 36 + Self::new() [INFO] [stdout] 37 + } [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TraitImplList` [INFO] [stdout] --> spade-typeinference/src/traits.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | Self { [INFO] [stdout] 28 | | inner: HashMap::default(), [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 25 + impl Default for TraitImplList { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/traits.rs:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/traits.rs:68:30 [INFO] [stdout] | [INFO] [stdout] 68 | .map(|t| format!("{}", t.debug_resolve(type_state).0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.debug_resolve(type_state).0.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> spade-typeinference/src/traits.rs:112:20 [INFO] [stdout] | [INFO] [stdout] 112 | .chain(other.inner.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 112 - .chain(other.inner.into_iter()) [INFO] [stdout] 112 + .chain(other.inner) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking pathdiff v0.2.3 [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> spade-typeinference/src/lib.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 176 | / let result = Self { [INFO] [stdout] 177 | | key, [INFO] [stdout] 178 | | keys: [key].into_iter().collect(), [INFO] [stdout] 179 | | equations: HashMap::default(), [INFO] [stdout] ... | [INFO] [stdout] 188 | | diags: DiagList::new(), [INFO] [stdout] 189 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 190 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 176 ~ [INFO] [stdout] 177 ~ Self { [INFO] [stdout] 178 + key, [INFO] [stdout] 179 + keys: [key].into_iter().collect(), [INFO] [stdout] 180 + equations: HashMap::default(), [INFO] [stdout] 181 + generic_lists: Default::default(), [INFO] [stdout] 182 + trace_stack: TraceStack::new(), [INFO] [stdout] 183 + constraints: TypeConstraints::new(), [INFO] [stdout] 184 + requirements: vec![], [INFO] [stdout] 185 + replacements: ReplacementStack::new(), [INFO] [stdout] 186 + checkpoints: vec![], [INFO] [stdout] 187 + error_type: None, [INFO] [stdout] 188 + pipeline_state: None, [INFO] [stdout] 189 + diags: DiagList::new(), [INFO] [stdout] 190 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> spade-typeinference/src/lib.rs:268:26 [INFO] [stdout] | [INFO] [stdout] 268 | .expect(&format!("Did not find a generic list for {token:?}"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Did not find a generic list for {token:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> spade-typeinference/src/lib.rs:275:18 [INFO] [stdout] | [INFO] [stdout] 275 | .expect(&format!("Did not find a generic list for {token:?}"))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Did not find a generic list for {token:?}"))` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> spade-typeinference/src/lib.rs:280:29 [INFO] [stdout] | [INFO] [stdout] 280 | fn hir_type_expr_to_var<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 281 | &'a mut self, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 280 ~ fn hir_type_expr_to_var( [INFO] [stdout] 281 ~ &mut self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:308:21 [INFO] [stdout] | [INFO] [stdout] 308 | tvar.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `tvar` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> spade-typeinference/src/lib.rs:322:30 [INFO] [stdout] | [INFO] [stdout] 322 | pub fn type_var_from_hir<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 323 | &'a mut self, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 322 ~ pub fn type_var_from_hir( [INFO] [stdout] 323 ~ &mut self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:372:61 [INFO] [stdout] | [INFO] [stdout] 372 | ... .map(|(p, tv)| (p.name.clone(), tv.clone())); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*tv` [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] --> spade-typeinference/src/lib.rs:377:70 [INFO] [stdout] | [INFO] [stdout] 377 | return self.type_var_from_hir(loc, &a.type_spec, &generic_list_token, ctx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `generic_list_token` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:390:22 [INFO] [stdout] | [INFO] [stdout] 390 | .get(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:392:28 [INFO] [stdout] | [INFO] [stdout] 392 | Some(t) => t.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*t` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:463:78 [INFO] [stdout] | [INFO] [stdout] 463 | let full = self.add_type_var(TypeVar::Known(loc, t_int(symtab), vec![size.clone()])); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:473:79 [INFO] [stdout] | [INFO] [stdout] 473 | let full = self.add_type_var(TypeVar::Known(loc, t_uint(symtab), vec![size.clone()])); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:555:31 [INFO] [stdout] | [INFO] [stdout] 555 | type_params: vec![size.clone()], [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:743:68 [INFO] [stdout] | [INFO] [stdout] 743 | self.add_equation(TypedExpression::Id(*depth_typeexpr_id), depth_var.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `depth_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:751:26 [INFO] [stdout] | [INFO] [stdout] 751 | total_depth: depth_var.clone().at_loc(depth), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `depth_var` [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] --> spade-typeinference/src/lib.rs:960:25 [INFO] [stdout] | [INFO] [stdout] 960 | &generic_list, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `generic_list` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:993:36 [INFO] [stdout] | [INFO] [stdout] 993 | ... Ok(t?.clone()) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*t?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> spade-typeinference/src/lib.rs:1070:5 [INFO] [stdout] | [INFO] [stdout] 1070 | #[trace_typechecker] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] = note: this warning originates in the attribute macro `trace_typechecker` (in Nightly builds, run with -Z macro-backtrace for more info) [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] --> spade-typeinference/src/lib.rs:1103:9 [INFO] [stdout] | [INFO] [stdout] 1103 | / match (&head.unit_kind.inner, call_kind) { [INFO] [stdout] 1104 | | ( [INFO] [stdout] 1105 | | UnitKind::Pipeline { [INFO] [stdout] 1106 | | depth: udepth, [INFO] [stdout] ... | [INFO] [stdout] 1136 | | _ => {} [INFO] [stdout] 1137 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1103 ~ if let ( [INFO] [stdout] 1104 + UnitKind::Pipeline { [INFO] [stdout] 1105 + depth: udepth, [INFO] [stdout] 1106 + depth_typeexpr_id: _, [INFO] [stdout] 1107 + }, [INFO] [stdout] 1108 + CallKind::Pipeline { [INFO] [stdout] 1109 + inst_loc: _, [INFO] [stdout] 1110 + depth: cdepth, [INFO] [stdout] 1111 + depth_typeexpr_id: cdepth_typeexpr_id, [INFO] [stdout] 1112 + }, [INFO] [stdout] 1113 + ) = (&head.unit_kind.inner, call_kind) { [INFO] [stdout] 1114 + let definition_depth = [INFO] [stdout] 1115 + self.hir_type_expr_to_var(udepth, &unit_generic_list, ctx)?; [INFO] [stdout] 1116 + let call_depth = self.hir_type_expr_to_var(cdepth, generic_list, ctx)?; [INFO] [stdout] 1117 + [INFO] [stdout] 1118 + // NOTE: We're not adding udepth_typeexpr_id here as that would break [INFO] [stdout] 1119 + // in the future if we try to do recursion. We will also never need to look [INFO] [stdout] 1120 + // up the depth in the definition [INFO] [stdout] 1121 + self.add_equation(TypedExpression::Id(*cdepth_typeexpr_id), call_depth.clone()); [INFO] [stdout] 1122 + [INFO] [stdout] 1123 + self.unify(&call_depth, &definition_depth, ctx) [INFO] [stdout] 1124 + .into_diagnostic_no_expected_source( [INFO] [stdout] 1125 + cdepth, [INFO] [stdout] 1126 + |diag, tm| { [INFO] [stdout] 1127 + let (e, g) = tm.display_e_g(self); [INFO] [stdout] 1128 + diag.message("Pipeline depth mismatch") [INFO] [stdout] 1129 + .primary_label(format!("Expected depth {e}, got {g}")) [INFO] [stdout] 1130 + .secondary_label(udepth, format!("{name} has depth {e}")) [INFO] [stdout] 1131 + }, [INFO] [stdout] 1132 + self, [INFO] [stdout] 1133 + )?; [INFO] [stdout] 1134 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1122:77 [INFO] [stdout] | [INFO] [stdout] 1122 | self.add_equation(TypedExpression::Id(*cdepth_typeexpr_id), call_depth.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `call_depth` [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] --> spade-typeinference/src/lib.rs:1140:49 [INFO] [stdout] | [INFO] [stdout] 1140 | self.visit_argument_list(args, ctx, &generic_list)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `generic_list` [INFO] [stdout] | [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] Compiling proc-macro-error-attr v1.0.4 [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1280:13 [INFO] [stdout] | [INFO] [stdout] 1280 | result_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1287:13 [INFO] [stdout] | [INFO] [stdout] 1287 | lhs_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lhs_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1294:13 [INFO] [stdout] | [INFO] [stdout] 1294 | rhs_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `rhs_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1370:13 [INFO] [stdout] | [INFO] [stdout] 1370 | addr_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `addr_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1394:13 [INFO] [stdout] | [INFO] [stdout] 1394 | addr_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `addr_size` [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] Checking serde_core v1.0.228 [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> spade-typeinference/src/lib.rs:1416:5 [INFO] [stdout] | [INFO] [stdout] 1416 | / pub fn create_generic_list( [INFO] [stdout] 1417 | | &mut self, [INFO] [stdout] 1418 | | source: GenericListSource, [INFO] [stdout] 1419 | | type_params: &[Loc], [INFO] [stdout] ... | [INFO] [stdout] 1426 | | ctx: &Context, [INFO] [stdout] 1427 | | ) -> Result { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> spade-typeinference/src/lib.rs:1448:48 [INFO] [stdout] | [INFO] [stdout] 1448 | .find_map(|(i, param)| match ¶m.inner { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1449 | | TypeParam { [INFO] [stdout] 1450 | | name, [INFO] [stdout] 1451 | | trait_bounds: _, [INFO] [stdout] ... | [INFO] [stdout] 1463 | | }) [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 1448 ~ .find_map(|(i, param)| { [INFO] [stdout] 1449 + let TypeParam { [INFO] [stdout] 1450 + name, [INFO] [stdout] 1451 + trait_bounds: _, [INFO] [stdout] 1452 + meta: _, [INFO] [stdout] 1453 + default: _, [INFO] [stdout] 1454 + } = ¶m.inner; [INFO] [stdout] 1455 + if name.name_id().map(|p| p.1.tail()) [INFO] [stdout] 1456 + == Some(PathSegment::Named(matched_param.target.clone())) [INFO] [stdout] 1457 + { [INFO] [stdout] 1458 + Some(i) [INFO] [stdout] 1459 + } else { [INFO] [stdout] 1460 + None [INFO] [stdout] 1461 + } [INFO] [stdout] 1462 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1456:64 [INFO] [stdout] | [INFO] [stdout] 1456 | ... == Some(PathSegment::Named(matched_param.target.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*matched_param.target` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1588:37 [INFO] [stdout] | [INFO] [stdout] 1588 | .map(|(name, t)| (name, t.clone())) [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `t` [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] --> spade-typeinference/src/lib.rs:1624:25 [INFO] [stdout] | [INFO] [stdout] 1624 | &ctx, [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1647:33 [INFO] [stdout] | [INFO] [stdout] 1647 | ... tvar.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*tvar` [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] --> spade-typeinference/src/lib.rs:1650:33 [INFO] [stdout] | [INFO] [stdout] 1650 | ... &tvar, [INFO] [stdout] | ^^^^^ help: change this to: `tvar` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1657:33 [INFO] [stdout] | [INFO] [stdout] 1657 | ... rhsvar.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `rhsvar` [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] --> spade-typeinference/src/lib.rs:1660:33 [INFO] [stdout] | [INFO] [stdout] 1660 | ... &tvar, [INFO] [stdout] | ^^^^^ help: change this to: `tvar` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1666:38 [INFO] [stdout] | [INFO] [stdout] 1666 | ... lhs: tvar.clone().at_loc(&target.loc()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*tvar)` [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] --> spade-typeinference/src/lib.rs:1765:58 [INFO] [stdout] | [INFO] [stdout] 1765 | ... .unwrap_or(().at_loc(&impl_block)); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `impl_block` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:1828:34 [INFO] [stdout] | [INFO] [stdout] 1828 | target_type: num_t.clone().at_loc(pattern), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `(*num_t)` [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] --> spade-typeinference/src/lib.rs:1889:20 [INFO] [stdout] | [INFO] [stdout] 1889 | if inner.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `inner.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2154:84 [INFO] [stdout] | [INFO] [stdout] 2154 | self.add_equation(TypedExpression::Id(*count_typeexpr_id), var.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2170:44 [INFO] [stdout] | [INFO] [stdout] 2170 | .current_stage_depth = new_depth.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `new_depth` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2173:21 [INFO] [stdout] | [INFO] [stdout] 2173 | new_depth.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `new_depth` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2195:52 [INFO] [stdout] | [INFO] [stdout] 2195 | self.add_equation(key.clone(), var.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2198:31 [INFO] [stdout] | [INFO] [stdout] 2198 | let var = self.owned.equations.get(&key).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.owned.equations.get(&key).unwrap()` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2231:64 [INFO] [stdout] | [INFO] [stdout] 2231 | let outer_type = TypeVar::inverted(stmt.loc(), inner_type.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-typeinference/src/lib.rs:2424:47 [INFO] [stdout] | [INFO] [stdout] 2424 | let Some(tvar) = generic_list.get(&target) else { [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:2480:56 [INFO] [stdout] | [INFO] [stdout] 2480 | let ty = &ctx.symtab.type_symbol_by_id(&name); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2537:56 [INFO] [stdout] | [INFO] [stdout] 2537 | self.add_equation(TypedExpression::Id(gen.id), var.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2538:29 [INFO] [stdout] | [INFO] [stdout] 2538 | self.add_constraint(var.clone(), constraint, gen.loc(), &var, constraint_source); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2642:77 [INFO] [stdout] | [INFO] [stdout] 2642 | if let Some(prev) = self.owned.equations.insert(expression.clone(), var.clone()) { [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2643:23 [INFO] [stdout] | [INFO] [stdout] 2643 | let var = var.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2658:24 [INFO] [stdout] | [INFO] [stdout] 2658 | let replaces = lhs.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `lhs` [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] --> spade-typeinference/src/lib.rs:2659:47 [INFO] [stdout] | [INFO] [stdout] 2659 | let rhs = rhs.with_context(&replaces, &inside, source).at_loc(&loc); [INFO] [stdout] | ^^^^^^^ help: change this to: `inside` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:2684:10 [INFO] [stdout] | [INFO] [stdout] 2684 | ) -> std::result::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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 closure is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:2734:13 [INFO] [stdout] | [INFO] [stdout] 2734 | -> std::result::Result<(), UnificationError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2754:51 [INFO] [stdout] | [INFO] [stdout] 2754 | return Err(e).add_context(v1.clone(), v2.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `v1` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2754:63 [INFO] [stdout] | [INFO] [stdout] 2754 | return Err(e).add_context(v1.clone(), v2.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `v2` [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] --> spade-typeinference/src/lib.rs:2798:52 [INFO] [stdout] | [INFO] [stdout] 2798 | ... unify_params(self, &p1, &p2)?; [INFO] [stdout] | ^^^ help: change this to: `p1` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:2798:57 [INFO] [stdout] | [INFO] [stdout] 2798 | ... unify_params(self, &p1, &p2)?; [INFO] [stdout] | ^^^ help: change this to: `p2` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:2840:44 [INFO] [stdout] | [INFO] [stdout] 2840 | unify_params(self, &p1, &p2)?; [INFO] [stdout] | ^^^ help: change this to: `p1` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:2840:49 [INFO] [stdout] | [INFO] [stdout] 2840 | unify_params(self, &p1, &p2)?; [INFO] [stdout] | ^^^ help: change this to: `p2` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-typeinference/src/lib.rs:2869:33 [INFO] [stdout] | [INFO] [stdout] 2869 | / ... |name| match (traits1.get_trait(name), traits2.get_trait(name)) { [INFO] [stdout] 2870 | | ... (Some(req1), Some(req2)) => { [INFO] [stdout] 2871 | | ... let new_params = req1 [INFO] [stdout] 2872 | | ... .inner [INFO] [stdout] ... | [INFO] [stdout] 2887 | | ... (None, None) => panic!("Found a trait but neither side has it"), [INFO] [stdout] 2888 | | ... }, [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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 closure is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:2876:50 [INFO] [stdout] | [INFO] [stdout] 2876 | ... .map(|(p1, p2)| self.unify(p1, p2, ctx)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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: match expression looks like `matches!` macro [INFO] [stdout] --> spade-typeinference/src/lib.rs:2911:41 [INFO] [stdout] | [INFO] [stdout] 2911 | let trait_is_expected = match (&v1.resolve(self), &v2.resolve(self)) { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 2912 | | (TypeVar::Known(_, _, _), _) => true, [INFO] [stdout] 2913 | | _ => false, [INFO] [stdout] 2914 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 2911 - let trait_is_expected = match (&v1.resolve(self), &v2.resolve(self)) { [INFO] [stdout] 2912 - (TypeVar::Known(_, _, _), _) => true, [INFO] [stdout] 2913 - _ => false, [INFO] [stdout] 2914 - }; [INFO] [stdout] 2911 + let trait_is_expected = matches!((&v1.resolve(self), &v2.resolve(self)), (TypeVar::Known(_, _, _), _)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:2938:30 [INFO] [stdout] | [INFO] [stdout] 2938 | .map(|(l, r)| { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 2939 | | let copy = l.make_copy_with_mapping(self, &mut param_map); [INFO] [stdout] 2940 | | self.unify(©, &r, ctx).add_context(*ukid, *otherid) [INFO] [stdout] 2941 | | }) [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2965:39 [INFO] [stdout] | [INFO] [stdout] 2965 | Ok((new, vec![otherid.clone(), ukid.clone()])) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*otherid` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2965:56 [INFO] [stdout] | [INFO] [stdout] 2965 | Ok((new, vec![otherid.clone(), ukid.clone()])) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*ukid` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2975:43 [INFO] [stdout] | [INFO] [stdout] 2975 | ... Ok((new, vec![otherid.clone(), ukid.clone()])) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*otherid` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:2975:60 [INFO] [stdout] | [INFO] [stdout] 2975 | ... Ok((new, vec![otherid.clone(), ukid.clone()])) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*ukid` [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: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:3034:42 [INFO] [stdout] | [INFO] [stdout] 3034 | let result = self.do_and_restore(|s| s.unify(e1, e2, ctx)).is_ok(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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] --> spade-typeinference/src/lib.rs:3045:10 [INFO] [stdout] | [INFO] [stdout] 3045 | ) -> std::result::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/lib.rs:3082:48 [INFO] [stdout] | [INFO] [stdout] 3082 | let result = self.unify_inner(&expected_type.clone().at_loc(&loc), &var, ctx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expected_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:3187:10 [INFO] [stdout] | [INFO] [stdout] 3187 | ) -> std::result::Result, UnificationError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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 closure is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:3248:26 [INFO] [stdout] | [INFO] [stdout] 3248 | .map(|trait_req| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 3249 | | if let Some(impld) = ctx.trait_impls.inner.get(&target).cloned() { [INFO] [stdout] ... | [INFO] [stdout] 3301 | | }) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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 `.filter_map(..)` can be written more simply using `.filter(..)` [INFO] [stdout] --> spade-typeinference/src/lib.rs:3254:34 [INFO] [stdout] | [INFO] [stdout] 3254 | ... .filter_map(|trait_impl| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 3255 | | ... self.checkpoint(); [INFO] [stdout] 3256 | | ... let trait_params_match = trait_impl [INFO] [stdout] 3257 | | ... .trait_type_params [INFO] [stdout] ... | [INFO] [stdout] 3282 | | ... }) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> spade-typeinference/src/lib.rs:3285:32 [INFO] [stdout] | [INFO] [stdout] 3285 | ... if target_impls.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `target_impls.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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-typeinference/src/lib.rs:3490:10 [INFO] [stdout] | [INFO] [stdout] 3490 | ) -> std::result::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-typeinference/src/error.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking spade-hir-lowering v0.17.0 (/opt/rustwide/workdir/spade-hir-lowering) [INFO] [stderr] Compiling link-cplusplus v1.0.12 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Compiling scratch v1.0.9 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:517:17 [INFO] [stdout] | [INFO] [stdout] 517 | type_state: type_state, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `type_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:646:17 [INFO] [stdout] | [INFO] [stdout] 646 | result_name: result_name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking yansi v1.0.1 [INFO] [stderr] Compiling prost-derive v0.14.3 [INFO] [stderr] Checking pretty_assertions v1.4.1 [INFO] [stderr] Compiling askama_derive v0.15.1 [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:53:38 [INFO] [stdout] | [INFO] [stdout] 53 | ... .map(|op| get_final_name(op)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&get_final_name` [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: manual implementation of `Option::map` [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:62:36 [INFO] [stdout] | [INFO] [stdout] 62 | ... reset: match ®.reset { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 63 | | ... Some((trig, val)) => { [INFO] [stdout] 64 | | ... Some((get_final_name(trig), get_final_name(val))) [INFO] [stdout] ... | [INFO] [stdout] 67 | | ... }, [INFO] [stdout] | |_______________________^ help: try: `reg.reset.as_ref().map(|(trig, val)| (get_final_name(trig), get_final_name(val)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option>` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:70:34 [INFO] [stdout] | [INFO] [stdout] 70 | ... loc: reg.loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `reg.loc` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:79:62 [INFO] [stdout] | [INFO] [stdout] 79 | ... Statement::Assert(get_final_name(&val).at_loc(val)) [INFO] [stdout] | ^^^^ help: change this to: `val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:151:36 [INFO] [stdout] | [INFO] [stdout] 151 | .unwrap_or(&outer_output_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `outer_output_name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/inline.rs:155:30 [INFO] [stdout] | [INFO] [stdout] 155 | .get(&inner_output_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `inner_output_name` [INFO] [stdout] | [INFO] [stdout] = 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 `Option>` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:164:26 [INFO] [stdout] | [INFO] [stdout] 164 | loc: (*loc).clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*(*loc)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | while let Some(stmt) = stmts_iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for stmt in stmts_iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:304:63 [INFO] [stdout] | [INFO] [stdout] 304 | ... Path::from_strs(&[&name]), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded cloning of iterator items [INFO] [stdout] --> spade-hir-lowering/src/inline.rs:369:22 [INFO] [stdout] | [INFO] [stdout] 369 | let source_map = mir_entities [INFO] [stdout] | ______________________^ [INFO] [stdout] 370 | | .iter() [INFO] [stdout] 371 | | .cloned() [INFO] [stdout] 372 | | .map(|e| (e.mir.name.clone(), e.clone())) [INFO] [stdout] | |_________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_iter_cloned [INFO] [stdout] = note: `#[warn(clippy::redundant_iter_cloned)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 370 ~ .iter() [INFO] [stdout] 371 + .map(|e| (e.mir.name.clone(), e.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/linear_check/linear_state.rs:197:48 [INFO] [stdout] | [INFO] [stdout] 197 | (MutWireWitness::Field(ident.clone(), Box::new(witness)), loc) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/linear_check/linear_state.rs:292:62 [INFO] [stdout] | [INFO] [stdout] 292 | ... return Err(MutWireWitness::Field(name.clone(), Box::new(witness))) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/linear_check/linear_state.rs:344:25 [INFO] [stdout] | [INFO] [stdout] 344 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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: parameter is only used in recursion [INFO] [stdout] --> spade-hir-lowering/src/linear_check/linear_state.rs:324:22 [INFO] [stdout] | [INFO] [stdout] 324 | fn build_linear_tree(source_loc: Loc<()>, ty: &ConcreteType) -> LinearTree { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_source_loc` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> spade-hir-lowering/src/linear_check/linear_state.rs:330:66 [INFO] [stdout] | [INFO] [stdout] 330 | .map(|ty| Rc::new(RefCell::new(build_linear_tree(source_loc, ty)))) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 345 | Rc::new(RefCell::new(build_linear_tree(source_loc, ty))), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 354 | .map(|_| Rc::new(RefCell::new(build_linear_tree(source_loc, inner)))) [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: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-hir-lowering/src/linear_check/mod.rs:410:34 [INFO] [stdout] | [INFO] [stdout] 410 | spade_hir::ExprKind::Null { .. } => { [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:219:1 [INFO] [stdout] | [INFO] [stdout] 219 | / pub fn compile_items( [INFO] [stdout] 220 | | items: &BTreeMap<&NameID, (&ExecutableItem, TypeState)>, [INFO] [stdout] 221 | | symtab: &FrozenSymtab, [INFO] [stdout] 222 | | idtracker: &Arc, [INFO] [stdout] ... | [INFO] [stdout] 227 | | trait_impls: &TraitImplList, [INFO] [stdout] 228 | | ) -> Vec> { [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:257:50 [INFO] [stdout] | [INFO] [stdout] 257 | let name_source_map = Arc::clone(&name_source_map); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `name_source_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:259:44 [INFO] [stdout] | [INFO] [stdout] 259 | let idtracker = Arc::clone(&idtracker); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `idtracker` [INFO] [stdout] | [INFO] [stdout] = 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 function has too many arguments (11/7) [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:303:1 [INFO] [stdout] | [INFO] [stdout] 303 | / fn monomorphize_item( [INFO] [stdout] 304 | | item: MonoItem, [INFO] [stdout] 305 | | items: &BTreeMap<&NameID, (&ExecutableItem, TypeState)>, [INFO] [stdout] 306 | | body_replacements: Arc>, [INFO] [stdout] ... | [INFO] [stdout] 314 | | trait_impls: &TraitImplList, [INFO] [stdout] 315 | | ) -> std::result::Result, Vec> { [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:327:72 [INFO] [stdout] | [INFO] [stdout] 327 | let new_unit = match replacement.replace_in(u.clone(), &idtracker) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `idtracker` [INFO] [stdout] | [INFO] [stdout] = 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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:348:46 [INFO] [stdout] | [INFO] [stdout] 348 | ... let old_ty = gl [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 349 | | ... .get(&unit.head.get_type_params()[i].name) [INFO] [stdout] 350 | | ... .ok_or_else(|| { [INFO] [stdout] 351 | | ... diag_anyhow!(unit, "Did not have an entry for argument {i}") [INFO] [stdout] 352 | | ... })? [INFO] [stdout] 353 | | ... .clone(); [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 348 ~ let old_ty = *gl [INFO] [stdout] 349 + .get(&unit.head.get_type_params()[i].name) [INFO] [stdout] 350 + .ok_or_else(|| { [INFO] [stdout] 351 + diag_anyhow!(unit, "Did not have an entry for argument {i}") [INFO] [stdout] 352 ~ })?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:431:64 [INFO] [stdout] | [INFO] [stdout] 431 | errors.push(state.add_mono_traceback(diag, &item)); [INFO] [stdout] | ^^^^^ help: change this to: `item` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/monomorphisation.rs:437:65 [INFO] [stdout] | [INFO] [stdout] 437 | errors.push(state.add_mono_traceback(e, &item)); [INFO] [stdout] | ^^^^^ help: change this to: `item` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/monomorphisation.rs:466:28 [INFO] [stdout] | [INFO] [stdout] 466 | idtracker: &idtracker, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `idtracker` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/monomorphisation.rs:504:17 [INFO] [stdout] | [INFO] [stdout] 504 | &idtracker, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `idtracker` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/monomorphisation.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | &state, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/disallow_inout_bindings.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | / match ty { [INFO] [stdout] 26 | | Ok(spade_types::ConcreteType::Single { [INFO] [stdout] 27 | | base: PrimitiveType::InOut, [INFO] [stdout] 28 | | params: _, [INFO] [stdout] ... | [INFO] [stdout] 37 | | _ => {} [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ if let Ok(spade_types::ConcreteType::Single { [INFO] [stdout] 26 + base: PrimitiveType::InOut, [INFO] [stdout] 27 + params: _, [INFO] [stdout] 28 + }) = ty { [INFO] [stdout] 29 + return Err(Diagnostic::error( [INFO] [stdout] 30 + &unit.body, [INFO] [stdout] 31 + "Values of inout type cannot be returned", [INFO] [stdout] 32 + ) [INFO] [stdout] 33 + .primary_label("returning inout value") [INFO] [stdout] 34 + .help("inout values can only be passed along to other modules as inputs")) [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/passes/disallow_inout_bindings.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | / match (no_mangle, ty) { [INFO] [stdout] 55 | | ( [INFO] [stdout] 56 | | None, [INFO] [stdout] 57 | | Ok(spade_types::ConcreteType::Single { [INFO] [stdout] ... | [INFO] [stdout] 73 | | _ => {} [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 ~ if let ( [INFO] [stdout] 55 + None, [INFO] [stdout] 56 + Ok(spade_types::ConcreteType::Single { [INFO] [stdout] 57 + base: PrimitiveType::InOut, [INFO] [stdout] 58 + params: _, [INFO] [stdout] 59 + }), [INFO] [stdout] 60 + ) = (no_mangle, ty) { [INFO] [stdout] 61 + return Err(Diagnostic::error( [INFO] [stdout] 62 + name, [INFO] [stdout] 63 + "inout parameters must be marked #[no_mangle]", [INFO] [stdout] 64 + ) [INFO] [stdout] 65 + .primary_label("inout parameter must be #[no_mangle]") [INFO] [stdout] 66 + .span_suggest_insert_before( [INFO] [stdout] 67 + "Consider making the input #[no_mangle]", [INFO] [stdout] 68 + name, [INFO] [stdout] 69 + "#[no_mangle] ", [INFO] [stdout] 70 + )) [INFO] [stdout] 71 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/passes/disallow_inout_bindings.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | / match &expression.kind { [INFO] [stdout] 85 | | spade_hir::ExprKind::Block(b) => { [INFO] [stdout] 86 | | for stmt in &b.statements { [INFO] [stdout] 87 | | match &stmt.inner { [INFO] [stdout] ... | [INFO] [stdout] 128 | | _ => {} [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 84 ~ if let spade_hir::ExprKind::Block(b) = &expression.kind { [INFO] [stdout] 85 + for stmt in &b.statements { [INFO] [stdout] 86 + match &stmt.inner { [INFO] [stdout] 87 + spade_hir::Statement::Error => {} [INFO] [stdout] 88 + spade_hir::Statement::Binding(Binding { pattern, .. }) [INFO] [stdout] 89 + | spade_hir::Statement::Register(Register { pattern, .. }) => { [INFO] [stdout] 90 + // NOTE: the check for complete types is done after this pass is run [INFO] [stdout] 91 + // but if an incomplete type is present at this point, we can skip [INFO] [stdout] 92 + // this check for now and just let the next step fail. [INFO] [stdout] 93 + // FIXME: A better option may be to have a pass that checks [INFO] [stdout] 94 + // for incomplete types, in the monomorphization stage [INFO] [stdout] 95 + let ty = self.type_state.concrete_type_of( [INFO] [stdout] 96 + pattern, [INFO] [stdout] 97 + self.symtab.symtab(), [INFO] [stdout] 98 + &self.items.types, [INFO] [stdout] 99 + ); [INFO] [stdout] 100 + match ty { [INFO] [stdout] 101 + Ok(spade_types::ConcreteType::Single { [INFO] [stdout] 102 + base: PrimitiveType::InOut, [INFO] [stdout] 103 + params: _, [INFO] [stdout] 104 + }) => { [INFO] [stdout] 105 + return Err(Diagnostic::error( [INFO] [stdout] 106 + pattern, [INFO] [stdout] 107 + "Values of inout type cannot be bound to names", [INFO] [stdout] 108 + ) [INFO] [stdout] 109 + .primary_label("inout type bound to name") [INFO] [stdout] 110 + .help( [INFO] [stdout] 111 + "inout values can only be passed along to other modules", [INFO] [stdout] 112 + )) [INFO] [stdout] 113 + } [INFO] [stdout] 114 + _ => {} [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] 117 + spade_hir::Statement::Declaration(_) [INFO] [stdout] 118 + | spade_hir::Statement::PipelineRegMarker(_) [INFO] [stdout] 119 + | spade_hir::Statement::Label(_) [INFO] [stdout] 120 + | spade_hir::Statement::Assert(_) [INFO] [stdout] 121 + | spade_hir::Statement::Expression(_) [INFO] [stdout] 122 + | spade_hir::Statement::Set { .. } [INFO] [stdout] 123 + | spade_hir::Statement::WalSuffixed { .. } => {} [INFO] [stdout] 124 + } [INFO] [stdout] 125 + } [INFO] [stdout] 126 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/passes/disallow_inout_bindings.rs:101:29 [INFO] [stdout] | [INFO] [stdout] 101 | / ... match ty { [INFO] [stdout] 102 | | ... Ok(spade_types::ConcreteType::Single { [INFO] [stdout] 103 | | ... base: PrimitiveType::InOut, [INFO] [stdout] 104 | | ... params: _, [INFO] [stdout] ... | [INFO] [stdout] 115 | | ... _ => {} [INFO] [stdout] 116 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 101 ~ if let Ok(spade_types::ConcreteType::Single { [INFO] [stdout] 102 + base: PrimitiveType::InOut, [INFO] [stdout] 103 + params: _, [INFO] [stdout] 104 + }) = ty { [INFO] [stdout] 105 + return Err(Diagnostic::error( [INFO] [stdout] 106 + pattern, [INFO] [stdout] 107 + "Values of inout type cannot be bound to names", [INFO] [stdout] 108 + ) [INFO] [stdout] 109 + .primary_label("inout type bound to name") [INFO] [stdout] 110 + .help( [INFO] [stdout] 111 + "inout values can only be passed along to other modules", [INFO] [stdout] 112 + )) [INFO] [stdout] 113 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:31:40 [INFO] [stdout] | [INFO] [stdout] 31 | fn replace_type_params(&self, old: &Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 ~ fn replace_type_params(&self, old: &[Loc]) -> Vec> { [INFO] [stdout] 32 ~ old.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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:116:29 [INFO] [stdout] | [INFO] [stdout] 116 | .at_loc(&clock), [INFO] [stdout] | ^^^^^^ help: change this to: `clock` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:120:33 [INFO] [stdout] | [INFO] [stdout] 120 | .at_loc(&clock), [INFO] [stdout] | ^^^^^^ help: change this to: `clock` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:122:25 [INFO] [stdout] | [INFO] [stdout] 122 | .at_loc(&clock), [INFO] [stdout] | ^^^^^^ help: change this to: `clock` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `old.inputs.get(0)` [INFO] [stdout] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:144:33 [INFO] [stdout] | [INFO] [stdout] 144 | / ... old.inputs [INFO] [stdout] 145 | | ... .get(0) [INFO] [stdout] | |_________________________________^ help: try: `old.inputs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:159:25 [INFO] [stdout] | [INFO] [stdout] 159 | cap_ident.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*cap_ident` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:228:23 [INFO] [stdout] | [INFO] [stdout] 228 | pub replacements: Arc), LambdaReplacement>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:250:35 [INFO] [stdout] | [INFO] [stdout] 250 | .get_type(&self.type_state) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:251:34 [INFO] [stdout] | [INFO] [stdout] 251 | .resolve(&self.type_state) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:252:37 [INFO] [stdout] | [INFO] [stdout] 252 | .into_known(&self.type_state) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:277:34 [INFO] [stdout] | [INFO] [stdout] 277 | .resolve(&self.type_state) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_lambda_defs.rs:278:37 [INFO] [stdout] | [INFO] [stdout] 278 | .into_known(&self.type_state) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_methods.rs:45:66 [INFO] [stdout] | [INFO] [stdout] 45 | select_method(self_.loc(), &self_type, name, &self.impls, &self.type_state)? [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `self.impls` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_methods.rs:45:79 [INFO] [stdout] | [INFO] [stdout] 45 | select_method(self_.loc(), &self_type, name, &self.impls, &self.type_state)? [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_methods.rs:49:137 [INFO] [stdout] | [INFO] [stdout] 49 | ...type}", self_type=self_type.display(&self.type_state)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.type_state` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/passes/lower_methods.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | / match replacement_kind { [INFO] [stdout] 79 | | Some(new) => expression.kind = new, [INFO] [stdout] 80 | | None => {} [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(new) = replacement_kind { expression.kind = new }` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/passes/lower_type_level_if.rs:77:21 [INFO] [stdout] | [INFO] [stdout] 77 | / match &stmt.inner { [INFO] [stdout] 78 | | spade_hir::Statement::Binding(binding) => { [INFO] [stdout] 79 | | self.mark_allowed_tlifs(&binding.value); [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 77 ~ if let spade_hir::Statement::Binding(binding) = &stmt.inner { [INFO] [stdout] 78 + self.mark_allowed_tlifs(&binding.value); [INFO] [stdout] 79 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/passes/pass.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | / ... match reset { [INFO] [stdout] 143 | | ... Some((trig, val)) => subnodes!(trig, val), [INFO] [stdout] 144 | | ... None => {} [INFO] [stdout] 145 | | ... } [INFO] [stdout] | |_______________________^ help: try: `if let Some((trig, val)) = reset { subnodes!(trig, val) }` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/passes/pass.rs:147:29 [INFO] [stdout] | [INFO] [stdout] 147 | / ... match initial { [INFO] [stdout] 148 | | ... Some(initial) => subnodes!(initial), [INFO] [stdout] 149 | | ... None => {} [INFO] [stdout] 150 | | ... } [INFO] [stdout] | |_______________________^ help: try: `if let Some(initial) = initial { subnodes!(initial) }` [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: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-hir-lowering/src/pattern.rs:436:36 [INFO] [stdout] | [INFO] [stdout] 436 | ConcreteType::Error { .. } => write!(f, "{{error}}"), [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:62:1 [INFO] [stdout] | [INFO] [stdout] 62 | / pub fn handle_statement( [INFO] [stdout] 63 | | statement: &Loc, [INFO] [stdout] 64 | | ctx: &mut Context, [INFO] [stdout] 65 | | name_map: &mut BTreeMap, [INFO] [stdout] ... | [INFO] [stdout] 70 | | current_stage: &mut usize, [INFO] [stdout] 71 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | stage_enable_names: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 69 - stage_enable_names: &mut Vec>, [INFO] [stdout] 69 + stage_enable_names: &mut [Option], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:208:23 [INFO] [stdout] | [INFO] [stdout] 208 | pub fn lower_pipeline<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:245:9 [INFO] [stdout] | [INFO] [stdout] 245 | / match &statement.inner { [INFO] [stdout] 246 | | Statement::PipelineRegMarker(cond) => { [INFO] [stdout] ... | [INFO] [stdout] 263 | | _ => {} [INFO] [stdout] 264 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 245 ~ if let Statement::PipelineRegMarker(cond) = &statement.inner { [INFO] [stdout] 246 + // Once we encounter the *last* reg statement with an enable, subsequent stages [INFO] [stdout] 247 + // have enables [INFO] [stdout] 248 + if cond.is_some() { [INFO] [stdout] 249 + has_enable = true; [INFO] [stdout] 250 + } [INFO] [stdout] 251 + [INFO] [stdout] 252 + if has_enable { [INFO] [stdout] 253 + let name = ctx.symtab.new_name(Path::from_strs(&[&format!( [INFO] [stdout] 254 + "#s{}_enable", [INFO] [stdout] 255 + num_stages - stage_enable_names.len() [INFO] [stdout] 256 + )])); [INFO] [stdout] 257 + stage_enable_names.push(Some(name.value_name())); [INFO] [stdout] 258 + } else { [INFO] [stdout] 259 + stage_enable_names.push(None) [INFO] [stdout] 260 + } [INFO] [stdout] 261 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:463:22 [INFO] [stdout] | [INFO] [stdout] 463 | fn to_value_name(self, statements: &mut StatementList, ctx: &mut Context) -> ValueName { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:613:17 [INFO] [stdout] | [INFO] [stdout] 613 | / if ty.is_port() { [INFO] [stdout] 614 | | return Ok(None); [INFO] [stdout] 615 | | } [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] 612 ~ Ok(ty) [INFO] [stdout] 613 ~ if ty.is_port() => { [INFO] [stdout] 614 | return Ok(None); [INFO] [stdout] 615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:607:9 [INFO] [stdout] | [INFO] [stdout] 607 | / match ctx.types.concrete_type_of( [INFO] [stdout] 608 | | &self.clone().nowhere(), [INFO] [stdout] 609 | | ctx.symtab.symtab(), [INFO] [stdout] 610 | | &ctx.item_list.types, [INFO] [stdout] ... | [INFO] [stdout] 617 | | _ => {} [INFO] [stdout] 618 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 607 ~ if let Ok(ty) = ctx.types.concrete_type_of( [INFO] [stdout] 608 + &self.clone().nowhere(), [INFO] [stdout] 609 + ctx.symtab.symtab(), [INFO] [stdout] 610 + &ctx.item_list.types, [INFO] [stdout] 611 + ) { [INFO] [stdout] 612 + if ty.is_port() { [INFO] [stdout] 613 + return Ok(None); [INFO] [stdout] 614 + } [INFO] [stdout] 615 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:608:13 [INFO] [stdout] | [INFO] [stdout] 608 | &self.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.clone().nowhere()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> spade-hir-lowering/src/pipelines.rs:673:22 [INFO] [stdout] | [INFO] [stdout] 673 | &args [INFO] [stdout] | ______________________^ [INFO] [stdout] 674 | | .expressions() [INFO] [stdout] 675 | | .iter() [INFO] [stdout] 676 | | .map(|arg| *arg) [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] 673 ~ &args [INFO] [stdout] 674 + .expressions() [INFO] [stdout] 675 + .iter().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> spade-hir-lowering/src/statement_list.rs:90:19 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn to_vec(self, name_map: &mut NameSourceMap) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> spade-hir-lowering/src/statement_list.rs:94:33 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn to_vec_no_source_map(self) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:1074:33 [INFO] [stdout] | [INFO] [stdout] 1074 | ... n.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*n)` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:1096:25 [INFO] [stdout] | [INFO] [stdout] 1096 | n.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*n)` [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] --> spade-hir-lowering/src/lib.rs:1106:30 [INFO] [stdout] | [INFO] [stdout] 1106 | trait_impls: &ctx.trait_impls, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `ctx.trait_impls` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:1142:27 [INFO] [stdout] | [INFO] [stdout] 1142 | match &hir_ty.resolve(&ctx.types) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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: `spade_diagnostics::Diagnostic` [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:1172:32 [INFO] [stdout] | [INFO] [stdout] 1172 | return Err(Diagnostic::error( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1173 | | wal_trace, [INFO] [stdout] 1174 | | "#[wal_trace] can only be applied to values of struct type", [INFO] [stdout] ... | [INFO] [stdout] 1185 | | .into()) [INFO] [stdout] | |___________________________^ [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] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 1172 ~ return Err(Diagnostic::error( [INFO] [stdout] 1173 + wal_trace, [INFO] [stdout] 1174 + "#[wal_trace] can only be applied to values of struct type", [INFO] [stdout] 1175 + ) [INFO] [stdout] 1176 + .primary_label(format!("#[wal_trace] on {}", other.name())) [INFO] [stdout] 1177 + .secondary_label( [INFO] [stdout] 1178 + pattern, [INFO] [stdout] 1179 + format!( [INFO] [stdout] 1180 + "This has type {} which is {}", [INFO] [stdout] 1181 + hir_ty.display(ctx.types), [INFO] [stdout] 1182 + other.name() [INFO] [stdout] 1183 + ), [INFO] [stdout] 1184 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:1247:50 [INFO] [stdout] | [INFO] [stdout] 1247 | let Some(ty) = expr.try_get_type(&ctx.types) else { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:1259:40 [INFO] [stdout] | [INFO] [stdout] 1259 | ... ty.resolve(&ctx.types).display(&ctx.types) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:1259:60 [INFO] [stdout] | [INFO] [stdout] 1259 | ... ty.resolve(&ctx.types).display(&ctx.types) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:2525:30 [INFO] [stdout] | [INFO] [stdout] 2525 | verilog_attr_groups: &Vec, Option>)>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:2525:30 [INFO] [stdout] | [INFO] [stdout] 2525 | verilog_attr_groups: &Vec, Option>)>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec<(Loc, Option>)>]` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:2584:42 [INFO] [stdout] | [INFO] [stdout] 2584 | .ungenerify_type(&ty, ctx.symtab.symtab(), &ctx.item_list.types); [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:2711:37 [INFO] [stdout] | [INFO] [stdout] 2711 | ... let t = instance_list[&name].clone().resolve(&ctx.types); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `instance_list[&name]` [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] --> spade-hir-lowering/src/lib.rs:2711:74 [INFO] [stdout] | [INFO] [stdout] 2711 | ... let t = instance_list[&name].clone().resolve(&ctx.types); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:2712:42 [INFO] [stdout] | [INFO] [stdout] 2712 | ... t.into_known(&ctx.types) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:2717:51 [INFO] [stdout] | [INFO] [stdout] 2717 | ... t.display(&ctx.types), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:2781:46 [INFO] [stdout] | [INFO] [stdout] 2781 | ... .resolve(&ctx.types) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-hir-lowering/src/lib.rs:2800:42 [INFO] [stdout] | [INFO] [stdout] 2800 | ... .resolve(&ctx.types) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `ctx.types` [INFO] [stdout] | [INFO] [stdout] = 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 use of `format!` [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:3189:17 [INFO] [stdout] | [INFO] [stdout] 3189 | format!("Attempting to transmute to type containing inv & value"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Attempting to transmute to type containing inv & value".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:3196:17 [INFO] [stdout] | [INFO] [stdout] 3196 | format!("Attempting to transmute from type containing inv & value"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Attempting to transmute from type containing inv & value".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:3887:22 [INFO] [stdout] | [INFO] [stdout] 3887 | pub fn generate_unit<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:3887:1 [INFO] [stdout] | [INFO] [stdout] 3887 | / pub fn generate_unit<'a>( [INFO] [stdout] 3888 | | unit: &Unit, [INFO] [stdout] 3889 | | name: UnitName, [INFO] [stdout] 3890 | | types: &mut TypeState, [INFO] [stdout] ... | [INFO] [stdout] 3902 | | trait_impls: &TraitImplList, [INFO] [stdout] 3903 | | ) -> Result { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement with `?` operator [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:4010:21 [INFO] [stdout] | [INFO] [stdout] 4010 | return Err(Diagnostic::error( [INFO] [stdout] | ^^^^^^^ help: remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return_with_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_return_with_question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:4039:44 [INFO] [stdout] | [INFO] [stdout] 4039 | let mut statements = statements.to_vec(&mut *name_source_map.write().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut name_source_map.write().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling manyhow v0.11.4 [INFO] [stderr] Checking markup5ever v0.35.0 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Compiling proc-macro-crate v3.4.0 [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/expression.rs:477:31 [INFO] [stdout] | [INFO] [stdout] 477 | name: field.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `field` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/expression.rs:511:73 [INFO] [stdout] | [INFO] [stdout] 511 | Expression::FieldAccess(Box::new(expr.clone()), field.clone()).between( [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `field` [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_some()` [INFO] [stdout] --> spade-parser/src/expression.rs:523:28 [INFO] [stdout] | [INFO] [stdout] 523 | if let Some(_) = s.peek_and_eat(&TokenKind::DotDot)? { [INFO] [stdout] | -------^^^^^^^-------------------------------------- help: try: `if s.peek_and_eat(&TokenKind::DotDot)?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> spade-parser/src/expression.rs:543:32 [INFO] [stdout] | [INFO] [stdout] 543 | if let Some(_) = s.peek_and_eat(&TokenKind::DotDot)? { [INFO] [stdout] | -------^^^^^^^-------------------------------------- help: try: `if s.peek_and_eat(&TokenKind::DotDot)?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `head.extern_token` after checking its variant with `is_some` [INFO] [stdout] --> spade-parser/src/items.rs:78:17 [INFO] [stdout] | [INFO] [stdout] 76 | if head.extern_token.is_some() && block.is_some() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 77 | return Err(Diagnostic::error( [INFO] [stdout] 78 | head.extern_token.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `block` after checking its variant with `is_some` [INFO] [stdout] --> spade-parser/src/items.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 76 | if head.extern_token.is_some() && block.is_some() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 81 | .span_suggest_remove("Remove this body", block.as_ref().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/items.rs:274:19 [INFO] [stdout] | [INFO] [stdout] 274 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/items.rs:322:19 [INFO] [stdout] | [INFO] [stdout] 322 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/items.rs:414:19 [INFO] [stdout] | [INFO] [stdout] 414 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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: stripping a prefix manually [INFO] [stdout] --> spade-parser/src/lexer.rs:36:28 [INFO] [stdout] | [INFO] [stdout] 36 | Identifier::intern(&ident[2..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> spade-parser/src/lexer.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | if ident.starts_with("r#") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 35 ~ if let Some() = ident.strip_prefix("r#") { [INFO] [stdout] 36 ~ Identifier::intern() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling match_token v0.35.0 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Checking prettydiff v0.9.0 [INFO] [stderr] Checking rmp v0.8.15 [INFO] [stderr] Compiling termcolor v1.4.1 [INFO] [stderr] Compiling cxxbridge-flags v1.0.192 [INFO] [stderr] Compiling argh_shared v0.1.13 [INFO] [stderr] Compiling cxx v1.0.192 [INFO] [stderr] Checking rmp-serde v1.3.1 [INFO] [stderr] Compiling argh_derive v0.1.13 [INFO] [stderr] Compiling codespan-reporting v0.13.1 [INFO] [stderr] Checking hyper-util v0.1.19 [INFO] [stderr] Checking crc v3.4.0 [INFO] [stderr] Compiling convert_case v0.10.0 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking html5ever v0.35.0 [INFO] [stderr] Checking cssparser v0.35.0 [INFO] [stderr] Compiling extism-convert-macros v1.13.0 [INFO] [stderr] Checking prost v0.14.3 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking tempfile v3.24.0 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking bstr v1.12.1 [INFO] [stderr] Checking rust-fuzzy-search v0.1.1 [INFO] [stderr] Checking zlib-rs v0.5.5 [INFO] [stderr] Checking libbz2-rs-sys v0.2.2 [INFO] [stderr] Compiling askama_macros v0.15.1 [INFO] [stderr] Checking maplit v1.0.2 [INFO] [stderr] Checking glob v0.3.3 [INFO] [stderr] Checking ammonia v4.1.2 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking bzip2 v0.6.1 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Checking time v0.3.45 [INFO] [stderr] Checking flate2 v1.1.8 [INFO] [stderr] Checking globset v0.4.18 [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/statements.rs:237:26 [INFO] [stdout] | [INFO] [stdout] 237 | let last_ident = identifiers.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*identifiers.last().unwrap()` [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] --> spade-parser/src/statements.rs:270:48 [INFO] [stdout] | [INFO] [stdout] 270 | parser.disallow_attributes(attributes, &tok)?; [INFO] [stdout] | ^^^^ help: change this to: `tok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-parser/src/statements.rs:271:48 [INFO] [stdout] | [INFO] [stdout] 271 | parser.disallow_visibility(visibility, &tok)?; [INFO] [stdout] | ^^^^ help: change this to: `tok` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/statements.rs:273:29 [INFO] [stdout] | [INFO] [stdout] 273 | Ok(Statement::Label(l.clone().at(parser.file_id, &tok.span)).at(parser.file_id, &tok.span)) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*l)` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-parser/src/lib.rs:170:50 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn path_tree_with_as_alias(&mut self) -> Result, Option>)>> { [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: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/lib.rs:224:38 [INFO] [stdout] | [INFO] [stdout] 224 | Ok(NamedTurbofish::Short(name.clone()).at(self.file_id, &name)) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-parser/src/lib.rs:236:32 [INFO] [stdout] | [INFO] [stdout] 236 | Ok(Some(params.map(|p| TurbofishInner::Positional(p)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `TurbofishInner::Positional` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-parser/src/lib.rs:263:10 [INFO] [stdout] | [INFO] [stdout] 263 | ) -> Result, Option>)>> { [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: redundant closure [INFO] [stdout] --> spade-parser/src/lib.rs:288:37 [INFO] [stdout] | [INFO] [stdout] 288 | Some(params.map(|p| TurbofishInner::Positional(p))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `TurbofishInner::Positional` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-parser/src/lib.rs:440:35 [INFO] [stdout] | [INFO] [stdout] 440 | Diagnostic::error(&next.loc(), "Unicode char literals are unsupported.") [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `next.loc()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> spade-parser/src/lib.rs:460:28 [INFO] [stdout] | [INFO] [stdout] 460 | val.chars().skip(1).next().unwrap().at_loc(&next.loc()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> spade-parser/src/lib.rs:495:16 [INFO] [stdout] | [INFO] [stdout] 495 | if let Some(_) = self.peek_and_eat(&TokenKind::Comma)? { [INFO] [stdout] | -------^^^^^^^---------------------------------------- help: try: `if self.peek_and_eat(&TokenKind::Comma)?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking askama v0.15.1 [INFO] [stdout] warning: `Box::new(_)` of default value [INFO] [stdout] --> spade-parser/src/lib.rs:655:35 [INFO] [stdout] | [INFO] [stdout] 655 | Expression::Block(Box::new(Block::default())).at(self.file_id, &start.span), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default [INFO] [stdout] = note: `#[warn(clippy::box_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking argh v0.1.13 [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> spade-parser/src/lib.rs:960:17 [INFO] [stdout] | [INFO] [stdout] 953 | / let result = PipelineStageReference::Relative( [INFO] [stdout] 954 | | TypeExpression::ConstGeneric(Box::new(offset.clone())).between( [INFO] [stdout] 955 | | self.file_id, [INFO] [stdout] 956 | | &start, [INFO] [stdout] 957 | | &offset, [INFO] [stdout] 958 | | ), [INFO] [stdout] 959 | | ); [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 960 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 953 ~ [INFO] [stdout] 954 ~ PipelineStageReference::Relative( [INFO] [stdout] 955 + TypeExpression::ConstGeneric(Box::new(offset.clone())).between( [INFO] [stdout] 956 + self.file_id, [INFO] [stdout] 957 + &start, [INFO] [stdout] 958 + &offset, [INFO] [stdout] 959 + ), [INFO] [stdout] 960 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/lib.rs:998:23 [INFO] [stdout] | [INFO] [stdout] 998 | name: ident.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `ident` [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: the borrowed expression implements the required traits [INFO] [stdout] --> spade-parser/src/lib.rs:1025:17 [INFO] [stdout] | [INFO] [stdout] 1025 | &ident, [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/lib.rs:1085:37 [INFO] [stdout] | [INFO] [stdout] 1085 | Ok(NamedArgument::Short(name.clone()).at(self.file_id, &name)) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [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] --> spade-parser/src/lib.rs:1092:37 [INFO] [stdout] | [INFO] [stdout] 1092 | Ok(TypeExpression::Bool(val.inner.clone()).at_loc(&val)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `val.inner` [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: the borrowed expression implements the required traits [INFO] [stdout] --> spade-parser/src/lib.rs:1127:21 [INFO] [stdout] | [INFO] [stdout] 1127 | &().at(self.file_id, &mut_), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `().at(self.file_id, &mut_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> spade-parser/src/lib.rs:1212:16 [INFO] [stdout] | [INFO] [stdout] 1212 | if let Some(_) = self.peek_and_eat(&TokenKind::Comma)? { [INFO] [stdout] | -------^^^^^^^---------------------------------------- help: try: `if self.peek_and_eat(&TokenKind::Comma)?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-parser/src/lib.rs:1320:32 [INFO] [stdout] | [INFO] [stdout] 1320 | let name = path.tail().unwrap_named().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*path.tail().unwrap_named()` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-parser/src/lib.rs:1394:10 [INFO] [stdout] | [INFO] [stdout] 1394 | ) -> Result<(Vec>, Option>)> { [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 use of `format!` [INFO] [stdout] --> spade-parser/src/lib.rs:1399:21 [INFO] [stdout] | [INFO] [stdout] 1399 | format!("Expected `;`, got a greek question mark (;)"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expected `;`, got a greek question mark (;)".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `spade_diagnostics::Diagnostic` [INFO] [stdout] --> spade-parser/src/lib.rs:1891:52 [INFO] [stdout] | [INFO] [stdout] 1891 | ... return Err(Diagnostic::from(UnexpectedToken { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 1892 | | ... got: next, [INFO] [stdout] 1893 | | ... expected: vec![":", "==", "!=", ">", ">=", "<=", "<"], [INFO] [stdout] 1894 | | ... }) [INFO] [stdout] 1895 | | ... .into()) [INFO] [stdout] | |_____________________________^ [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] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 1891 ~ return Err(Diagnostic::from(UnexpectedToken { [INFO] [stdout] 1892 + got: next, [INFO] [stdout] 1893 + expected: vec![":", "==", "!=", ">", ">=", "<=", "<"], [INFO] [stdout] 1894 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> spade-parser/src/lib.rs:1902:44 [INFO] [stdout] | [INFO] [stdout] 1902 | ... if let Some(_) = s.peek_and_eat(&TokenKind::Else)? { [INFO] [stdout] | -------^^^^^^^------------------------------------ help: try: `if s.peek_and_eat(&TokenKind::Else)?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-parser/src/lib.rs:1945:52 [INFO] [stdout] | [INFO] [stdout] 1945 | vec![Box::new(items::UnitParser {}.map(|u| Ok(u)))], [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the tuple variant itself: `Ok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-parser/src/lib.rs:2170:47 [INFO] [stdout] | [INFO] [stdout] 2170 | Err(Diagnostic::error(&all, "Invalid attribute syntax") [INFO] [stdout] | ^^^^ help: change this to: `all` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-parser/src/lib.rs:2283:35 [INFO] [stdout] | [INFO] [stdout] 2283 | Diagnostic::error(&start, format!("Unknown attribute '{other}'")) [INFO] [stdout] | ^^^^^^ help: change this to: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-parser/src/lib.rs:2413:18 [INFO] [stdout] | [INFO] [stdout] 2413 | parsers: Vec<&dyn Fn(&mut Self) -> Result>>, [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] [stderr] Checking extism-convert v1.13.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-parser/src/lib.rs:2476:10 [INFO] [stdout] | [INFO] [stdout] 2476 | ) -> CommaSeparatedResult> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-parser/src/error.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / UnexpectedToken { [INFO] [stdout] 83 | | got: Token, [INFO] [stdout] 84 | | separator: TokenKind, [INFO] [stdout] 85 | | end_tokens: Vec, [INFO] [stdout] 86 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 176 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::TokenSeparatedError`, 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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-parser/src/lib.rs:2492:10 [INFO] [stdout] | [INFO] [stdout] 2492 | ) -> CommaSeparatedResult> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-parser/src/error.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / UnexpectedToken { [INFO] [stdout] 83 | | got: Token, [INFO] [stdout] 84 | | separator: TokenKind, [INFO] [stdout] 85 | | end_tokens: Vec, [INFO] [stdout] 86 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 176 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::TokenSeparatedError`, 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 closure is very large [INFO] [stdout] --> spade-parser/src/lib.rs:2495:25 [INFO] [stdout] | [INFO] [stdout] 2495 | let ret = || -> CommaSeparatedResult> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: spade-parser/src/error.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / UnexpectedToken { [INFO] [stdout] 83 | | got: Token, [INFO] [stdout] 84 | | separator: TokenKind, [INFO] [stdout] 85 | | end_tokens: Vec, [INFO] [stdout] 86 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 176 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::TokenSeparatedError`, 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 `match` expression can be replaced with `?` [INFO] [stdout] --> spade-parser/src/lib.rs:2741:26 [INFO] [stdout] | [INFO] [stdout] 2741 | let result = match self.next_token() { [INFO] [stdout] | __________________________^ [INFO] [stdout] 2742 | | Ok(token) => token, [INFO] [stdout] 2743 | | Err(e) => return Err(e), [INFO] [stdout] 2744 | | }; [INFO] [stdout] | |_____________^ help: try instead: `self.next_token()?` [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: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> spade-parser/src/lib.rs:2913:43 [INFO] [stdout] | [INFO] [stdout] 2913 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Inner` cannot be unsized because of the bound [INFO] [stdout] --> spade-parser/src/lib.rs:2913:12 [INFO] [stdout] | [INFO] [stdout] 2913 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `SizedKeywordPeekingParser` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] = note: `#[warn(clippy::needless_maybe_sized)]` on by default [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 2913 - Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] 2913 + Inner: SizedKeywordPeekingParser, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> spade-parser/src/lib.rs:2923:43 [INFO] [stdout] | [INFO] [stdout] 2923 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Inner` cannot be unsized because of the bound [INFO] [stdout] --> spade-parser/src/lib.rs:2923:12 [INFO] [stdout] | [INFO] [stdout] 2923 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `SizedKeywordPeekingParser` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 2923 - Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] 2923 + Inner: SizedKeywordPeekingParser, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> spade-parser/src/lib.rs:2947:43 [INFO] [stdout] | [INFO] [stdout] 2947 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Inner` cannot be unsized because of the bound [INFO] [stdout] --> spade-parser/src/lib.rs:2947:12 [INFO] [stdout] | [INFO] [stdout] 2947 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `SizedKeywordPeekingParser` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 2947 - Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] 2947 + Inner: SizedKeywordPeekingParser, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> spade-parser/src/lib.rs:2957:43 [INFO] [stdout] | [INFO] [stdout] 2957 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Inner` cannot be unsized because of the bound [INFO] [stdout] --> spade-parser/src/lib.rs:2957:12 [INFO] [stdout] | [INFO] [stdout] 2957 | Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `SizedKeywordPeekingParser` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 2957 - Inner: SizedKeywordPeekingParser + ?Sized, [INFO] [stdout] 2957 + Inner: SizedKeywordPeekingParser, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> spade-parser/src/items.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / vec![ [INFO] [stdout] 20 | | TokenKind::Function, [INFO] [stdout] 21 | | TokenKind::Entity, [INFO] [stdout] 22 | | TokenKind::Pipeline, [INFO] [stdout] 23 | | TokenKind::Extern, [INFO] [stdout] 24 | | TokenKind::Unsafe, [INFO] [stdout] 25 | | ] [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 19 ~ [TokenKind::Function, [INFO] [stdout] 20 + TokenKind::Entity, [INFO] [stdout] 21 + TokenKind::Pipeline, [INFO] [stdout] 22 + TokenKind::Extern, [INFO] [stdout] 23 + TokenKind::Unsafe] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking lzma-rust2 v0.13.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Compiling cxx-build v1.0.192 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking zopfli v0.8.3 [INFO] [stderr] Checking rustls-pki-types v1.13.2 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking xattr v1.6.1 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking filetime v0.2.26 [INFO] [stderr] Compiling swim v0.15.0 (https://gitlab.com/spade-lang/swim.git?rev=fc2fdaae8171d4b7ce8f7dd112b0a1d3203089cc#fc2fdaae) [INFO] [stderr] Checking predicates-core v1.0.9 [INFO] [stderr] Compiling target-triple v1.0.0 [INFO] [stderr] Compiling doc-comment v0.3.4 [INFO] [stderr] Checking ppmd-rust v1.3.0 [INFO] [stderr] Checking emath v0.31.1 [INFO] [stderr] Checking deflate64 v0.1.10 [INFO] [stderr] Checking insta v1.46.0 [INFO] [stderr] Checking zip v5.1.1 [INFO] [stderr] Checking lsp-types v0.93.2 [INFO] [stderr] Checking ecolor v0.31.1 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking derive_more v2.1.1 [INFO] [stderr] Checking tar v0.4.44 [INFO] [stderr] Checking fern v0.7.1 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Compiling auto_impl v0.5.0 [INFO] [stderr] Checking ignore v0.4.25 [INFO] [stderr] Compiling tower-lsp-macros v0.6.0 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Compiling spade-cxx v0.1.0 (/opt/rustwide/workdir/spade-cxx) [INFO] [stderr] Checking serde_spanned v1.0.4 [INFO] [stderr] Checking tokio-stream v0.1.18 [INFO] [stderr] Checking quick-xml v0.37.5 [INFO] [stderr] Checking ron v0.10.1 [INFO] [stderr] Checking extism-manifest v1.13.0 [INFO] [stderr] Compiling cxxbridge-macro v1.0.192 [INFO] [stderr] Compiling extism-pdk-derive v1.4.1 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking spdx v0.10.9 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Checking semver v1.0.27 [INFO] [stderr] Checking serde_ignored v0.1.14 [INFO] [stderr] Checking xdg v2.5.2 [INFO] [stderr] Checking difflib v0.4.0 [INFO] [stderr] Compiling spade-python v0.17.0 (/opt/rustwide/workdir/spade-python) [INFO] [stderr] Checking owo-colors v3.5.0 [INFO] [stderr] Checking termtree v0.5.1 [INFO] [stderr] Checking ansi-escapes v0.2.0 [INFO] [stderr] Checking toml_writer v1.0.6+spec-1.1.0 [INFO] [stderr] Checking predicates-tree v1.0.12 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Checking extism-pdk v1.4.1 [INFO] [stderr] Checking toml v0.9.11+spec-1.1.0 [INFO] [stderr] Checking globwalk v0.9.1 [INFO] [stderr] Checking surfer-translation-types v0.4.0-dev (https://gitlab.com/surfer-project/surfer.git?branch=subtranslators#34d05164) [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Checking serde_stacker v0.1.14 [INFO] [stderr] Checking assert_fs v1.1.3 [INFO] [stderr] Compiling smart-default v0.7.1 [INFO] [stderr] Checking trybuild v1.0.114 [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> spade-typeinference/src/lib.rs:2677:5 [INFO] [stdout] | [INFO] [stdout] 2677 | / /// be updated even less often, but `unify` is a pretty natural point to do so. [INFO] [stdout] 2678 | | [INFO] [stdout] | |_^ [INFO] [stdout] 2679 | fn unify_inner( [INFO] [stdout] | -------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> spade-diagnostics/src/diag_list.rs:36:53 [INFO] [stdout] | [INFO] [stdout] 36 | std::backtrace::Backtrace::capture().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> spade-ast-lowering/src/builtins.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | let mut id = std::u64::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 16 - let mut id = std::u64::MAX; [INFO] [stdout] 16 + let mut id = u64::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/builtins.rs:52:29 [INFO] [stdout] | [INFO] [stdout] 52 | ... a.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*a)` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/builtins.rs:67:29 [INFO] [stdout] | [INFO] [stdout] 67 | ... name.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*name)` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:49:74 [INFO] [stdout] | [INFO] [stdout] 49 | let path = ctx.symtab.current_namespace().push_ident(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:74:37 [INFO] [stdout] | [INFO] [stdout] 74 | Path::ident(name.clone()).at_loc(&name), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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] --> spade-ast-lowering/src/global_symbols.rs:74:58 [INFO] [stdout] | [INFO] [stdout] 74 | Path::ident(name.clone()).at_loc(&name), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:75:49 [INFO] [stdout] | [INFO] [stdout] 75 | Thing::Module(em.loc(), name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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] --> spade-ast-lowering/src/global_symbols.rs:83:50 [INFO] [stdout] | [INFO] [stdout] 83 | ... name: name_id.at_loc(&name), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:110:60 [INFO] [stdout] | [INFO] [stdout] 110 | ast::Item::Module(m) => ctx.in_named_namespace(m.name.clone(), |ctx| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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] --> spade-ast-lowering/src/global_symbols.rs:137:16 [INFO] [stdout] | [INFO] [stdout] 137 | if path.0.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.0.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:198:33 [INFO] [stdout] | [INFO] [stdout] 198 | Path::ident(m.name.clone()).at_loc(&m.name), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:199:44 [INFO] [stdout] | [INFO] [stdout] 199 | Thing::Module(m.loc(), m.name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:203:40 [INFO] [stdout] | [INFO] [stdout] 203 | ctx.in_named_namespace(m.name.clone(), |ctx| gather_types(&m.body, ctx))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:227:33 [INFO] [stdout] | [INFO] [stdout] 227 | Path::ident(r#trait.name.clone()).at_loc(&r#trait.name.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r#trait.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:230:35 [INFO] [stdout] | [INFO] [stdout] 230 | ... name: r#trait.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r#trait.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:266:39 [INFO] [stdout] | [INFO] [stdout] 266 | Some(name) => name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:267:33 [INFO] [stdout] | [INFO] [stdout] 267 | None => u.path.0.last().unwrap().unwrap_named().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*u.path.0.last().unwrap().unwrap_named()` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:302:45 [INFO] [stdout] | [INFO] [stdout] 302 | let path = Path::ident_with_loc(def.name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `def.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:342:36 [INFO] [stdout] | [INFO] [stdout] 342 | ctx.in_named_namespace(m.name.clone(), |ctx| gather_symbols(&m.body, ctx))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:370:27 [INFO] [stdout] | [INFO] [stdout] 370 | .join(Path::ident(unit.head.name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `unit.head.name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:414:27 [INFO] [stdout] | [INFO] [stdout] 414 | name: name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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] --> spade-ast-lowering/src/global_symbols.rs:415:47 [INFO] [stdout] | [INFO] [stdout] 415 | traits: visit_trait_specs(&traits, &TypeSpecKind::TraitBound, ctx)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `traits` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:422:27 [INFO] [stdout] | [INFO] [stdout] 422 | name: name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:460:10 [INFO] [stdout] | [INFO] [stdout] 460 | .map(Loc::strip_ref) [INFO] [stdout] | __________^ [INFO] [stdout] 461 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(Loc::strip_ref)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:465:21 [INFO] [stdout] | [INFO] [stdout] 465 | let new_thing = t.name.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:501:51 [INFO] [stdout] | [INFO] [stdout] 501 | .lookup_type_symbol(&Path::ident_with_loc(t.name.clone()), false) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:537:13 [INFO] [stdout] | [INFO] [stdout] 537 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:551:55 [INFO] [stdout] | [INFO] [stdout] 551 | .lookup_type_symbol(&Path::ident_with_loc(arg.name().clone()), false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*arg.name()` [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] --> spade-ast-lowering/src/global_symbols.rs:575:39 [INFO] [stdout] | [INFO] [stdout] 575 | meta: visit_meta_type(&meta)?, [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:620:37 [INFO] [stdout] | [INFO] [stdout] 620 | member_names.insert(variant.name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variant.name` [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] --> spade-ast-lowering/src/global_symbols.rs:643:35 [INFO] [stdout] | [INFO] [stdout] 643 | if ty.is_port(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:646:46 [INFO] [stdout] | [INFO] [stdout] 646 | ... .secondary_label(&e.name, "This is an enum")); [INFO] [stdout] | ^^^^^^^ help: change this to: `e.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:648:36 [INFO] [stdout] | [INFO] [stdout] 648 | if ty.is_inout(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:651:46 [INFO] [stdout] | [INFO] [stdout] 651 | ... .secondary_label(&e.name, "This is an enum")); [INFO] [stdout] | ^^^^^^^ help: change this to: `e.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:682:27 [INFO] [stdout] | [INFO] [stdout] 682 | name: variant.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `variant.name` [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: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:758:42 [INFO] [stdout] | [INFO] [stdout] 758 | .secondary_label(&s.name, "This is a struct")); [INFO] [stdout] | ^^^^^^^ help: change this to: `s.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:779:46 [INFO] [stdout] | [INFO] [stdout] 779 | ... .secondary_label(&s.name, "This is not a port struct") [INFO] [stdout] | ^^^^^^^ help: change this to: `s.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> spade-mir/src/diff.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / /// Functions for diffing and comparing mir code while ignoring exact variable IDs [INFO] [stdout] 15 | | [INFO] [stdout] | |_^ [INFO] [stdout] 16 | pub struct VarMap { [INFO] [stdout] | ----------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:782:33 [INFO] [stdout] | [INFO] [stdout] 782 | ... &s.name, [INFO] [stdout] | ^^^^^^^ help: change this to: `s.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:811:37 [INFO] [stdout] | [INFO] [stdout] 811 | Path::ident(suffix.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*suffix` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:845:31 [INFO] [stdout] | [INFO] [stdout] 845 | name: t.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:884:37 [INFO] [stdout] | [INFO] [stdout] 884 | Path::ident(suffix.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*suffix` [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] --> spade-ast-lowering/src/global_symbols.rs:914:34 [INFO] [stdout] | [INFO] [stdout] 914 | if type_spec.is_port(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:917:38 [INFO] [stdout] | [INFO] [stdout] 917 | .secondary_label(&a.name, "This is an alias")); [INFO] [stdout] | ^^^^^^^ help: change this to: `a.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:919:35 [INFO] [stdout] | [INFO] [stdout] 919 | if type_spec.is_inout(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:922:38 [INFO] [stdout] | [INFO] [stdout] 922 | .secondary_label(&a.name, "This is an alias")); [INFO] [stdout] | ^^^^^^^ help: change this to: `a.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:957:50 [INFO] [stdout] | [INFO] [stdout] 957 | current_name = visited_edges.get(¤t_name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `current_name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/global_symbols.rs:1038:77 [INFO] [stdout] | [INFO] [stdout] 1038 | edges.insert(name.inner.clone(), prev_name.inner.clone().at_loc(&name)); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> spade-mir/src/eval.rs:627:9 [INFO] [stdout] | [INFO] [stdout] 627 | 0b1111_1111_1000_0000_0000_0011_1u64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider: `0b1_1111_1111_0000_0000_0000_0111_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] = note: `#[warn(clippy::unusual_byte_groupings)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> spade-mir/src/macros.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / /// Requires the crate to be in scope, i.e. `use spade_mir;` [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | #[macro_export] [INFO] [stdout] 5 | macro_rules! value_name { [INFO] [stdout] | ----------------------- the comment documents this macro definition [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Macros for writing mir. [INFO] [stdout] 2 ~ //! Requires the crate to be in scope, i.e. `use spade_mir;` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | &unit.head.name, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `unit.head.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:141:37 [INFO] [stdout] | [INFO] [stdout] 141 | trait_members.push((name.inner.clone(), u.head.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:152:21 [INFO] [stdout] | [INFO] [stdout] 152 | name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `name.inner` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:246:56 [INFO] [stdout] | [INFO] [stdout] 246 | ¶m.map_ref(|_| Path::ident(param.inner.name().clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*param.inner.name()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | / return Err( [INFO] [stdout] 328 | | Diagnostic::error(&block.target, "Impls target cannot be impl type") [INFO] [stdout] 329 | | .primary_label("Impl target cannot be impl type"), [INFO] [stdout] 330 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 327 ~ Err( [INFO] [stdout] 328 + Diagnostic::error(&block.target, "Impls target cannot be impl type") [INFO] [stdout] 329 + .primary_label("Impl target cannot be impl type"), [INFO] [stdout] 330 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:333:13 [INFO] [stdout] | [INFO] [stdout] 333 | / return Err( [INFO] [stdout] 334 | | Diagnostic::error(&block.target, "Impl target cannot be wildcard") [INFO] [stdout] 335 | | .primary_label("Impl target cannot be wildcard"), [INFO] [stdout] 336 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 333 ~ Err( [INFO] [stdout] 334 + Diagnostic::error(&block.target, "Impl target cannot be wildcard") [INFO] [stdout] 335 + .primary_label("Impl target cannot be wildcard"), [INFO] [stdout] 336 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:281:68 [INFO] [stdout] | [INFO] [stdout] 281 | let (target_name, sym) = ctx.symtab.lookup_type_symbol(&name, true)?; [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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 function has too many arguments (8/7) [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:341:1 [INFO] [stdout] | [INFO] [stdout] 341 | / pub fn create_trait_from_unit_heads( [INFO] [stdout] 342 | | name: TraitName, [INFO] [stdout] 343 | | type_params: &Option>>>, [INFO] [stdout] 344 | | subtraits: &Vec>, [INFO] [stdout] ... | [INFO] [stdout] 349 | | ctx: &mut Context, [INFO] [stdout] 350 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:368:59 [INFO] [stdout] | [INFO] [stdout] 368 | ... traits: visit_trait_specs(&traits, &TypeSpecKind::TraitBound, ctx)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `traits` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:378:29 [INFO] [stdout] | [INFO] [stdout] 378 | ... ident.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/impls.rs:389:74 [INFO] [stdout] | [INFO] [stdout] 389 | ... name: hir::Generic::Named(name_id.at_loc(&ident)), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:403:74 [INFO] [stdout] | [INFO] [stdout] 403 | ... name: hir::Generic::Named(name_id.at_loc(&ident)), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:424:17 [INFO] [stdout] | [INFO] [stdout] 424 | head.name.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `head.name.inner` [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] --> spade-ast-lowering/src/impls.rs:454:50 [INFO] [stdout] | [INFO] [stdout] 454 | current_name = visited_edges.get(¤t_name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `current_name` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:641:13 [INFO] [stdout] | [INFO] [stdout] 641 | &impl_method.name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `impl_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:654:30 [INFO] [stdout] | [INFO] [stdout] 654 | .secondary_label(&trait_method.name, "But the trait definition isn't") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `trait_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:666:17 [INFO] [stdout] | [INFO] [stdout] 666 | &impl_method.name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `impl_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:723:30 [INFO] [stdout] | [INFO] [stdout] 723 | .secondary_label(&trait_method.name, "But this is not generic")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `trait_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:788:33 [INFO] [stdout] | [INFO] [stdout] 788 | .at_loc(&inner) [INFO] [stdout] | ^^^^^^ help: change this to: `inner` [INFO] [stdout] | [INFO] [stdout] = 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 borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:903:42 [INFO] [stdout] | [INFO] [stdout] 903 | .secondary_label(&trait_method.name, "Method defined here"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `trait_method.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:997:18 [INFO] [stdout] | [INFO] [stdout] 997 | .map(|params| hir::ParameterList(params)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `hir::ParameterList` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:990:27 [INFO] [stdout] | [INFO] [stdout] 990 | name: param.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `param.name` [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] --> spade-ast-lowering/src/impls.rs:1002:13 [INFO] [stdout] | [INFO] [stdout] 1002 | &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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1101:92 [INFO] [stdout] | [INFO] [stdout] 1101 | Ok(hir::ConstGeneric::Add(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1104:92 [INFO] [stdout] | [INFO] [stdout] 1104 | Ok(hir::ConstGeneric::Sub(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1107:92 [INFO] [stdout] | [INFO] [stdout] 1107 | Ok(hir::ConstGeneric::Mul(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1110:92 [INFO] [stdout] | [INFO] [stdout] 1110 | Ok(hir::ConstGeneric::Div(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1113:92 [INFO] [stdout] | [INFO] [stdout] 1113 | Ok(hir::ConstGeneric::Mod(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1116:78 [INFO] [stdout] | [INFO] [stdout] 1116 | Ok(hir::ConstGeneric::IntBitsFor(map_boilerplate(inner)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1119:79 [INFO] [stdout] | [INFO] [stdout] 1119 | Ok(hir::ConstGeneric::UintBitsFor(map_boilerplate(inner)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1122:91 [INFO] [stdout] | [INFO] [stdout] 1122 | Ok(hir::ConstGeneric::Eq(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1125:94 [INFO] [stdout] | [INFO] [stdout] 1125 | Ok(hir::ConstGeneric::NotEq(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1128:91 [INFO] [stdout] | [INFO] [stdout] 1128 | Ok(hir::ConstGeneric::Lt(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1131:91 [INFO] [stdout] | [INFO] [stdout] 1131 | Ok(hir::ConstGeneric::Gt(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1134:91 [INFO] [stdout] | [INFO] [stdout] 1134 | Ok(hir::ConstGeneric::Le(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1137:91 [INFO] [stdout] | [INFO] [stdout] 1137 | Ok(hir::ConstGeneric::Ge(map_boilerplate(lhs)?, map_boilerplate(rhs)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1140:78 [INFO] [stdout] | [INFO] [stdout] 1140 | Ok(hir::ConstGeneric::LogicalNot(map_boilerplate(inner)?).at_loc(&cg)) [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1146:17 [INFO] [stdout] | [INFO] [stdout] 1146 | .at_loc(&cg)), [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1151:17 [INFO] [stdout] | [INFO] [stdout] 1151 | .at_loc(&cg)), [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/impls.rs:1156:17 [INFO] [stdout] | [INFO] [stdout] 1156 | .at_loc(&cg)), [INFO] [stdout] | ^^^ help: change this to: `cg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1026:5 [INFO] [stdout] | [INFO] [stdout] 1026 | ctx: &mut Context, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1035:13 [INFO] [stdout] | [INFO] [stdout] 1035 | ctx, [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1197:17 [INFO] [stdout] | [INFO] [stdout] 1197 | .at_loc(&te)), [INFO] [stdout] | ^^^ help: change this to: `te` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/impls.rs:1373:39 [INFO] [stdout] | [INFO] [stdout] 1373 | let specs = set.entry(f.clone()).or_default(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*f` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:102:36 [INFO] [stdout] | [INFO] [stdout] 102 | ... .push((name.clone(), previous.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:103:50 [INFO] [stdout] | [INFO] [stdout] 103 | visited_variables.insert(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:124:58 [INFO] [stdout] | [INFO] [stdout] 124 | .map(|(_, clk, _)| ctx.symtab.add_local_variable(clk.clone()).at_loc(&clk)); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*clk` [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] --> spade-ast-lowering/src/lambda.rs:124:78 [INFO] [stdout] | [INFO] [stdout] 124 | .map(|(_, clk, _)| ctx.symtab.add_local_variable(clk.clone()).at_loc(&clk)); [INFO] [stdout] | ^^^^ help: change this to: `clk` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:145:37 [INFO] [stdout] | [INFO] [stdout] 145 | let output_generic_param_name = output_type_name.clone().at_loc(unit_kind); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `output_type_name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | .chain(Some(output_generic_param_name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `output_generic_param_name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:174:26 [INFO] [stdout] | [INFO] [stdout] 174 | .map(|p| p.ident().unwrap().inner.clone().at_loc(&p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `p.ident().unwrap().inner` [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] --> spade-ast-lowering/src/lambda.rs:174:66 [INFO] [stdout] | [INFO] [stdout] 174 | .map(|p| p.ident().unwrap().inner.clone().at_loc(&p)), [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:182:23 [INFO] [stdout] | [INFO] [stdout] 182 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:189:13 [INFO] [stdout] | [INFO] [stdout] 189 | / outer_generic_params [INFO] [stdout] 190 | | .iter() [INFO] [stdout] 191 | | .map(|tp| { [INFO] [stdout] 192 | | Ok(ast::TypeParam::TypeWithMeta { [INFO] [stdout] ... | [INFO] [stdout] 209 | | .collect::>>()? [INFO] [stdout] 210 | | .into_iter(), [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 209 - .collect::>>()? [INFO] [stdout] 210 - .into_iter(), [INFO] [stdout] 209 + .collect::>>()?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:193:31 [INFO] [stdout] | [INFO] [stdout] 193 | name: tp.ident().unwrap().inner.clone().at_loc(tp), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tp.ident().unwrap().inner` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:235:15 [INFO] [stdout] | [INFO] [stdout] 235 | name: type_name.clone().at_loc(&debug_loc), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `type_name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:239:23 [INFO] [stdout] | [INFO] [stdout] 239 | name: type_name.clone().at_loc(&debug_loc), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `type_name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:252:59 [INFO] [stdout] | [INFO] [stdout] 252 | ... (ast::AttributeList::empty(), name_ident.clone(), ty) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*name_ident` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:287:45 [INFO] [stdout] | [INFO] [stdout] 287 | ... Path::ident(output_type_name.clone().nowhere()).nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `output_type_name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | Path::ident(type_name.clone().nowhere()).nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `type_name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:310:62 [INFO] [stdout] | [INFO] [stdout] 310 | ... ast::TypeSpec::Named(Path::ident(name.clone()).at_loc(name), None) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:461:6 [INFO] [stdout] | [INFO] [stdout] 461 | ) -> Result<( [INFO] [stdout] | ______^ [INFO] [stdout] 462 | | Option<(ast::AttributeList, Loc, Loc)>, [INFO] [stdout] 463 | | Vec>, [INFO] [stdout] 464 | | )> { [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: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lambda.rs:481:29 [INFO] [stdout] | [INFO] [stdout] 481 | ... p.0.last().unwrap().unwrap_named().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*p.0.last().unwrap().unwrap_named()` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/pipelines.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/type_level_if.rs:76:24 [INFO] [stdout] | [INFO] [stdout] 76 | .primary_label(format!("Invalid body of gen if"))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Invalid body of gen if".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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/type_level_if.rs:89:46 [INFO] [stdout] | [INFO] [stdout] 89 | let absorbed = absorb_statements(&new_body, &body.statements, ctx)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `new_body` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:144:33 [INFO] [stdout] | [INFO] [stdout] 144 | .at_loc(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:186:39 [INFO] [stdout] | [INFO] [stdout] 186 | let on_true = expand_body(&on_true, PathSegment::IfT, ctx)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `on_true` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:187:40 [INFO] [stdout] | [INFO] [stdout] 187 | let on_false = expand_body(&on_false, PathSegment::IfT, ctx)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `on_false` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/type_level_if.rs:234:29 [INFO] [stdout] | [INFO] [stdout] 234 | .at_loc(&depth)] [INFO] [stdout] | ^^^^^^ help: change this to: `depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-ast-lowering/src/types.rs:34:43 [INFO] [stdout] | [INFO] [stdout] 34 | TypeDeclKind::Enum { .. } => false, [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] = note: `#[warn(clippy::unneeded_struct_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-ast-lowering/src/types.rs:36:44 [INFO] [stdout] | [INFO] [stdout] 36 | TypeDeclKind::Alias { .. } => false, [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct pattern is not needed for a unit variant [INFO] [stdout] --> spade-ast-lowering/src/types.rs:94:43 [INFO] [stdout] | [INFO] [stdout] 94 | TypeDeclKind::Enum { .. } => false, [INFO] [stdout] | ^^^^^^^ help: remove the struct pattern [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:166:17 [INFO] [stdout] | [INFO] [stdout] 166 | ident.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:191:17 [INFO] [stdout] | [INFO] [stdout] 191 | name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:220:36 [INFO] [stdout] | [INFO] [stdout] 220 | let path = Path::ident(ident.clone()).at_loc(ident); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/lib.rs:236:53 [INFO] [stdout] | [INFO] [stdout] 236 | name: Generic::Named(name_id.at_loc(&ident)), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:247:36 [INFO] [stdout] | [INFO] [stdout] 247 | let path = Path::ident(name.clone()).at_loc(name); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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] --> spade-ast-lowering/src/lib.rs:252:53 [INFO] [stdout] | [INFO] [stdout] 252 | name: Generic::Named(name_id.at_loc(&name)), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:470:37 [INFO] [stdout] | [INFO] [stdout] 470 | / ... return Err(Diagnostic::error(name, format!("Tuple members can only be types, found {other_meta}")) [INFO] [stdout] 471 | | ... .primary_label(format!("Expected type, found {other_meta}")) [INFO] [stdout] 472 | | ... .secondary_label(&inner, format!("{name} is defined as {other_meta} here"))) [INFO] [stdout] | |__________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 470 ~ Err(Diagnostic::error(name, format!("Tuple members can only be types, found {other_meta}")) [INFO] [stdout] 471 + .primary_label(format!("Expected type, found {other_meta}")) [INFO] [stdout] 472 + .secondary_label(&inner, format!("{name} is defined as {other_meta} here"))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:478:25 [INFO] [stdout] | [INFO] [stdout] 478 | / return Err(Diagnostic::error( [INFO] [stdout] 479 | | p, [INFO] [stdout] 480 | | "Tuple elements must be types, not type level integers", [INFO] [stdout] 481 | | ) [INFO] [stdout] 482 | | .primary_label("Tuples cannot contain non-types")) [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 478 ~ Err(Diagnostic::error( [INFO] [stdout] 479 + p, [INFO] [stdout] 480 + "Tuple elements must be types, not type level integers", [INFO] [stdout] 481 + ) [INFO] [stdout] 482 + .primary_label("Tuples cannot contain non-types")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:532:30 [INFO] [stdout] | [INFO] [stdout] 532 | if inner.is_port(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/lib.rs:539:31 [INFO] [stdout] | [INFO] [stdout] 539 | if inner.is_inout(&ctx)? { [INFO] [stdout] | ^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/lib.rs:575:64 [INFO] [stdout] | [INFO] [stdout] 575 | ctx.item_list.hidden_constraints.push(specs.at_loc(&t)); [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] --> spade-ast-lowering/src/lib.rs:576:69 [INFO] [stdout] | [INFO] [stdout] 576 | Ok(hir::TypeSpec::Generic(Generic::Hidden(new_id.at_loc(&t)))) [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: the borrowed expression implements the required traits [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:641:62 [INFO] [stdout] | [INFO] [stdout] 641 | diag.span_suggest_insert_before(suggest_msg, &l.args[0].1, "self, ") [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `l.args[0].1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:689:26 [INFO] [stdout] | [INFO] [stdout] 689 | arg_names.insert(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:701:19 [INFO] [stdout] | [INFO] [stdout] 701 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:818:10 [INFO] [stdout] | [INFO] [stdout] 818 | .map(Loc::strip_ref) [INFO] [stdout] | __________^ [INFO] [stdout] 819 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(Loc::strip_ref)` [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: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:950:15 [INFO] [stdout] | [INFO] [stdout] 950 | name: head.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `head.name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:978:40 [INFO] [stdout] | [INFO] [stdout] 978 | .primary_label(format!("Expected type level integer")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expected type level integer".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1157:17 [INFO] [stdout] | [INFO] [stdout] 1157 | format!("This expression is not supported in a type expression"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"This expression is not supported in a type expression".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1324:27 [INFO] [stdout] | [INFO] [stdout] 1324 | .join(Path::ident(name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1392:31 [INFO] [stdout] | [INFO] [stdout] 1392 | wal_suffix = Some(suffix.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*suffix` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1423:51 [INFO] [stdout] | [INFO] [stdout] 1423 | ctx.symtab.add_local_variable(ident.clone()).at_loc(ident), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1440:36 [INFO] [stdout] | [INFO] [stdout] 1440 | ctx.symtab.re_add_type(ident.clone(), name_id.inner.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/lib.rs:1449:42 [INFO] [stdout] | [INFO] [stdout] 1449 | .map_ref(|body| visit_expression(&body, ctx)); [INFO] [stdout] | ^^^^^ help: change this to: `body` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1461:41 [INFO] [stdout] | [INFO] [stdout] 1461 | ... suffix: suffix.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `suffix.inner` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1565:43 [INFO] [stdout] | [INFO] [stdout] 1565 | Some(ty) => format!("({})", ty.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1704:17 [INFO] [stdout] | [INFO] [stdout] 1704 | / std::iter::repeat("_") [INFO] [stdout] 1705 | | .take(expected) [INFO] [stdout] | |___________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("_", expected)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1735:21 [INFO] [stdout] | [INFO] [stdout] 1735 | / return Err( [INFO] [stdout] 1736 | | Diagnostic::error(ident, format!("{ident} was already defined")) [INFO] [stdout] 1737 | | .secondary_label(previous, "First defined here") [INFO] [stdout] 1738 | | .primary_label("Later defined here") [INFO] [stdout] 1739 | | .secondary_label(state.loc(), format!("{ident} declared here")) [INFO] [stdout] 1740 | | .note("Declared variables can only be defined once"), [INFO] [stdout] 1741 | | ); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1735 ~ Err( [INFO] [stdout] 1736 + Diagnostic::error(ident, format!("{ident} was already defined")) [INFO] [stdout] 1737 + .secondary_label(previous, "First defined here") [INFO] [stdout] 1738 + .primary_label("Later defined here") [INFO] [stdout] 1739 + .secondary_label(state.loc(), format!("{ident} declared here")) [INFO] [stdout] 1740 + .note("Declared variables can only be defined once"), [INFO] [stdout] 1741 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1720:51 [INFO] [stdout] | [INFO] [stdout] 1720 | .mark_declaration_defined(ident.clone(), ident.loc()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1726:41 [INFO] [stdout] | [INFO] [stdout] 1726 | Thing::Variable(ident.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1731:51 [INFO] [stdout] | [INFO] [stdout] 1731 | .mark_declaration_defined(ident.clone(), ident.loc()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1747:33 [INFO] [stdout] | [INFO] [stdout] 1747 | Path::ident(ident.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1748:37 [INFO] [stdout] | [INFO] [stdout] 1748 | Thing::Variable(ident.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*ident` [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] --> spade-ast-lowering/src/lib.rs:1766:49 [INFO] [stdout] | [INFO] [stdout] 1766 | inner: Some(Box::new(pat.at_loc(&inner))), [INFO] [stdout] | ^^^^^^ help: change this to: `inner` [INFO] [stdout] | [INFO] [stdout] = 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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1817:33 [INFO] [stdout] | [INFO] [stdout] 1817 | ... }| ident.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident.inner` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1825:73 [INFO] [stdout] | [INFO] [stdout] 1825 | ... ast::Pattern::Path(Path::ident_with_loc(target.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1833:46 [INFO] [stdout] | [INFO] [stdout] 1833 | ... new: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1838:42 [INFO] [stdout] | [INFO] [stdout] 1838 | ... bound.insert(target.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1841:43 [INFO] [stdout] | [INFO] [stdout] 1841 | ... name: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1851:41 [INFO] [stdout] | [INFO] [stdout] 1851 | ... target: target.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*target` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1886:41 [INFO] [stdout] | [INFO] [stdout] 1886 | ... target: arg.name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `arg.name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1911:42 [INFO] [stdout] | [INFO] [stdout] 1911 | .add_declaration(name.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:1954:41 [INFO] [stdout] | [INFO] [stdout] 1954 | ... suffix: suffix.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `suffix.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2017:24 [INFO] [stdout] | [INFO] [stdout] 2017 | let cond = match cond { [INFO] [stdout] | ________________________^ [INFO] [stdout] 2018 | | Some(cond) => Some(cond.visit(visit_expression, ctx)), [INFO] [stdout] 2019 | | None => None, [INFO] [stdout] 2020 | | }; [INFO] [stdout] | |_____________^ help: try: `cond.as_ref().map(|cond| cond.visit(visit_expression, ctx))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2048:50 [INFO] [stdout] | [INFO] [stdout] 2048 | .lookup_type_symbol(&Path::ident(name.clone()).at_loc(name), false)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2095:29 [INFO] [stdout] | [INFO] [stdout] 2095 | ... name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2100:85 [INFO] [stdout] | [INFO] [stdout] 2100 | let expr = ast::Expression::Identifier(Path::ident_with_loc(name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2104:29 [INFO] [stdout] | [INFO] [stdout] 2104 | ... name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2159:18 [INFO] [stdout] | [INFO] [stdout] 2159 | .map(|params| hir::ArgumentList::Named(params)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `hir::ArgumentList::Named` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2145:67 [INFO] [stdout] | [INFO] [stdout] 2145 | ast::TypeSpec::Named(Path::ident_with_loc(name.clone()), None).at_loc(name), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2150:62 [INFO] [stdout] | [INFO] [stdout] 2150 | Ok(hir::expression::NamedArgument::Short(name.clone(), arg)) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2155:61 [INFO] [stdout] | [INFO] [stdout] 2155 | Ok(hir::expression::NamedArgument::Full(name.clone(), arg)) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2393:41 [INFO] [stdout] | [INFO] [stdout] 2393 | ... Path::ident(label.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*label` [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] --> spade-ast-lowering/src/lib.rs:2449:43 [INFO] [stdout] | [INFO] [stdout] 2449 | let loc = ().between_locs(&target, &index); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [INFO] [stdout] | [INFO] [stdout] = 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] --> spade-ast-lowering/src/lib.rs:2449:52 [INFO] [stdout] | [INFO] [stdout] 2449 | let loc = ().between_locs(&target, &index); [INFO] [stdout] | ^^^^^^ help: change this to: `index` [INFO] [stdout] | [INFO] [stdout] = 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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2464:13 [INFO] [stdout] | [INFO] [stdout] 2464 | field.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*field` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2477:23 [INFO] [stdout] | [INFO] [stdout] 2477 | name: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2618:33 [INFO] [stdout] | [INFO] [stdout] 2618 | ... format!("or a type level uint"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"or a type level uint".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2680:62 [INFO] [stdout] | [INFO] [stdout] 2680 | ... .lookup_type_symbol(&Path::ident(name.clone()).at_loc(name), false)? [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2693:45 [INFO] [stdout] | [INFO] [stdout] 2693 | let path = Path::ident_with_loc(name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2705:73 [INFO] [stdout] | [INFO] [stdout] 2705 | ... .add_undecleared_at_offset(pipeline_offset, name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2881:25 [INFO] [stdout] | [INFO] [stdout] 2881 | .unwrap_or_else(|| hir::AttributeList::empty()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `hir::AttributeList::empty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2844:64 [INFO] [stdout] | [INFO] [stdout] 2844 | .lookup_variable(&Path::ident_with_loc(state.clone()))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*state` [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 `Identifier` which implements the `Copy` trait [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2870:37 [INFO] [stdout] | [INFO] [stdout] 2870 | ... suffix: suffix.inner.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `suffix.inner` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> spade-ast-lowering/src/lib.rs:2901:20 [INFO] [stdout] | [INFO] [stdout] 2901 | verilog_attrs: &Vec<(Loc, Option>)>, [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] 2901 ~ verilog_attrs: &[(Loc, Option>)], [INFO] [stdout] 2902 | ) -> bool { [INFO] [stdout] ... [INFO] [stdout] 2907 | } => { [INFO] [stdout] 2908 ~ verilog_attr_groups.push(verilog_attrs.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> spade-ast-lowering/src/global_symbols.rs:297:41 [INFO] [stdout] | [INFO] [stdout] 297 | visit_unit(&None, e, &None, &vec![], ctx)?; [INFO] [stdout] | ^^^^^^^ help: you can use a slice directly: `&[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:194:64 [INFO] [stdout] | [INFO] [stdout] 194 | KnownType::Bool(b) => ConstraintExpr::Bool(b.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> spade-hir-lowering/src/monomorphisation.rs:517:17 [INFO] [stdout] | [INFO] [stdout] 517 | type_state: type_state, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `type_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:311:27 [INFO] [stdout] | [INFO] [stdout] 311 | replaces: replaces.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*replaces` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | inside: inside.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*inside` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:349:25 [INFO] [stdout] | [INFO] [stdout] 349 | ConstraintExpr::Var(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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:447:60 [INFO] [stdout] | [INFO] [stdout] 447 | ... .push(().at_loc(&rhs).map(|_| (expr.clone(), replacement.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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] --> spade-typeinference/src/constraints.rs:455:50 [INFO] [stdout] | [INFO] [stdout] 455 | ... val: KnownType::Bool(val.clone()), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*val` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:459:60 [INFO] [stdout] | [INFO] [stdout] 459 | ... .push(().at_loc(&rhs).map(|_| (expr.clone(), replacement.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:471:60 [INFO] [stdout] | [INFO] [stdout] 471 | ... .push(().at_loc(&rhs).map(|_| (expr.clone(), replacement.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/constraints.rs:493:55 [INFO] [stdout] | [INFO] [stdout] 493 | | ConstraintExpr::Sub(_) => Some((expr.clone(), rhs)), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `expr` [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 field names in struct initialization [INFO] [stdout] --> spade-hir-lowering/src/lib.rs:646:17 [INFO] [stdout] | [INFO] [stdout] 646 | result_name: result_name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:90:38 [INFO] [stdout] | [INFO] [stdout] 90 | ... .map(|p| format!("{}", p.display_with_meta(meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `p.display_with_meta(meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:111:34 [INFO] [stdout] | [INFO] [stdout] 111 | .map(|t| format!("{}", t.display_with_meta(meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:145:25 [INFO] [stdout] | [INFO] [stdout] 145 | format!("_") [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:168:41 [INFO] [stdout] | [INFO] [stdout] 168 | KnownType::Tuple => format!("Tuple"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Tuple".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:169:41 [INFO] [stdout] | [INFO] [stdout] 169 | KnownType::Array => format!("Array"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Array".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:170:40 [INFO] [stdout] | [INFO] [stdout] 170 | KnownType::Wire => format!("&"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"&".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:171:44 [INFO] [stdout] | [INFO] [stdout] 171 | KnownType::Inverted => format!("inv &"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"inv &".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:172:41 [INFO] [stdout] | [INFO] [stdout] 172 | KnownType::Error => format!("{{error}}"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{error}".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc<()>` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/equation.rs:288:17 [INFO] [stdout] | [INFO] [stdout] 288 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:476:38 [INFO] [stdout] | [INFO] [stdout] 476 | ... .map(|p| format!("{}", p.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `p.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:497:34 [INFO] [stdout] | [INFO] [stdout] 497 | .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:527:17 [INFO] [stdout] | [INFO] [stdout] 527 | / format!( [INFO] [stdout] 528 | | "{}", [INFO] [stdout] 529 | | traits [INFO] [stdout] 530 | | .inner [INFO] [stdout] ... | [INFO] [stdout] 533 | | .join("+"), [INFO] [stdout] 534 | | ) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 527 ~ traits [INFO] [stdout] 528 + .inner [INFO] [stdout] 529 + .iter() [INFO] [stdout] 530 + .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] 531 + .join("+").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/equation.rs:532:34 [INFO] [stdout] | [INFO] [stdout] 532 | .map(|t| format!("{}", t.display_with_meta(display_meta, type_state))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `t.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc<()>` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/equation.rs:547:13 [INFO] [stdout] | [INFO] [stdout] 547 | loc.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*loc` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> spade-typeinference/src/equation.rs:549:20 [INFO] [stdout] | [INFO] [stdout] 549 | params.into_iter().map(|p| p.insert(type_state)).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] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> spade-typeinference/src/error.rs:51:10 [INFO] [stdout] | [INFO] [stdout] 51 | ) -> std::result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 442 | / FromConstraints { [INFO] [stdout] 443 | | expected: UnificationTrace, [INFO] [stdout] 444 | | got: UnificationTrace, [INFO] [stdout] 445 | | source: ConstraintSource, [INFO] [stdout] 446 | | loc: Loc<()>, [INFO] [stdout] 447 | | is_meta_error: bool, [INFO] [stdout] 448 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 137 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::UnificationError`, 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: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:208:25 [INFO] [stdout] | [INFO] [stdout] 208 | format!("{}", e.failing.display_with_meta(display_meta, type_state)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `e.failing.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | format!("{}", g.failing.display_with_meta(display_meta, type_state)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `g.failing.display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:232:25 [INFO] [stdout] | [INFO] [stdout] 232 | format!("{}", traits[0].display_with_meta(display_meta, type_state)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `traits[0].display_with_meta(display_meta, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:270:25 [INFO] [stdout] | [INFO] [stdout] 270 | / format!( [INFO] [stdout] 271 | | "{}", [INFO] [stdout] 272 | | expected [INFO] [stdout] 273 | | .failing [INFO] [stdout] 274 | | .display_with_meta(is_meta_error, type_state) [INFO] [stdout] 275 | | ), [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 270 ~ expected [INFO] [stdout] 271 + .failing [INFO] [stdout] 272 ~ .display_with_meta(is_meta_error, type_state).to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> spade-typeinference/src/error.rs:280:25 [INFO] [stdout] | [INFO] [stdout] 280 | / format!( [INFO] [stdout] 281 | | "{}", [INFO] [stdout] 282 | | got.failing.display_with_meta(is_meta_error, type_state) [INFO] [stdout] 283 | | ), [INFO] [stdout] | |_________________________^ help: consider using `.to_string()`: `got.failing.display_with_meta(is_meta_error, type_state).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:92:45 [INFO] [stdout] | [INFO] [stdout] 92 | value: ConstantInt::Generic(generic.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*generic` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:114:72 [INFO] [stdout] | [INFO] [stdout] 114 | self.add_equation(TypedExpression::Id(*depth_typeexpr_id), depth.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `depth` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:120:56 [INFO] [stdout] | [INFO] [stdout] 120 | self.add_equation(key.clone(), var.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | let var = self.owned.equations.get(&key).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.owned.equations.get(&key).unwrap()` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:135:25 [INFO] [stdout] | [INFO] [stdout] 135 | total_offset.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `total_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: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:138:58 [INFO] [stdout] | [INFO] [stdout] 138 | ... Box::new(ConstraintExpr::Var(self.get_pipeline_state(expression)? [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 139 | | ... .current_stage_depth.clone())) [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 138 ~ Box::new(ConstraintExpr::Var(self.get_pipeline_state(expression)? [INFO] [stdout] 139 ~ .current_stage_depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:157:35 [INFO] [stdout] | [INFO] [stdout] 157 | definition_depth: pipeline_state [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 158 | | .total_depth [INFO] [stdout] 159 | | .clone(), [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 157 ~ definition_depth: pipeline_state [INFO] [stdout] 158 ~ .total_depth, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:160:32 [INFO] [stdout] | [INFO] [stdout] 160 | current_stage: pipeline_state.current_stage_depth.clone().nowhere(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pipeline_state.current_stage_depth` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:314:39 [INFO] [stdout] | [INFO] [stdout] 314 | let true_inner_type = inner_types[index.inner as usize].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_types[index.inner as usize]` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | field: field.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*field` [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 `Loc` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:408:25 [INFO] [stdout] | [INFO] [stdout] 408 | method: name.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*name` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:500:87 [INFO] [stdout] | [INFO] [stdout] 500 | let inverted = TypeVar::Known(expression.loc(), KnownType::Inverted, vec![inner_type.clone()]).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:553:17 [INFO] [stdout] | [INFO] [stdout] 553 | array_size.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:557:24 [INFO] [stdout] | [INFO] [stdout] 557 | array: array_type.clone().at_loc(target), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:558:29 [INFO] [stdout] | [INFO] [stdout] 558 | array_size: array_size.clone().at_loc(index) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:589:66 [INFO] [stdout] | [INFO] [stdout] 589 | let in_array_type = TypeVar::array(expression.loc(), inner_type.clone(), in_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:589:86 [INFO] [stdout] | [INFO] [stdout] 589 | let in_array_type = TypeVar::array(expression.loc(), inner_type.clone(), in_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `in_array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:591:67 [INFO] [stdout] | [INFO] [stdout] 591 | let out_array_type = TypeVar::array(expression.loc(), inner_type.clone(), out_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inner_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:591:87 [INFO] [stdout] | [INFO] [stdout] 591 | let out_array_type = TypeVar::array(expression.loc(), inner_type.clone(), out_array_size.clone()).insert(self); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `out_array_size` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:603:59 [INFO] [stdout] | [INFO] [stdout] 603 | let out_size_constraint = ConstraintExpr::Var(end_var.clone()) - ConstraintExpr::Var(start_var.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `end_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:603:98 [INFO] [stdout] | [INFO] [stdout] 603 | let out_size_constraint = ConstraintExpr::Var(end_var.clone()) - ConstraintExpr::Var(start_var.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:606:83 [INFO] [stdout] | [INFO] [stdout] 606 | ...expr: expression.loc(), start: start_var.clone().at_loc(&start_loc), end: end_var.clone().at_loc(&end_loc) }.check_or_add(self, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_var` [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 `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:606:126 [INFO] [stdout] | [INFO] [stdout] 606 | ...clone().at_loc(&start_loc), end: end_var.clone().at_loc(&end_loc) }.check_or_add(self, ctx)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `end_var` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> spade-types/src/meta_types.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / if self > other { [INFO] [stdout] 63 | | false [INFO] [stdout] 64 | | } else { [INFO] [stdout] 65 | | true [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self <= other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TypeVarID` which implements the `Copy` trait [INFO] [stdout] --> spade-typeinference/src/expression.rs:763:25 [INFO] [stdout] | [INFO] [stdout] 763 | result_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result_size` [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 `TypeVarID` which implements the `Copy` trait [WARN] too many lines in the log, truncating it