[INFO] fetching crate graphix-compiler 0.6.0... [INFO] linting graphix-compiler-0.6.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate graphix-compiler 0.6.0 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate graphix-compiler 0.6.0 [INFO] finished tweaking crates.io crate graphix-compiler 0.6.0 [INFO] tweaked toml for crates.io crate graphix-compiler 0.6.0 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate graphix-compiler 0.6.0 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 crates.io crate graphix-compiler 0.6.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded netidx-derive v0.31.5 [INFO] [stderr] Downloaded netidx-value v0.31.6 [INFO] [stderr] Downloaded poolshark_derive v0.1.2 [INFO] [stderr] Downloaded libgssapi-sys v0.3.3 [INFO] [stderr] Downloaded if-addrs v0.15.0 [INFO] [stderr] Downloaded block-buffer v0.12.0 [INFO] [stderr] Downloaded libgssapi v0.9.1 [INFO] [stderr] Downloaded netidx-netproto v0.31.3 [INFO] [stderr] Downloaded immutable-chunkmap v2.1.2 [INFO] [stderr] Downloaded jiff-static v0.2.20 [INFO] [stderr] Downloaded x509-parser v0.18.1 [INFO] [stderr] Downloaded keyring v3.6.3 [INFO] [stderr] Downloaded netidx v0.31.5 [INFO] [stderr] Downloaded bumpalo v3.20.1 [INFO] [stderr] Downloaded netidx-protocols v0.31.5 [INFO] [stderr] Downloaded fish-printf v0.2.1 [INFO] [stderr] Downloaded hybrid-array v0.4.7 [INFO] [stderr] Downloaded digest v0.11.1 [INFO] [stderr] Downloaded netidx-core v0.31.5 [INFO] [stderr] Downloaded triomphe v0.1.15 [INFO] [stderr] Downloaded cross-krb5 v0.4.2 [INFO] [stderr] Downloaded arcstr v1.2.0 [INFO] [stderr] Downloaded escaping v0.2.3 [INFO] [stderr] Downloaded daemonize v0.5.0 [INFO] [stderr] Downloaded jiff v0.2.20 [INFO] [stderr] Downloaded poolshark v0.2.7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6a66bc07336ac805ba0ea02d228cb04c88cd6aa6cbed2d326eca73905a093cb9 [INFO] running `Command { std: "docker" "start" "-a" "6a66bc07336ac805ba0ea02d228cb04c88cd6aa6cbed2d326eca73905a093cb9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6a66bc07336ac805ba0ea02d228cb04c88cd6aa6cbed2d326eca73905a093cb9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a66bc07336ac805ba0ea02d228cb04c88cd6aa6cbed2d326eca73905a093cb9", kill_on_drop: false }` [INFO] [stdout] 6a66bc07336ac805ba0ea02d228cb04c88cd6aa6cbed2d326eca73905a093cb9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f0b19ac4f56f06ceafd9dd874ed34665debe1bb7398b1a6ccfe66aedef70b325 [INFO] running `Command { std: "docker" "start" "-a" "f0b19ac4f56f06ceafd9dd874ed34665debe1bb7398b1a6ccfe66aedef70b325", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling syn v2.0.116 [INFO] [stderr] Compiling getrandom v0.4.1 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Checking rand_core v0.10.0 [INFO] [stderr] Compiling prettyplease v0.2.37 [INFO] [stderr] Compiling fs_extra v1.3.0 [INFO] [stderr] Compiling dunce v1.0.5 [INFO] [stderr] Compiling regex-syntax v0.8.9 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling libloading v0.8.9 [INFO] [stderr] Compiling bindgen v0.71.1 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking futures-core v0.3.32 [INFO] [stderr] Compiling anyhow v1.0.101 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking block-padding v0.3.3 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Compiling regex-automata v0.4.14 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Compiling itertools v0.13.0 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Checking hybrid-array v0.4.7 [INFO] [stderr] Checking crossbeam-queue v0.3.12 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling aws-lc-sys v0.37.1 [INFO] [stderr] Compiling rustc-hash v2.1.1 [INFO] [stderr] Compiling bitflags v2.11.0 [INFO] [stderr] Compiling aws-lc-rs v1.16.0 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Compiling time-macros v0.2.27 [INFO] [stderr] Checking deranged v0.5.6 [INFO] [stderr] Compiling regex v1.12.3 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking cpufeatures v0.3.0 [INFO] [stderr] Compiling rust_decimal v1.40.0 [INFO] [stderr] Checking time v0.3.47 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling poolshark_derive v0.1.2 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Compiling asn1-rs-impl v0.2.0 [INFO] [stderr] Compiling asn1-rs-derive v0.6.0 [INFO] [stderr] Compiling enumflags2_derive v0.7.12 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking chacha20 v0.10.0 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking rusticata-macros v4.1.0 [INFO] [stderr] Checking block-buffer v0.12.0 [INFO] [stderr] Checking crypto-common v0.2.1 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking rustls-pki-types v1.14.0 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking der v0.7.10 [INFO] [stderr] Checking crossbeam v0.8.4 [INFO] [stderr] Checking sha3 v0.10.8 [INFO] [stderr] Checking digest v0.11.1 [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Checking asn1-rs v0.7.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking rand v0.10.0 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking uuid v1.21.0 [INFO] [stderr] Checking salsa20 v0.10.2 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Compiling rustls v0.23.36 [INFO] [stderr] Compiling oid-registry v0.8.1 [INFO] [stderr] Checking scrypt v0.11.0 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Checking spki v0.7.3 [INFO] [stderr] Compiling derive_builder_core v0.20.2 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Compiling netidx-derive v0.31.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Checking triomphe v0.1.15 [INFO] [stderr] Checking poolshark v0.2.7 [INFO] [stderr] Checking compact_str v0.9.0 [INFO] [stderr] Checking arcstr v1.2.0 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking immutable-chunkmap v2.1.2 [INFO] [stderr] Checking combine v4.6.7 [INFO] [stderr] Checking escaping v0.2.3 [INFO] [stderr] Checking cbc v0.1.2 [INFO] [stderr] Checking fish-printf v0.2.1 [INFO] [stderr] Checking socket2 v0.6.2 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking bstr v1.12.1 [INFO] [stderr] Compiling seq-macro v0.3.6 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling zerocopy v0.8.39 [INFO] [stderr] Checking globset v0.4.18 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking netidx-core v0.31.5 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking pkcs5 v0.7.1 [INFO] [stderr] Checking der-parser v10.0.0 [INFO] [stderr] Compiling derive_builder_macro v0.20.2 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking nix v0.30.1 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Compiling libgssapi-sys v0.3.3 [INFO] [stderr] Checking x509-parser v0.18.1 [INFO] [stderr] Checking tempdir v0.3.7 [INFO] [stderr] Checking pkcs8 v0.10.2 [INFO] [stderr] Checking derive_builder v0.20.2 [INFO] [stderr] Checking ctrlc v3.5.1 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Checking daemonize v0.5.0 [INFO] [stderr] Checking if-addrs v0.15.0 [INFO] [stderr] Checking keyring v3.6.3 [INFO] [stderr] Checking wait-timeout v0.2.1 [INFO] [stderr] Checking bit-vec v0.8.0 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking env_filter v1.0.0 [INFO] [stderr] Checking bit-set v0.8.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking tempfile v3.25.0 [INFO] [stderr] Checking rand_xorshift v0.4.0 [INFO] [stderr] Checking jiff v0.2.20 [INFO] [stderr] Checking libgssapi v0.9.1 [INFO] [stderr] Checking rusty-fork v0.3.1 [INFO] [stderr] Checking unarray v0.1.4 [INFO] [stderr] Checking cross-krb5 v0.4.2 [INFO] [stderr] Checking netidx-value v0.31.6 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking env_logger v0.11.9 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking proptest v1.10.0 [INFO] [stderr] Checking netidx-netproto v0.31.3 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking netidx v0.31.5 [INFO] [stderr] Checking netidx-protocols v0.31.5 [INFO] [stderr] Checking graphix-compiler v0.6.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/typ/contains.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/typ/contains.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/typ/tval.rs:70:55 [INFO] [stdout] | [INFO] [stdout] 70 | Self { typ: value, env: self.env, v: v }.fmt_int(f, hist)?; [INFO] [stdout] | ^^^^ help: replace it with: `v` [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: unneeded unit expression [INFO] [stdout] --> src/typ/tvar.rs:321:21 [INFO] [stdout] | [INFO] [stdout] 321 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/typ/tvar.rs:372:21 [INFO] [stdout] | [INFO] [stdout] 372 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/typ/tval.rs:70:55 [INFO] [stdout] | [INFO] [stdout] 70 | Self { typ: value, env: self.env, v: v }.fmt_int(f, hist)?; [INFO] [stdout] | ^^^^ help: replace it with: `v` [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: unneeded unit expression [INFO] [stdout] --> src/typ/tvar.rs:321:21 [INFO] [stdout] | [INFO] [stdout] 321 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/typ/tvar.rs:372:21 [INFO] [stdout] | [INFO] [stdout] 372 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/env.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | if let None = vals.remove_cow(&CompactString::from(k)) { [INFO] [stdout] | -------^^^^------------------------------------------- help: try: `if vals.remove_cow(&CompactString::from(k)).is_none()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `BindId` which implements the `Copy` trait [INFO] [stdout] --> src/env.rs:169:72 [INFO] [stdout] | [INFO] [stdout] 169 | ... v.into_iter().map(|(k, v)| (k.clone(), 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] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:284:17 [INFO] [stdout] | [INFO] [stdout] 284 | / if m.0.starts_with(&*p.0) { [INFO] [stdout] 285 | | if let Some(m) = m.strip_prefix(scope) { [INFO] [stdout] 286 | | if !m.trim().is_empty() { [INFO] [stdout] 287 | | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] ... | [INFO] [stdout] 290 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 284 ~ if m.0.starts_with(&*p.0) [INFO] [stdout] 285 ~ && let Some(m) = m.strip_prefix(scope) { [INFO] [stdout] 286 | if !m.trim().is_empty() { [INFO] [stdout] 287 | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] 288 | } [INFO] [stdout] 289 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:285:21 [INFO] [stdout] | [INFO] [stdout] 285 | / if let Some(m) = m.strip_prefix(scope) { [INFO] [stdout] 286 | | if !m.trim().is_empty() { [INFO] [stdout] 287 | | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] 288 | | } [INFO] [stdout] 289 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 285 ~ if let Some(m) = m.strip_prefix(scope) [INFO] [stdout] 286 ~ && !m.trim().is_empty() { [INFO] [stdout] 287 | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] 288 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `check_tvars_declared` doesn't need a mutable reference [INFO] [stdout] --> src/env.rs:336:44 [INFO] [stdout] | [INFO] [stdout] 336 | t.check_tvars_declared(&mut declared)?; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 336 - t.check_tvars_declared(&mut declared)?; [INFO] [stdout] 336 + t.check_tvars_declared(&declared)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 387 | / if let Some(b) = self.by_id.remove_cow(&id) { [INFO] [stdout] 388 | | if let Some(binds) = self.binds.get_mut_cow(&b.scope) { [INFO] [stdout] 389 | | binds.remove_cow(&b.name); [INFO] [stdout] 390 | | if binds.len() == 0 { [INFO] [stdout] ... | [INFO] [stdout] 394 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 387 ~ if let Some(b) = self.by_id.remove_cow(&id) [INFO] [stdout] 388 ~ && let Some(binds) = self.binds.get_mut_cow(&b.scope) { [INFO] [stdout] 389 | binds.remove_cow(&b.name); [INFO] [stdout] ... [INFO] [stdout] 392 | } [INFO] [stdout] 393 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/env.rs:402:17 [INFO] [stdout] | [INFO] [stdout] 402 | Ok(Arc::make_mut(used).push(name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 402 ~ Arc::make_mut(used).push(name.clone()); [INFO] [stdout] 403 + Ok(()) [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] --> src/expr/parser/interpolateexp.rs:23:24 [INFO] [stdout] | [INFO] [stdout] 23 | fn to_expr(self) -> Expr { [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: length comparison to zero [INFO] [stdout] --> src/expr/parser/typexp.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | if parts.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `parts.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/typexp.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | fn fnconstraints() -> impl Parser>>>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `arcstr::ArcStr` [INFO] [stdout] --> src/expr/parser/typexp.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | label: Some((name.into(), optional)), [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/typexp.rs:128:54 [INFO] [stdout] | [INFO] [stdout] 128 | string("@args:").with(typ()).map(|e| Either::Right(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/typexp.rs:309:24 [INFO] [stdout] | [INFO] [stdout] 309 | tvar().map(|tv| Type::TVar(tv)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Type::TVar` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/lambdaexp.rs:116:17 [INFO] [stdout] | [INFO] [stdout] 116 | |mut v: LPooled, 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: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr/parser/lambdaexp.rs:142:50 [INFO] [stdout] | [INFO] [stdout] 142 | match v.iter().enumerate().find(|(_, a)| match &a.pattern { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 143 | | StructurePattern::Bind(n) if n == "@args" => true, [INFO] [stdout] 144 | | _ => false, [INFO] [stdout] 145 | | }) { [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] 142 - match v.iter().enumerate().find(|(_, a)| match &a.pattern { [INFO] [stdout] 143 - StructurePattern::Bind(n) if n == "@args" => true, [INFO] [stdout] 144 - _ => false, [INFO] [stdout] 145 - }) { [INFO] [stdout] 142 + match v.iter().enumerate().find(|(_, a)| matches!(&a.pattern, StructurePattern::Bind(n) if n == "@args")) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/lambdaexp.rs:187:24 [INFO] [stdout] | [INFO] [stdout] 187 | expr().map(|e| Either::Left(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/arrayexp.rs:87:41 [INFO] [stdout] | [INFO] [stdout] 87 | attempt(expr()).map(|e| Either::Right(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/patternexp.rs:58:41 [INFO] [stdout] | [INFO] [stdout] 58 | structure_pattern().map(|p| Either::Left(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Left` [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: length comparison to zero [INFO] [stdout] --> src/expr/parser/patternexp.rs:66:12 [INFO] [stdout] | [INFO] [stdout] 66 | if pats.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pats.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: named constant with interior mutability [INFO] [stdout] --> src/expr/parser/mod.rs:73:11 [INFO] [stdout] | [INFO] [stdout] 73 | pub const RESERVED: LazyLock> = LazyLock::new(|| { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/parser/mod.rs:146:16 [INFO] [stdout] | [INFO] [stdout] 146 | if lines.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines.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: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/parser/mod.rs:183:12 [INFO] [stdout] | [INFO] [stdout] 183 | if RESERVED.contains(&s.as_str()) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/parser/mod.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | if RESERVED.contains(&s.as_str()) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/mod.rs:482:39 [INFO] [stdout] | [INFO] [stdout] 482 | .map(|(pos, (arg, mut arms)): (_, (Expr, LPooled>))| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/mod.rs:550:34 [INFO] [stdout] | [INFO] [stdout] 550 | .then(|(pos, mut exprs): (_, LPooled)>>)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/mod.rs:636:42 [INFO] [stdout] | [INFO] [stdout] 636 | |(pos, (source, mut exprs)): ( [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 637 | | _, [INFO] [stdout] 638 | | (Expr, LPooled)>>), [INFO] [stdout] 639 | | )| { [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: deref on an immutable reference [INFO] [stdout] --> src/expr/parser/mod.rs:780:43 [INFO] [stdout] | [INFO] [stdout] 780 | .easy_parse(position::Stream::new(&*s)) [INFO] [stdout] | ^^^ help: if you would like to reborrow, try removing `&*`: `s` [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: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/expr/pattern.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | binds.iter().fold(Ok::<_, anyhow::Error>(Type::Bottom), |t, p| { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 154 | | Ok(t?.union(env, &p.infer_type_predicate(env)?)?) [INFO] [stdout] 155 | | })?; [INFO] [stdout] | |______________________^ help: use `try_fold` instead: `try_fold(Type::Bottom, |t, p| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/expr/pattern.rs:154:25 [INFO] [stdout] | [INFO] [stdout] 154 | Ok(t?.union(env, &p.infer_type_predicate(env)?)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 154 - Ok(t?.union(env, &p.infer_type_predicate(env)?)?) [INFO] [stdout] 154 + t?.union(env, &p.infer_type_predicate(env)?) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/expr/pattern.rs:168:48 [INFO] [stdout] | [INFO] [stdout] 168 | Ok(Type::Struct(Arc::from_iter(typs.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/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:152:20 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 168 - Ok(Type::Struct(Arc::from_iter(typs.into_iter()))) [INFO] [stdout] 168 + Ok(Type::Struct(Arc::from_iter(typs))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/pattern.rs:231:62 [INFO] [stdout] | [INFO] [stdout] 231 | StructurePattern::Variant { all, tag, binds } if binds.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `binds.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: struct `PrettyBuf` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/expr/print.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/expr/print.rs:70:29 [INFO] [stdout] | [INFO] [stdout] 70 | self.buf.extend((0..self.indent).into_iter().map(|_| ' ')); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..self.indent)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/expr/print.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | return Ok(()); [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] 121 - return Ok(()); [INFO] [stdout] 121 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/expr/print.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 139 | if doc == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `doc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/expr/print.rs:154:16 [INFO] [stdout] | [INFO] [stdout] 154 | if doc == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `doc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/print.rs:803:51 [INFO] [stdout] | [INFO] [stdout] 803 | ExprKind::Variant { tag: _, args } if args.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/expr/print.rs:833:25 [INFO] [stdout] | [INFO] [stdout] 833 | writeln!(buf, "")?; [INFO] [stdout] | ^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/expr/print.rs:947:54 [INFO] [stdout] | [INFO] [stdout] 947 | ExprKind::Do { exprs } => print_exprs(f, &**exprs, "{", "}", "; "), [INFO] [stdout] | ^^^^^^^^ help: try: `exprs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/print.rs:969:48 [INFO] [stdout] | [INFO] [stdout] 969 | ExprKind::Variant { tag, args } if args.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/print.rs:991:65 [INFO] [stdout] | [INFO] [stdout] 991 | ExprKind::Constant(Value::String(s)) if s.len() > 0 => { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/expr/print.rs:992:65 [INFO] [stdout] | [INFO] [stdout] 992 | ... let es = parser::GRAPHIX_ESC.escape(&*s); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 992 - let es = parser::GRAPHIX_ESC.escape(&*s); [INFO] [stdout] 992 + let es = parser::GRAPHIX_ESC.escape(s); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 992 | let es = parser::GRAPHIX_ESC.escape(&**s); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/expr/resolver.rs:111:11 [INFO] [stdout] | [INFO] [stdout] 111 | base: &PathBuf, [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] 111 ~ base: &Path, [INFO] [stdout] 112 | errors: &mut Vec, [INFO] [stdout] ... [INFO] [stdout] 122 | } [INFO] [stdout] 123 ~ let mut impl_path = base.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/expr/resolver.rs:248:40 [INFO] [stdout] | [INFO] [stdout] 248 | Some(ExprKind::Bind(v)) => match &v.pattern { [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 249 | | StructurePattern::Bind(n) => { [INFO] [stdout] 250 | | if let Some(name) = after_bind.remove(n) { [INFO] [stdout] 251 | | in_sig.remove(name); [INFO] [stdout] ... | [INFO] [stdout] 256 | | _ => (), [INFO] [stdout] 257 | | }, [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] 248 ~ Some(ExprKind::Bind(v)) => if let StructurePattern::Bind(n) = &v.pattern { [INFO] [stdout] 249 + if let Some(name) = after_bind.remove(n) { [INFO] [stdout] 250 + in_sig.remove(name); [INFO] [stdout] 251 + res.push(synth(name)); [INFO] [stdout] 252 + continue; [INFO] [stdout] 253 + } [INFO] [stdout] 254 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/expr/resolver.rs:292:1 [INFO] [stdout] | [INFO] [stdout] 292 | / async fn resolve( [INFO] [stdout] 293 | | scope: ModPath, [INFO] [stdout] 294 | | prepend: Option>, [INFO] [stdout] 295 | | resolvers: Arc<[ModuleResolver]>, [INFO] [stdout] ... | [INFO] [stdout] 300 | | from_interface: bool, [INFO] [stdout] 301 | | ) -> 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] --> src/expr/resolver.rs:353:55 [INFO] [stdout] | [INFO] [stdout] 353 | Some(sig) => add_interface_modules(exprs, &sig), [INFO] [stdout] | ^^^^ help: change this to: `sig` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr/resolver.rs:372:20 [INFO] [stdout] | [INFO] [stdout] 372 | acc || match &e.kind { [INFO] [stdout] | ____________________^ [INFO] [stdout] 373 | | ExprKind::Module { value: ModuleKind::Unresolved { .. }, .. } => true, [INFO] [stdout] 374 | | _ => false, [INFO] [stdout] 375 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 372 - acc || match &e.kind { [INFO] [stdout] 373 - ExprKind::Module { value: ModuleKind::Unresolved { .. }, .. } => true, [INFO] [stdout] 374 - _ => false, [INFO] [stdout] 375 - } [INFO] [stdout] 372 + acc || matches!(&e.kind, ExprKind::Module { value: ModuleKind::Unresolved { .. }, .. }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/resolver.rs:512:43 [INFO] [stdout] | [INFO] [stdout] 512 | e.resolve_modules_int(&scope, &prepend, resolvers).await [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/resolver.rs:677:43 [INFO] [stdout] | [INFO] [stdout] 677 | e.resolve_modules_int(&scope, &prepend, resolvers).await [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/resolver.rs:677:51 [INFO] [stdout] | [INFO] [stdout] 677 | e.resolve_modules_int(&scope, &prepend, resolvers).await [INFO] [stdout] | ^^^^^^^^ help: change this to: `prepend` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/expr/mod.rs:38:11 [INFO] [stdout] | [INFO] [stdout] 38 | pub const VNAME: LazyLock = [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/expr/mod.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | const DEFAULT_ORIGIN: LazyLock> = [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/expr/mod.rs:47:51 [INFO] [stdout] | [INFO] [stdout] 47 | static ORIGIN: RefCell>> = RefCell::new(None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(None) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/mod.rs:56:49 [INFO] [stdout] | [INFO] [stdout] 56 | ori.as_ref().cloned().unwrap_or_else(|| DEFAULT_ORIGIN.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/expr/mod.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | &*self.items [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.items` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/expr/mod.rs:258:1 [INFO] [stdout] | [INFO] [stdout] 258 | / impl Default for Source { [INFO] [stdout] 259 | | fn default() -> Self { [INFO] [stdout] 260 | | Self::Unspecified [INFO] [stdout] 261 | | } [INFO] [stdout] 262 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 251 + #[derive(Default)] [INFO] [stdout] 252 | pub enum Source { [INFO] [stdout] 253 | File(PathBuf), [INFO] [stdout] 254 | Netidx(Path), [INFO] [stdout] 255 | Internal(ArcStr), [INFO] [stdout] 256 ~ #[default] [INFO] [stdout] 257 ~ Unspecified, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/expr/mod.rs:329:25 [INFO] [stdout] | [INFO] [stdout] 329 | writeln!(f, "")?; [INFO] [stdout] | ^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/expr/mod.rs:587:43 [INFO] [stdout] | [INFO] [stdout] 587 | static BUF: RefCell = RefCell::new(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/node/array.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / pub(crate) fn compile( [INFO] [stdout] 128 | | ctx: &mut ExecCtx, [INFO] [stdout] 129 | | flags: BitFlags, [INFO] [stdout] 130 | | spec: Expr, [INFO] [stdout] ... | [INFO] [stdout] 135 | | end: &Option>, [INFO] [stdout] 136 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/array.rs:208:47 [INFO] [stdout] | [INFO] [stdout] 208 | self.typ.check_contains(&ctx.env, &self.source.node.typ()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/array.rs:212:59 [INFO] [stdout] | [INFO] [stdout] 212 | wrap!(start.node, it.check_contains(&ctx.env, &start.node.typ()))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `start.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/array.rs:216:57 [INFO] [stdout] | [INFO] [stdout] 216 | wrap!(end.node, it.check_contains(&ctx.env, &end.node.typ()))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `end.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/node/array.rs:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 334 - Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] 334 + self.typ.check_contains(&ctx.env, &rtype) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/array.rs:328:18 [INFO] [stdout] | [INFO] [stdout] 328 | .fold(Ok(rtype), |rtype, n| n.node.typ().union(&ctx.env, &rtype?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(rtype, |rtype, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/node/bind.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 34 | if !pattern.single_bind().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pattern.single_bind().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/bind.rs:47:59 [INFO] [stdout] | [INFO] [stdout] 47 | let node = compile(ctx, flags, value.clone(), &scope, top_id)?; [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/bind.rs:56:59 [INFO] [stdout] | [INFO] [stdout] 56 | let node = compile(ctx, flags, value.clone(), &scope, top_id)?; [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = 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 are using an explicit closure for cloning elements [INFO] [stdout] --> src/node/bind.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | event.variables.get(&self.id).map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `event.variables.get(&self.id).cloned()` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/node/bind.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | / if let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] 299 | | let new_id = BindId::from(i); [INFO] [stdout] 300 | | if self.id != Some(new_id) { [INFO] [stdout] 301 | | if let Some(old) = self.id { [INFO] [stdout] ... | [INFO] [stdout] 307 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/node/bind.rs:297:21 [INFO] [stdout] | [INFO] [stdout] 297 | if let Some(v) = self.child.update(ctx, event) { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 298 | if let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/bind.rs:297:9 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Some(v) = self.child.update(ctx, event) { [INFO] [stdout] 298 | | if let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] 299 | | let new_id = BindId::from(i); [INFO] [stdout] 300 | | if self.id != Some(new_id) { [INFO] [stdout] ... | [INFO] [stdout] 308 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 297 ~ if let Some(v) = self.child.update(ctx, event) [INFO] [stdout] 298 ~ && let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] 299 | let new_id = BindId::from(i); [INFO] [stdout] ... [INFO] [stdout] 306 | } [INFO] [stdout] 307 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/node/callsite.rs:25:6 [INFO] [stdout] | [INFO] [stdout] 25 | ) -> Result<(Vec>, FxHashMap>, bool)>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/node/callsite.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | / fn bind( [INFO] [stdout] 86 | | &mut self, [INFO] [stdout] 87 | | ctx: &mut ExecCtx, [INFO] [stdout] 88 | | scope: Scope, [INFO] [stdout] ... | [INFO] [stdout] 93 | | set: &mut Vec, [INFO] [stdout] 94 | | ) -> 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 `if` statement can be collapsed [INFO] [stdout] --> src/node/callsite.rs:216:21 [INFO] [stdout] | [INFO] [stdout] 216 | / if let Entry::Vacant(e) = event.variables.entry(id) { [INFO] [stdout] 217 | | if let Some(v) = ctx.cached.get(&id) { [INFO] [stdout] 218 | | e.insert(v.clone()); [INFO] [stdout] 219 | | set.push(id); [INFO] [stdout] 220 | | } [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 216 ~ if let Entry::Vacant(e) = event.variables.entry(id) [INFO] [stdout] 217 ~ && let Some(v) = ctx.cached.get(&id) { [INFO] [stdout] 218 | e.insert(v.clone()); [INFO] [stdout] 219 | set.push(id); [INFO] [stdout] 220 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:98:48 [INFO] [stdout] | [INFO] [stdout] 98 | t.check_contains(&ctx.env, &n.node.typ())? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/node/data.rs:181:41 [INFO] [stdout] | [INFO] [stdout] 181 | ... None if &r.name == &v[0] => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 181 - None if &r.name == &v[0] => { [INFO] [stdout] 181 + None if r.name == v[0] => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:252:66 [INFO] [stdout] | [INFO] [stdout] 252 | ... typ.check_contains(&ctx.env, &rep.n.node.typ()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `rep.n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:450:48 [INFO] [stdout] | [INFO] [stdout] 450 | t.check_contains(&ctx.env, &n.node.typ())? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node/data.rs:490:12 [INFO] [stdout] | [INFO] [stdout] 490 | if self.n.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.n.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:541:62 [INFO] [stdout] | [INFO] [stdout] 541 | wrap!(n.node, t.check_contains(&ctx.env, &n.node.typ()))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = 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 are using an explicit closure for cloning elements [INFO] [stdout] --> src/node/data.rs:572:17 [INFO] [stdout] | [INFO] [stdout] 572 | ts.get(field).map(|t| t.clone()).unwrap_or_else(Type::empty_tvar) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `ts.get(field).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/node/data.rs:584:32 [INFO] [stdout] | [INFO] [stdout] 584 | Value::Array(a) => a.get(self.field).map(|v| v.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `a.get(self.field).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/node/error.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub(crate) fn new( [INFO] [stdout] 66 | | ctx: &mut ExecCtx, [INFO] [stdout] 67 | | flags: BitFlags, [INFO] [stdout] 68 | | spec: Expr, [INFO] [stdout] ... | [INFO] [stdout] 96 | | Ok(Box::new(Self { spec, typ, nodes, handler })) [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/error.rs:292:51 [INFO] [stdout] | [INFO] [stdout] 292 | let etyp = wrap!(self, fix_echain_typ(&ctx, &etyp))?; [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/node/lambda.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / impl PartialOrd for LambdaDef { [INFO] [stdout] 44 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 45 | | Some(self.id.cmp(&other.id)) [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [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] 44 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 45 - Some(self.id.cmp(&other.id)) [INFO] [stdout] 46 - } [INFO] [stdout] 44 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:112:53 [INFO] [stdout] | [INFO] [stdout] 112 | wrap!(arg, typ.check_contains(&ctx.env, &arg.typ()))?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `arg.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:115:66 [INFO] [stdout] | [INFO] [stdout] 115 | wrap!(self.body, self.typ.rtype.check_contains(&ctx.env, &self.body.typ()))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.body.typ()` [INFO] [stdout] | [INFO] [stdout] = help: 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] --> src/node/lambda.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | / pub(super) fn new( [INFO] [stdout] 149 | | ctx: &mut ExecCtx, [INFO] [stdout] 150 | | flags: BitFlags, [INFO] [stdout] 151 | | typ: Arc, [INFO] [stdout] ... | [INFO] [stdout] 156 | | body: Expr, [INFO] [stdout] 157 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:172:46 [INFO] [stdout] | [INFO] [stdout] 172 | let body = compile(ctx, flags, body, &scope, tid)?; [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = 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 loop variable `i` is used to index `args` [INFO] [stdout] --> src/node/lambda.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | for i in 0..args.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 209 - for i in 0..args.len() { [INFO] [stdout] 209 + for (i, ) in args.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:216:58 [INFO] [stdout] | [INFO] [stdout] 216 | wrap!(args[i], atyp.check_contains(&ctx.env, &args[i].typ()))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `args[i].typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/node/lambda.rs:327:58 [INFO] [stdout] | [INFO] [stdout] 327 | let rtype = rtype.clone().unwrap_or_else(|| Type::empty_tvar()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Type::empty_tvar` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/node/lambda.rs:329:60 [INFO] [stdout] | [INFO] [stdout] 329 | let throws = throws.clone().unwrap_or_else(|| Type::empty_tvar()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Type::empty_tvar` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/node/map.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 110 - Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] 110 + self.typ.check_contains(&ctx.env, &rtype) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/map.rs:102:14 [INFO] [stdout] | [INFO] [stdout] 102 | .fold(Ok(Type::Bottom), |acc, n| n.node.typ().union(&ctx.env, &acc?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Type::Bottom, |acc, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/map.rs:107:14 [INFO] [stdout] | [INFO] [stdout] 107 | .fold(Ok(Type::Bottom), |acc, n| n.node.typ().union(&ctx.env, &acc?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Type::Bottom, |acc, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/module.rs:115:57 [INFO] [stdout] | [INFO] [stdout] 115 | && let Some(proxy_bind) = ctx.env.by_id.get(&proxy_id) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `proxy_id` [INFO] [stdout] | [INFO] [stdout] = help: 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] --> src/node/module.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | / pub(super) fn compile_dynamic( [INFO] [stdout] 227 | | ctx: &mut ExecCtx, [INFO] [stdout] 228 | | flags: BitFlags, [INFO] [stdout] 229 | | spec: Expr, [INFO] [stdout] ... | [INFO] [stdout] 234 | | top_id: ExprId, [INFO] [stdout] 235 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/module.rs:238:42 [INFO] [stdout] | [INFO] [stdout] 238 | bind_sig(&mut ctx.env, &mut env, &scope, &sig) [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/module.rs:265:42 [INFO] [stdout] | [INFO] [stdout] 265 | bind_sig(&mut ctx.env, &mut env, &scope, &sig) [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node/pattern.rs:474:53 [INFO] [stdout] | [INFO] [stdout] 474 | Self::Variant { tag, all: _, binds } if binds.len() == 0 => match v { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `binds.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node/pattern.rs:530:17 [INFO] [stdout] | [INFO] [stdout] 530 | binds.len() > 0 && binds.iter().any(|p| p.is_refutable()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!binds.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/pattern.rs:542:35 [INFO] [stdout] | [INFO] [stdout] 542 | ctx.cached.remove(&id); [INFO] [stdout] | ^^^ help: change this to: `id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/pattern.rs:643:63 [INFO] [stdout] | [INFO] [stdout] 643 | .map(|g| compiler::compile(ctx, flags, g.clone(), &scope, top_id)) [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/select.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | / if arg_up && pat.guard.is_some() { [INFO] [stdout] 70 | | if let Some(arg) = arg.cached.as_ref() { [INFO] [stdout] 71 | | pat.bind_event(ctx, event, arg); [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if arg_up && pat.guard.is_some() [INFO] [stdout] 70 ~ && let Some(arg) = arg.cached.as_ref() { [INFO] [stdout] 71 | pat.bind_event(ctx, event, arg); [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/select.rs:207:40 [INFO] [stdout] | [INFO] [stdout] 207 | itype.check_contains(&ctx.env, &self.arg.node.typ()).map_err(|e| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.arg.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/select.rs:212:40 [INFO] [stdout] | [INFO] [stdout] 212 | mtype.check_contains(&ctx.env, &self.arg.node.typ()).map_err(|e| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.arg.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/node/mod.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / pub(crate) fn new(typ: Type) -> Node { [INFO] [stdout] 96 | | Box::new(Nop { typ }) [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/mod.rs:169:9 [INFO] [stdout] | [INFO] [stdout] 169 | &self.n.typ() [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.n.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/mod.rs:419:9 [INFO] [stdout] | [INFO] [stdout] 419 | &self.children.last().map(|n| n.typ()).unwrap_or(&Type::Bottom) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.children.last().map(|n| n.typ()).unwrap_or(&Type::Bottom)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/node/mod.rs:469:43 [INFO] [stdout] | [INFO] [stdout] 469 | static BUF: RefCell = RefCell::new(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/mod.rs:623:9 [INFO] [stdout] | [INFO] [stdout] 623 | / if let Some(Value::U64(id)) = event.variables.get(&self.src_id) { [INFO] [stdout] 624 | | if let Some(target_id) = ctx.env.byref_chain.get(&BindId::from(*id)) { [INFO] [stdout] 625 | | self.target_id = Some(*target_id); [INFO] [stdout] 626 | | up = true; [INFO] [stdout] 627 | | } [INFO] [stdout] 628 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 623 ~ if let Some(Value::U64(id)) = event.variables.get(&self.src_id) [INFO] [stdout] 624 ~ && let Some(target_id) = ctx.env.byref_chain.get(&BindId::from(*id)) { [INFO] [stdout] 625 | self.target_id = Some(*target_id); [INFO] [stdout] 626 | up = true; [INFO] [stdout] 627 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/mod.rs:629:9 [INFO] [stdout] | [INFO] [stdout] 629 | / if up { [INFO] [stdout] 630 | | if let Some(v) = &self.rhs.cached { [INFO] [stdout] 631 | | if let Some(id) = self.target_id { [INFO] [stdout] 632 | | ctx.set_var(id, v.clone()); [INFO] [stdout] ... | [INFO] [stdout] 635 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 629 ~ if up [INFO] [stdout] 630 ~ && let Some(v) = &self.rhs.cached { [INFO] [stdout] 631 | if let Some(id) = self.target_id { [INFO] [stdout] 632 | ctx.set_var(id, v.clone()); [INFO] [stdout] 633 | } [INFO] [stdout] 634 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/mod.rs:630:13 [INFO] [stdout] | [INFO] [stdout] 630 | / if let Some(v) = &self.rhs.cached { [INFO] [stdout] 631 | | if let Some(id) = self.target_id { [INFO] [stdout] 632 | | ctx.set_var(id, v.clone()); [INFO] [stdout] 633 | | } [INFO] [stdout] 634 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 630 ~ if let Some(v) = &self.rhs.cached [INFO] [stdout] 631 ~ && let Some(id) = self.target_id { [INFO] [stdout] 632 | ctx.set_var(id, v.clone()); [INFO] [stdout] 633 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/mod.rs:789:27 [INFO] [stdout] | [INFO] [stdout] 789 | self.n.iter().fold(Ok(rtyp), |rtype, n| rtype?.union(&ctx.env, n.typ())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(rtyp, |rtype, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/node/mod.rs:829:16 [INFO] [stdout] | [INFO] [stdout] 829 | if let Some(_) = self.trigger.update(ctx, event) { [INFO] [stdout] | -------^^^^^^^---------------------------------- help: try: `if self.trigger.update(ctx, event).is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:18:67 [INFO] [stdout] | [INFO] [stdout] 18 | Type::Set(s) | Type::Abstract { id: _, params: s } => Ok(for t in s.iter() { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 19 | | t.check_cast_int(env, hist)? [INFO] [stdout] 20 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 18 ~ Type::Set(s) | Type::Abstract { id: _, params: s } => { [INFO] [stdout] 19 + let _: () = for t in s.iter() { [INFO] [stdout] 20 + t.check_cast_int(env, hist)? [INFO] [stdout] 21 + }; [INFO] [stdout] 22 + Ok(()) [INFO] [stdout] 23 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | Type::Tuple(ts) => Ok(for t in ts.iter() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 33 | | t.check_cast_int(env, hist)? [INFO] [stdout] 34 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 32 ~ Type::Tuple(ts) => { [INFO] [stdout] 33 + let _: () = for t in ts.iter() { [INFO] [stdout] 34 + t.check_cast_int(env, hist)? [INFO] [stdout] 35 + }; [INFO] [stdout] 36 + Ok(()) [INFO] [stdout] 37 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:35:33 [INFO] [stdout] | [INFO] [stdout] 35 | Type::Struct(ts) => Ok(for (_, t) in ts.iter() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 36 | | t.check_cast_int(env, hist)? [INFO] [stdout] 37 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 35 ~ Type::Struct(ts) => { [INFO] [stdout] 36 + let _: () = for (_, t) in ts.iter() { [INFO] [stdout] 37 + t.check_cast_int(env, hist)? [INFO] [stdout] 38 + }; [INFO] [stdout] 39 + Ok(()) [INFO] [stdout] 40 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:38:37 [INFO] [stdout] | [INFO] [stdout] 38 | Type::Variant(_, ts) => Ok(for t in ts.iter() { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 39 | | t.check_cast_int(env, hist)? [INFO] [stdout] 40 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 38 ~ Type::Variant(_, ts) => { [INFO] [stdout] 39 + let _: () = for t in ts.iter() { [INFO] [stdout] 40 + t.check_cast_int(env, hist)? [INFO] [stdout] 41 + }; [INFO] [stdout] 42 + Ok(()) [INFO] [stdout] 43 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/typ/cast.rs:144:60 [INFO] [stdout] | [INFO] [stdout] 144 | Value::Array(a) if a.len() == 2 => match &a[0] { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 145 | | Value::String(_) => true, [INFO] [stdout] 146 | | _ => false, [INFO] [stdout] 147 | | }, [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 144 - Value::Array(a) if a.len() == 2 => match &a[0] { [INFO] [stdout] 145 - Value::String(_) => true, [INFO] [stdout] 146 - _ => false, [INFO] [stdout] 147 - }, [INFO] [stdout] 144 + Value::Array(a) if a.len() == 2 => matches!(&a[0], Value::String(_)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/cast.rs:161:64 [INFO] [stdout] | [INFO] [stdout] 161 | let keys_ok = ts.iter().zip(elts_s.iter()).fold( [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 162 | | Ok(true), [INFO] [stdout] 163 | | |acc: Result<_>, ((fname, t), v)| { [INFO] [stdout] 164 | | let kok = acc?; [INFO] [stdout] ... | [INFO] [stdout] 175 | | }, [INFO] [stdout] 176 | | )?; [INFO] [stdout] | |_____________________^ help: use `try_fold` instead: `try_fold(true, |acc: Result<_>, ((fname, t), v)| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/cast.rs:202:39 [INFO] [stdout] | [INFO] [stdout] 202 | Type::Variant(tag, ts) if ts.len() == 0 => match &v { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/cast.rs:273:55 [INFO] [stdout] | [INFO] [stdout] 273 | Type::Primitive(t) => t.contains(Typ::get(&v)), [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/cast.rs:316:39 [INFO] [stdout] | [INFO] [stdout] 316 | Type::Variant(tag, ts) if ts.len() == 0 => match &v { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ts.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/typ/cast.rs:338:28 [INFO] [stdout] | [INFO] [stdout] 338 | Type::Fn(_) => match v { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 339 | | Value::Abstract(a) if AbstractTypeRegistry::is_a(a, "lambda") => true, [INFO] [stdout] 340 | | _ => false, [INFO] [stdout] 341 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 338 - Type::Fn(_) => match v { [INFO] [stdout] 339 - Value::Abstract(a) if AbstractTypeRegistry::is_a(a, "lambda") => true, [INFO] [stdout] 340 - _ => false, [INFO] [stdout] 341 - }, [INFO] [stdout] 338 + Type::Fn(_) => matches!(v, Value::Abstract(a) if AbstractTypeRegistry::is_a(a, "lambda")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/contains.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | hist: &mut RefHist, Option), bool>>, [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: use `std::ptr::eq` when comparing raw pointers [INFO] [stdout] --> src/typ/contains.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | if (self as *const Type) == (t as *const Type) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self, t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq [INFO] [stdout] = note: `#[warn(clippy::ptr_eq)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/typ/contains.rs:72:24 [INFO] [stdout] | [INFO] [stdout] 72 | if let Some(_) = &*t0.read().typ.read() { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if (*t0.read().typ.read()).is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/typ/contains.rs:214:70 [INFO] [stdout] | [INFO] [stdout] 214 | ... return t0.contains_int(flags, env, hist, &*t1) [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `t1` [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: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/contains.rs:279:18 [INFO] [stdout] | [INFO] [stdout] 279 | .fold(Ok::<_, anyhow::Error>(false), |acc, t0| { [INFO] [stdout] | __________________^ [INFO] [stdout] 280 | | Ok(acc? || t0.contains_int(flags, env, hist, t)?) [INFO] [stdout] 281 | | })? [INFO] [stdout] | |__________________^ help: use `try_fold` instead: `try_fold(false, |acc, t0| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/contains.rs:282:35 [INFO] [stdout] | [INFO] [stdout] 282 | || t.iter_prims().fold(Ok::<_, anyhow::Error>(true), |acc, t1| { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 283 | | Ok(acc? [INFO] [stdout] 284 | | && s.iter().fold(Ok::<_, anyhow::Error>(false), |acc, t0| { [INFO] [stdout] 285 | | Ok(acc? || t0.contains_int(flags, env, hist, &t1)?) [INFO] [stdout] 286 | | })?) [INFO] [stdout] 287 | | })?), [INFO] [stdout] | |__________________^ help: use `try_fold` instead: `try_fold(true, |acc, t1| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/contains.rs:284:37 [INFO] [stdout] | [INFO] [stdout] 284 | && s.iter().fold(Ok::<_, anyhow::Error>(false), |acc, t0| { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 285 | | Ok(acc? || t0.contains_int(flags, env, hist, &t1)?) [INFO] [stdout] 286 | | })?) [INFO] [stdout] | |__________________________^ help: use `try_fold` instead: `try_fold(false, |acc, t0| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:34:22 [INFO] [stdout] | [INFO] [stdout] 34 | pub constraints: Arc>>>, [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: needlessly taken reference of both operands [INFO] [stdout] --> src/typ/fntyp.rs:60:16 [INFO] [stdout] | [INFO] [stdout] 60 | && &*constraints0.read() == &*constraints1.read() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 60 - && &*constraints0.read() == &*constraints1.read() [INFO] [stdout] 60 + && *constraints0.read() == *constraints1.read() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/typ/fntyp.rs:67:1 [INFO] [stdout] | [INFO] [stdout] 67 | / impl PartialOrd for FnType { [INFO] [stdout] 68 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 69 | | use std::cmp::Ordering; [INFO] [stdout] 70 | | let Self { [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 69 - use std::cmp::Ordering; [INFO] [stdout] 70 - let Self { [INFO] [stdout] 71 - args: args0, [INFO] [stdout] 72 - vargs: vargs0, [INFO] [stdout] 73 - rtype: rtype0, [INFO] [stdout] 74 - constraints: constraints0, [INFO] [stdout] 75 - throws: th0, [INFO] [stdout] 76 - explicit_throws: _, [INFO] [stdout] 77 - } = self; [INFO] [stdout] 78 - let Self { [INFO] [stdout] 79 - args: args1, [INFO] [stdout] 80 - vargs: vargs1, [INFO] [stdout] 81 - rtype: rtype1, [INFO] [stdout] 82 - constraints: constraints1, [INFO] [stdout] 83 - throws: th1, [INFO] [stdout] 84 - explicit_throws: _, [INFO] [stdout] 85 - } = other; [INFO] [stdout] 86 - match args0.partial_cmp(&args1) { [INFO] [stdout] 87 - Some(Ordering::Equal) => match vargs0.partial_cmp(vargs1) { [INFO] [stdout] 88 - Some(Ordering::Equal) => match rtype0.partial_cmp(rtype1) { [INFO] [stdout] 89 - Some(Ordering::Equal) => { [INFO] [stdout] 90 - match constraints0.read().partial_cmp(&*constraints1.read()) { [INFO] [stdout] 91 - Some(Ordering::Equal) => th0.partial_cmp(th1), [INFO] [stdout] 92 - r => r, [INFO] [stdout] 93 - } [INFO] [stdout] 94 - } [INFO] [stdout] 95 - r => r, [INFO] [stdout] 96 - }, [INFO] [stdout] 97 - r => r, [INFO] [stdout] 98 - }, [INFO] [stdout] 99 - r => r, [INFO] [stdout] 100 - } [INFO] [stdout] 101 - } [INFO] [stdout] 68 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/fntyp.rs:86:33 [INFO] [stdout] | [INFO] [stdout] 86 | match args0.partial_cmp(&args1) { [INFO] [stdout] | ^^^^^^ help: change this to: `args1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/typ/fntyp.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | / if let Some(t) = tv.read().typ.read().as_ref() [INFO] [stdout] 165 | | && t != &Type::Bottom [INFO] [stdout] 166 | | && t != &Type::Any [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 166 ~ && t != &Type::Any [INFO] [stdout] 167 ~ && !constraints.iter().any(|(tv, _)| tv.name == name) { [INFO] [stdout] 168 | t.bind_as(&Type::Any); [INFO] [stdout] 169 | constraints.push((tv.clone(), t.normalize())); [INFO] [stdout] 170 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:340:15 [INFO] [stdout] | [INFO] [stdout] 340 | hist: &mut RefHist, Option), bool>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:592:10 [INFO] [stdout] | [INFO] [stdout] 592 | ) -> LPooled, 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:593:22 [INFO] [stdout] | [INFO] [stdout] 593 | let mut tbl: LPooled, 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: length comparison to zero [INFO] [stdout] --> src/typ/fntyp.rs:639:12 [INFO] [stdout] | [INFO] [stdout] 639 | if constraints.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `constraints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/matches.rs:17:15 [INFO] [stdout] | [INFO] [stdout] 17 | hist: &mut RefHist, Option), bool>>, [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: use `std::ptr::eq` when comparing raw pointers [INFO] [stdout] --> src/typ/matches.rs:174:12 [INFO] [stdout] | [INFO] [stdout] 174 | if (self as *const Type) == (impl_type as *const Type) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self, impl_type)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/typ/normalize.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | ... s.iter().map(|t| t.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `s.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/print.rs:45:39 [INFO] [stdout] | [INFO] [stdout] 45 | Self::Variant(tag, ts) if ts.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/print.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | } else if s.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/setops.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | hist: &mut RefHist, Option), Type>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/setops.rs:217:15 [INFO] [stdout] | [INFO] [stdout] 217 | hist: &mut RefHist, Option), Type>>, [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: needlessly taken reference of both operands [INFO] [stdout] --> src/typ/setops.rs:340:20 [INFO] [stdout] | [INFO] [stdout] 340 | if &**t == &Type::Any { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 340 - if &**t == &Type::Any { [INFO] [stdout] 340 + if **t == Type::Any { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/typ/setops.rs:366:20 [INFO] [stdout] | [INFO] [stdout] 366 | if &**e == &Type::Any { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 366 - if &**e == &Type::Any { [INFO] [stdout] 366 + if **e == Type::Any { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:22:27 [INFO] [stdout] | [INFO] [stdout] 22 | if !self.typ.is_a(&self.env, &self.v) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self.env` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:22:38 [INFO] [stdout] | [INFO] [stdout] 22 | if !self.typ.is_a(&self.env, &self.v) { [INFO] [stdout] | ^^^^^^^ help: change this to: `self.v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:42:53 [INFO] [stdout] | [INFO] [stdout] 42 | let typ = match self.typ.lookup_ref(&self.env) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self.env` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:123:67 [INFO] [stdout] | [INFO] [stdout] 123 | (Type::Set(ts), v) => match ts.iter().find(|t| t.is_a(&self.env, v)) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self.env` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:35:51 [INFO] [stdout] | [INFO] [stdout] 35 | Type::Array(a) => would_cycle_inner(addr, &**a), [INFO] [stdout] | ^^^^ help: try: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:37:37 [INFO] [stdout] | [INFO] [stdout] 37 | would_cycle_inner(addr, &**key) || would_cycle_inner(addr, &**value) [INFO] [stdout] | ^^^^^^ help: try: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:37:72 [INFO] [stdout] | [INFO] [stdout] 37 | would_cycle_inner(addr, &**key) || would_cycle_inner(addr, &**value) [INFO] [stdout] | ^^^^^^^^ help: try: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tvar.rs:57:44 [INFO] [stdout] | [INFO] [stdout] 57 | || would_cycle_inner(addr, &throws) [INFO] [stdout] | ^^^^^^^ help: change this to: `throws` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | &*self.0 [INFO] [stdout] | ^^^^^^^^ help: try: `&self.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/typ/tvar.rs:120:1 [INFO] [stdout] | [INFO] [stdout] 120 | / impl PartialOrd for TVar { [INFO] [stdout] 121 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 122 | | let t0 = self.read(); [INFO] [stdout] 123 | | let t1 = other.read(); [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 121 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 122 - let t0 = self.read(); [INFO] [stdout] 123 - let t1 = other.read(); [INFO] [stdout] 124 - if t0.typ.as_ptr().addr() == t1.typ.as_ptr().addr() { [INFO] [stdout] 125 - Some(std::cmp::Ordering::Equal) [INFO] [stdout] 126 - } else { [INFO] [stdout] 127 - let t0 = t0.typ.read(); [INFO] [stdout] 128 - let t1 = t1.typ.read(); [INFO] [stdout] 129 - t0.partial_cmp(&*t1) [INFO] [stdout] 130 - } [INFO] [stdout] 131 - } [INFO] [stdout] 121 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/typ/tvar.rs:552:26 [INFO] [stdout] | [INFO] [stdout] 552 | .or_insert_with(TVar::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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/mod.rs:41:14 [INFO] [stdout] | [INFO] [stdout] 41 | ref_ids: LPooled, usize); 2]>>>, [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: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/mod.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | &*self.inner [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/mod.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | &mut *self.inner [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&mut self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/typ/mod.rs:110:1 [INFO] [stdout] | [INFO] [stdout] 110 | / impl Default for Type { [INFO] [stdout] 111 | | fn default() -> Self { [INFO] [stdout] 112 | | Self::Bottom [INFO] [stdout] 113 | | } [INFO] [stdout] 114 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 92 + #[derive(Default)] [INFO] [stdout] 93 | pub enum Type { [INFO] [stdout] 94 ~ #[default] [INFO] [stdout] 95 ~ Bottom, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:222:25 [INFO] [stdout] | [INFO] [stdout] 222 | pub static CBATCH_POOL: LazyLock)>>> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/lib.rs:362:13 [INFO] [stdout] | [INFO] [stdout] 362 | fn refs<'a>(&self, _refs: &mut Refs) {} [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: named constant with interior mutability [INFO] [stdout] --> src/lib.rs:410:11 [INFO] [stdout] | [INFO] [stdout] 410 | const TYP: LazyLock; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b, 'c [INFO] [stdout] --> src/lib.rs:412:17 [INFO] [stdout] | [INFO] [stdout] 412 | fn init<'a, 'b, 'c>( [INFO] [stdout] | ^^ ^^ [INFO] [stdout] ... [INFO] [stdout] 415 | scope: &'b Scope, [INFO] [stdout] | ^^ [INFO] [stdout] 416 | from: &'c [Node], [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] 412 ~ fn init<'a>( [INFO] [stdout] 413 | ctx: &'a mut ExecCtx, [INFO] [stdout] 414 | typ: &'a FnType, [INFO] [stdout] 415 ~ scope: &Scope, [INFO] [stdout] 416 ~ from: &[Node], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:563:12 [INFO] [stdout] | [INFO] [stdout] 563 | s: mpsc::Receiver)>>>, [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: deref which would be done by auto-deref [INFO] [stdout] --> src/lib.rs:691:11 [INFO] [stdout] | [INFO] [stdout] 691 | f(&mut *g) [INFO] [stdout] | ^^^^^^^ help: try: `&mut g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/lib.rs:707:25 [INFO] [stdout] | [INFO] [stdout] 707 | Self::with(|rg| rg.by_uuid.get(&a.id()).map(|r| *r)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `rg.by_uuid.get(&a.id()).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/lib.rs:770:27 [INFO] [stdout] | [INFO] [stdout] 770 | e.insert((T::TYP.clone(), T::init)); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/env.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | if let None = vals.remove_cow(&CompactString::from(k)) { [INFO] [stdout] | -------^^^^------------------------------------------- help: try: `if vals.remove_cow(&CompactString::from(k)).is_none()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `BindId` which implements the `Copy` trait [INFO] [stdout] --> src/env.rs:169:72 [INFO] [stdout] | [INFO] [stdout] 169 | ... v.into_iter().map(|(k, v)| (k.clone(), 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] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:284:17 [INFO] [stdout] | [INFO] [stdout] 284 | / if m.0.starts_with(&*p.0) { [INFO] [stdout] 285 | | if let Some(m) = m.strip_prefix(scope) { [INFO] [stdout] 286 | | if !m.trim().is_empty() { [INFO] [stdout] 287 | | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] ... | [INFO] [stdout] 290 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 284 ~ if m.0.starts_with(&*p.0) [INFO] [stdout] 285 ~ && let Some(m) = m.strip_prefix(scope) { [INFO] [stdout] 286 | if !m.trim().is_empty() { [INFO] [stdout] 287 | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] 288 | } [INFO] [stdout] 289 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:285:21 [INFO] [stdout] | [INFO] [stdout] 285 | / if let Some(m) = m.strip_prefix(scope) { [INFO] [stdout] 286 | | if !m.trim().is_empty() { [INFO] [stdout] 287 | | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] 288 | | } [INFO] [stdout] 289 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 285 ~ if let Some(m) = m.strip_prefix(scope) [INFO] [stdout] 286 ~ && !m.trim().is_empty() { [INFO] [stdout] 287 | res.push(ModPath(Path::from(ArcStr::from(m)))); [INFO] [stdout] 288 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `check_tvars_declared` doesn't need a mutable reference [INFO] [stdout] --> src/env.rs:336:44 [INFO] [stdout] | [INFO] [stdout] 336 | t.check_tvars_declared(&mut declared)?; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 336 - t.check_tvars_declared(&mut declared)?; [INFO] [stdout] 336 + t.check_tvars_declared(&declared)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/env.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 387 | / if let Some(b) = self.by_id.remove_cow(&id) { [INFO] [stdout] 388 | | if let Some(binds) = self.binds.get_mut_cow(&b.scope) { [INFO] [stdout] 389 | | binds.remove_cow(&b.name); [INFO] [stdout] 390 | | if binds.len() == 0 { [INFO] [stdout] ... | [INFO] [stdout] 394 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 387 ~ if let Some(b) = self.by_id.remove_cow(&id) [INFO] [stdout] 388 ~ && let Some(binds) = self.binds.get_mut_cow(&b.scope) { [INFO] [stdout] 389 | binds.remove_cow(&b.name); [INFO] [stdout] ... [INFO] [stdout] 392 | } [INFO] [stdout] 393 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/env.rs:402:17 [INFO] [stdout] | [INFO] [stdout] 402 | Ok(Arc::make_mut(used).push(name.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 402 ~ Arc::make_mut(used).push(name.clone()); [INFO] [stdout] 403 + Ok(()) [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] --> src/expr/parser/interpolateexp.rs:23:24 [INFO] [stdout] | [INFO] [stdout] 23 | fn to_expr(self) -> Expr { [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: length comparison to zero [INFO] [stdout] --> src/expr/parser/typexp.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | if parts.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `parts.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/typexp.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | fn fnconstraints() -> impl Parser>>>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `arcstr::ArcStr` [INFO] [stdout] --> src/expr/parser/typexp.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | label: Some((name.into(), optional)), [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/typexp.rs:128:54 [INFO] [stdout] | [INFO] [stdout] 128 | string("@args:").with(typ()).map(|e| Either::Right(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/typexp.rs:309:24 [INFO] [stdout] | [INFO] [stdout] 309 | tvar().map(|tv| Type::TVar(tv)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Type::TVar` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/lambdaexp.rs:116:17 [INFO] [stdout] | [INFO] [stdout] 116 | |mut v: LPooled, 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: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr/parser/lambdaexp.rs:142:50 [INFO] [stdout] | [INFO] [stdout] 142 | match v.iter().enumerate().find(|(_, a)| match &a.pattern { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 143 | | StructurePattern::Bind(n) if n == "@args" => true, [INFO] [stdout] 144 | | _ => false, [INFO] [stdout] 145 | | }) { [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] 142 - match v.iter().enumerate().find(|(_, a)| match &a.pattern { [INFO] [stdout] 143 - StructurePattern::Bind(n) if n == "@args" => true, [INFO] [stdout] 144 - _ => false, [INFO] [stdout] 145 - }) { [INFO] [stdout] 142 + match v.iter().enumerate().find(|(_, a)| matches!(&a.pattern, StructurePattern::Bind(n) if n == "@args")) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/lambdaexp.rs:187:24 [INFO] [stdout] | [INFO] [stdout] 187 | expr().map(|e| Either::Left(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/arrayexp.rs:87:41 [INFO] [stdout] | [INFO] [stdout] 87 | attempt(expr()).map(|e| Either::Right(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/parser/test.rs:78:65 [INFO] [stdout] | [INFO] [stdout] 78 | assert_eq!(ExprKind::Constant(p).to_expr_nopos(), parse_one(&s).unwrap()); [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/parser/patternexp.rs:58:41 [INFO] [stdout] | [INFO] [stdout] 58 | structure_pattern().map(|p| Either::Left(p)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Either::Left` [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: length comparison to zero [INFO] [stdout] --> src/expr/parser/patternexp.rs:66:12 [INFO] [stdout] | [INFO] [stdout] 66 | if pats.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pats.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: named constant with interior mutability [INFO] [stdout] --> src/expr/parser/mod.rs:73:11 [INFO] [stdout] | [INFO] [stdout] 73 | pub const RESERVED: LazyLock> = LazyLock::new(|| { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/parser/mod.rs:146:16 [INFO] [stdout] | [INFO] [stdout] 146 | if lines.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines.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: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/parser/mod.rs:183:12 [INFO] [stdout] | [INFO] [stdout] 183 | if RESERVED.contains(&s.as_str()) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/parser/mod.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | if RESERVED.contains(&s.as_str()) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/mod.rs:482:39 [INFO] [stdout] | [INFO] [stdout] 482 | .map(|(pos, (arg, mut arms)): (_, (Expr, LPooled>))| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/mod.rs:550:34 [INFO] [stdout] | [INFO] [stdout] 550 | .then(|(pos, mut exprs): (_, LPooled)>>)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/expr/parser/mod.rs:636:42 [INFO] [stdout] | [INFO] [stdout] 636 | |(pos, (source, mut exprs)): ( [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 637 | | _, [INFO] [stdout] 638 | | (Expr, LPooled)>>), [INFO] [stdout] 639 | | )| { [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: deref on an immutable reference [INFO] [stdout] --> src/expr/parser/mod.rs:780:43 [INFO] [stdout] | [INFO] [stdout] 780 | .easy_parse(position::Stream::new(&*s)) [INFO] [stdout] | ^^^ help: if you would like to reborrow, try removing `&*`: `s` [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] --> src/expr/parser/mod.rs:790:43 [INFO] [stdout] | [INFO] [stdout] 790 | .easy_parse(position::Stream::new(&*s)) [INFO] [stdout] | ^^^ help: if you would like to reborrow, try removing `&*`: `s` [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: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/expr/pattern.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | binds.iter().fold(Ok::<_, anyhow::Error>(Type::Bottom), |t, p| { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 154 | | Ok(t?.union(env, &p.infer_type_predicate(env)?)?) [INFO] [stdout] 155 | | })?; [INFO] [stdout] | |______________________^ help: use `try_fold` instead: `try_fold(Type::Bottom, |t, p| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/expr/pattern.rs:154:25 [INFO] [stdout] | [INFO] [stdout] 154 | Ok(t?.union(env, &p.infer_type_predicate(env)?)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 154 - Ok(t?.union(env, &p.infer_type_predicate(env)?)?) [INFO] [stdout] 154 + t?.union(env, &p.infer_type_predicate(env)?) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/expr/pattern.rs:168:48 [INFO] [stdout] | [INFO] [stdout] 168 | Ok(Type::Struct(Arc::from_iter(typs.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/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:152:20 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 168 - Ok(Type::Struct(Arc::from_iter(typs.into_iter()))) [INFO] [stdout] 168 + Ok(Type::Struct(Arc::from_iter(typs))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/pattern.rs:231:62 [INFO] [stdout] | [INFO] [stdout] 231 | StructurePattern::Variant { all, tag, binds } if binds.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `binds.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: struct `PrettyBuf` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/expr/print.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/expr/print.rs:70:29 [INFO] [stdout] | [INFO] [stdout] 70 | self.buf.extend((0..self.indent).into_iter().map(|_| ' ')); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..self.indent)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/expr/print.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | return Ok(()); [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] 121 - return Ok(()); [INFO] [stdout] 121 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/expr/print.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 139 | if doc == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `doc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/expr/print.rs:154:16 [INFO] [stdout] | [INFO] [stdout] 154 | if doc == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `doc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/print.rs:803:51 [INFO] [stdout] | [INFO] [stdout] 803 | ExprKind::Variant { tag: _, args } if args.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/expr/print.rs:833:25 [INFO] [stdout] | [INFO] [stdout] 833 | writeln!(buf, "")?; [INFO] [stdout] | ^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/expr/print.rs:947:54 [INFO] [stdout] | [INFO] [stdout] 947 | ExprKind::Do { exprs } => print_exprs(f, &**exprs, "{", "}", "; "), [INFO] [stdout] | ^^^^^^^^ help: try: `exprs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/print.rs:969:48 [INFO] [stdout] | [INFO] [stdout] 969 | ExprKind::Variant { tag, args } if args.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/print.rs:991:65 [INFO] [stdout] | [INFO] [stdout] 991 | ExprKind::Constant(Value::String(s)) if s.len() > 0 => { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/expr/print.rs:992:65 [INFO] [stdout] | [INFO] [stdout] 992 | ... let es = parser::GRAPHIX_ESC.escape(&*s); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 992 - let es = parser::GRAPHIX_ESC.escape(&*s); [INFO] [stdout] 992 + let es = parser::GRAPHIX_ESC.escape(s); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 992 | let es = parser::GRAPHIX_ESC.escape(&**s); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/expr/resolver.rs:111:11 [INFO] [stdout] | [INFO] [stdout] 111 | base: &PathBuf, [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] 111 ~ base: &Path, [INFO] [stdout] 112 | errors: &mut Vec, [INFO] [stdout] ... [INFO] [stdout] 122 | } [INFO] [stdout] 123 ~ let mut impl_path = base.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/expr/resolver.rs:248:40 [INFO] [stdout] | [INFO] [stdout] 248 | Some(ExprKind::Bind(v)) => match &v.pattern { [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 249 | | StructurePattern::Bind(n) => { [INFO] [stdout] 250 | | if let Some(name) = after_bind.remove(n) { [INFO] [stdout] 251 | | in_sig.remove(name); [INFO] [stdout] ... | [INFO] [stdout] 256 | | _ => (), [INFO] [stdout] 257 | | }, [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] 248 ~ Some(ExprKind::Bind(v)) => if let StructurePattern::Bind(n) = &v.pattern { [INFO] [stdout] 249 + if let Some(name) = after_bind.remove(n) { [INFO] [stdout] 250 + in_sig.remove(name); [INFO] [stdout] 251 + res.push(synth(name)); [INFO] [stdout] 252 + continue; [INFO] [stdout] 253 + } [INFO] [stdout] 254 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/expr/resolver.rs:292:1 [INFO] [stdout] | [INFO] [stdout] 292 | / async fn resolve( [INFO] [stdout] 293 | | scope: ModPath, [INFO] [stdout] 294 | | prepend: Option>, [INFO] [stdout] 295 | | resolvers: Arc<[ModuleResolver]>, [INFO] [stdout] ... | [INFO] [stdout] 300 | | from_interface: bool, [INFO] [stdout] 301 | | ) -> 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] --> src/expr/resolver.rs:353:55 [INFO] [stdout] | [INFO] [stdout] 353 | Some(sig) => add_interface_modules(exprs, &sig), [INFO] [stdout] | ^^^^ help: change this to: `sig` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr/resolver.rs:372:20 [INFO] [stdout] | [INFO] [stdout] 372 | acc || match &e.kind { [INFO] [stdout] | ____________________^ [INFO] [stdout] 373 | | ExprKind::Module { value: ModuleKind::Unresolved { .. }, .. } => true, [INFO] [stdout] 374 | | _ => false, [INFO] [stdout] 375 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 372 - acc || match &e.kind { [INFO] [stdout] 373 - ExprKind::Module { value: ModuleKind::Unresolved { .. }, .. } => true, [INFO] [stdout] 374 - _ => false, [INFO] [stdout] 375 - } [INFO] [stdout] 372 + acc || matches!(&e.kind, ExprKind::Module { value: ModuleKind::Unresolved { .. }, .. }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/resolver.rs:512:43 [INFO] [stdout] | [INFO] [stdout] 512 | e.resolve_modules_int(&scope, &prepend, resolvers).await [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/resolver.rs:677:43 [INFO] [stdout] | [INFO] [stdout] 677 | e.resolve_modules_int(&scope, &prepend, resolvers).await [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/resolver.rs:677:51 [INFO] [stdout] | [INFO] [stdout] 677 | e.resolve_modules_int(&scope, &prepend, resolvers).await [INFO] [stdout] | ^^^^^^^^ help: change this to: `prepend` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/test.rs:84:52 [INFO] [stdout] | [INFO] [stdout] 84 | .prop_filter("Filter reserved words", |s| !RESERVED.contains(s.as_str())) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/test.rs:101:52 [INFO] [stdout] | [INFO] [stdout] 101 | .prop_filter("Filter reserved words", |s| !RESERVED.contains(s.as_str())) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/expr/test.rs:152:29 [INFO] [stdout] | [INFO] [stdout] 152 | random_fname().prop_map(|n| TVar::empty_named(n)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TVar::empty_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: redundant closure [INFO] [stdout] --> src/expr/test.rs:304:26 [INFO] [stdout] | [INFO] [stdout] 304 | value().prop_map(|v| StructurePattern::Literal(v)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `StructurePattern::Literal` [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: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/expr/test.rs:388:41 [INFO] [stdout] | [INFO] [stdout] 388 | let params = Arc::from_iter(params.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/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:152:20 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 388 - let params = Arc::from_iter(params.into_iter()); [INFO] [stdout] 388 + let params = Arc::from_iter(params); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/test.rs:968:28 [INFO] [stdout] | [INFO] [stdout] 968 | if c1.len() > 0 && c0.len() > 0 => [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr/test.rs:968:44 [INFO] [stdout] | [INFO] [stdout] 968 | if c1.len() > 0 && c0.len() > 0 => [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c0.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: deref on an immutable reference [INFO] [stdout] --> src/expr/test.rs:972:37 [INFO] [stdout] | [INFO] [stdout] 972 | st.push_str(&*c1); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 972 - st.push_str(&*c1); [INFO] [stdout] 972 + st.push_str(c1); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 972 | st.push_str(&**c1); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:990:44 [INFO] [stdout] | [INFO] [stdout] 990 | (Some(t0), Some(t1)) => check_type(&t0, &t1), [INFO] [stdout] | ^^^ help: change this to: `t0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:990:49 [INFO] [stdout] | [INFO] [stdout] 990 | (Some(t0), Some(t1)) => check_type(&t0, &t1), [INFO] [stdout] | ^^^ help: change this to: `t1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr/test.rs:1006:34 [INFO] [stdout] | [INFO] [stdout] 1006 | binds.iter().all(|n| match n { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 1007 | | StructurePattern::Literal(_) => true, [INFO] [stdout] 1008 | | _ => false, [INFO] [stdout] 1009 | | }) && { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 1006 - binds.iter().all(|n| match n { [INFO] [stdout] 1007 - StructurePattern::Literal(_) => true, [INFO] [stdout] 1008 - _ => false, [INFO] [stdout] 1009 - }) && { [INFO] [stdout] 1006 + binds.iter().all(|n| matches!(n, StructurePattern::Literal(_))) && { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1144:28 [INFO] [stdout] | [INFO] [stdout] 1144 | && dbg!(check_type(&typ0, &typ1)) [INFO] [stdout] | ^^^^^ help: change this to: `typ0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1144:35 [INFO] [stdout] | [INFO] [stdout] 1144 | && dbg!(check_type(&typ0, &typ1)) [INFO] [stdout] | ^^^^^ help: change this to: `typ1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1430:43 [INFO] [stdout] | [INFO] [stdout] 1430 | ... && check_type(&tc0, &tc1))) [INFO] [stdout] | ^^^^ help: change this to: `tc0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1430:49 [INFO] [stdout] | [INFO] [stdout] 1430 | ... && check_type(&tc0, &tc1))) [INFO] [stdout] | ^^^^ help: change this to: `tc1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1463:43 [INFO] [stdout] | [INFO] [stdout] 1463 | ... && check_type(&tc0, &tc1))) [INFO] [stdout] | ^^^^ help: change this to: `tc0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1463:49 [INFO] [stdout] | [INFO] [stdout] 1463 | ... && check_type(&tc0, &tc1))) [INFO] [stdout] | ^^^^ help: change this to: `tc1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1487:59 [INFO] [stdout] | [INFO] [stdout] 1487 | ) => dbg!(check(expr0, expr1)) && dbg!(check_type(&typ0, &typ1)), [INFO] [stdout] | ^^^^^ help: change this to: `typ0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expr/test.rs:1487:66 [INFO] [stdout] | [INFO] [stdout] 1487 | ) => dbg!(check(expr0, expr1)) && dbg!(check_type(&typ0, &typ1)), [INFO] [stdout] | ^^^^^ help: change this to: `typ1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/expr/mod.rs:38:11 [INFO] [stdout] | [INFO] [stdout] 38 | pub const VNAME: LazyLock = [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/expr/mod.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | const DEFAULT_ORIGIN: LazyLock> = [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `static` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/expr/mod.rs:47:51 [INFO] [stdout] | [INFO] [stdout] 47 | static ORIGIN: RefCell>> = RefCell::new(None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(None) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/expr/mod.rs:56:49 [INFO] [stdout] | [INFO] [stdout] 56 | ori.as_ref().cloned().unwrap_or_else(|| DEFAULT_ORIGIN.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/expr/mod.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | &*self.items [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.items` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/expr/mod.rs:258:1 [INFO] [stdout] | [INFO] [stdout] 258 | / impl Default for Source { [INFO] [stdout] 259 | | fn default() -> Self { [INFO] [stdout] 260 | | Self::Unspecified [INFO] [stdout] 261 | | } [INFO] [stdout] 262 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 251 + #[derive(Default)] [INFO] [stdout] 252 | pub enum Source { [INFO] [stdout] 253 | File(PathBuf), [INFO] [stdout] 254 | Netidx(Path), [INFO] [stdout] 255 | Internal(ArcStr), [INFO] [stdout] 256 ~ #[default] [INFO] [stdout] 257 ~ Unspecified, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/expr/mod.rs:329:25 [INFO] [stdout] | [INFO] [stdout] 329 | writeln!(f, "")?; [INFO] [stdout] | ^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/expr/mod.rs:587:43 [INFO] [stdout] | [INFO] [stdout] 587 | static BUF: RefCell = RefCell::new(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/node/array.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / pub(crate) fn compile( [INFO] [stdout] 128 | | ctx: &mut ExecCtx, [INFO] [stdout] 129 | | flags: BitFlags, [INFO] [stdout] 130 | | spec: Expr, [INFO] [stdout] ... | [INFO] [stdout] 135 | | end: &Option>, [INFO] [stdout] 136 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/array.rs:208:47 [INFO] [stdout] | [INFO] [stdout] 208 | self.typ.check_contains(&ctx.env, &self.source.node.typ()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/array.rs:212:59 [INFO] [stdout] | [INFO] [stdout] 212 | wrap!(start.node, it.check_contains(&ctx.env, &start.node.typ()))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `start.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/array.rs:216:57 [INFO] [stdout] | [INFO] [stdout] 216 | wrap!(end.node, it.check_contains(&ctx.env, &end.node.typ()))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `end.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/node/array.rs:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 334 - Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] 334 + self.typ.check_contains(&ctx.env, &rtype) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/array.rs:328:18 [INFO] [stdout] | [INFO] [stdout] 328 | .fold(Ok(rtype), |rtype, n| n.node.typ().union(&ctx.env, &rtype?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(rtype, |rtype, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/node/bind.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 34 | if !pattern.single_bind().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pattern.single_bind().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/bind.rs:47:59 [INFO] [stdout] | [INFO] [stdout] 47 | let node = compile(ctx, flags, value.clone(), &scope, top_id)?; [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/bind.rs:56:59 [INFO] [stdout] | [INFO] [stdout] 56 | let node = compile(ctx, flags, value.clone(), &scope, top_id)?; [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = 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 are using an explicit closure for cloning elements [INFO] [stdout] --> src/node/bind.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | event.variables.get(&self.id).map(|v| v.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `event.variables.get(&self.id).cloned()` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/node/bind.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | / if let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] 299 | | let new_id = BindId::from(i); [INFO] [stdout] 300 | | if self.id != Some(new_id) { [INFO] [stdout] 301 | | if let Some(old) = self.id { [INFO] [stdout] ... | [INFO] [stdout] 307 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/node/bind.rs:297:21 [INFO] [stdout] | [INFO] [stdout] 297 | if let Some(v) = self.child.update(ctx, event) { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 298 | if let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/bind.rs:297:9 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Some(v) = self.child.update(ctx, event) { [INFO] [stdout] 298 | | if let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] 299 | | let new_id = BindId::from(i); [INFO] [stdout] 300 | | if self.id != Some(new_id) { [INFO] [stdout] ... | [INFO] [stdout] 308 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 297 ~ if let Some(v) = self.child.update(ctx, event) [INFO] [stdout] 298 ~ && let Value::U64(i) | Value::V64(i) = v { [INFO] [stdout] 299 | let new_id = BindId::from(i); [INFO] [stdout] ... [INFO] [stdout] 306 | } [INFO] [stdout] 307 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/node/callsite.rs:25:6 [INFO] [stdout] | [INFO] [stdout] 25 | ) -> Result<(Vec>, FxHashMap>, bool)>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/node/callsite.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | / fn bind( [INFO] [stdout] 86 | | &mut self, [INFO] [stdout] 87 | | ctx: &mut ExecCtx, [INFO] [stdout] 88 | | scope: Scope, [INFO] [stdout] ... | [INFO] [stdout] 93 | | set: &mut Vec, [INFO] [stdout] 94 | | ) -> 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 `if` statement can be collapsed [INFO] [stdout] --> src/node/callsite.rs:216:21 [INFO] [stdout] | [INFO] [stdout] 216 | / if let Entry::Vacant(e) = event.variables.entry(id) { [INFO] [stdout] 217 | | if let Some(v) = ctx.cached.get(&id) { [INFO] [stdout] 218 | | e.insert(v.clone()); [INFO] [stdout] 219 | | set.push(id); [INFO] [stdout] 220 | | } [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 216 ~ if let Entry::Vacant(e) = event.variables.entry(id) [INFO] [stdout] 217 ~ && let Some(v) = ctx.cached.get(&id) { [INFO] [stdout] 218 | e.insert(v.clone()); [INFO] [stdout] 219 | set.push(id); [INFO] [stdout] 220 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:98:48 [INFO] [stdout] | [INFO] [stdout] 98 | t.check_contains(&ctx.env, &n.node.typ())? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/node/data.rs:181:41 [INFO] [stdout] | [INFO] [stdout] 181 | ... None if &r.name == &v[0] => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 181 - None if &r.name == &v[0] => { [INFO] [stdout] 181 + None if r.name == v[0] => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:252:66 [INFO] [stdout] | [INFO] [stdout] 252 | ... typ.check_contains(&ctx.env, &rep.n.node.typ()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `rep.n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:450:48 [INFO] [stdout] | [INFO] [stdout] 450 | t.check_contains(&ctx.env, &n.node.typ())? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node/data.rs:490:12 [INFO] [stdout] | [INFO] [stdout] 490 | if self.n.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.n.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/data.rs:541:62 [INFO] [stdout] | [INFO] [stdout] 541 | wrap!(n.node, t.check_contains(&ctx.env, &n.node.typ()))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `n.node.typ()` [INFO] [stdout] | [INFO] [stdout] = 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 are using an explicit closure for cloning elements [INFO] [stdout] --> src/node/data.rs:572:17 [INFO] [stdout] | [INFO] [stdout] 572 | ts.get(field).map(|t| t.clone()).unwrap_or_else(Type::empty_tvar) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `ts.get(field).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/node/data.rs:584:32 [INFO] [stdout] | [INFO] [stdout] 584 | Value::Array(a) => a.get(self.field).map(|v| v.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `a.get(self.field).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/node/error.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub(crate) fn new( [INFO] [stdout] 66 | | ctx: &mut ExecCtx, [INFO] [stdout] 67 | | flags: BitFlags, [INFO] [stdout] 68 | | spec: Expr, [INFO] [stdout] ... | [INFO] [stdout] 96 | | Ok(Box::new(Self { spec, typ, nodes, handler })) [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/error.rs:292:51 [INFO] [stdout] | [INFO] [stdout] 292 | let etyp = wrap!(self, fix_echain_typ(&ctx, &etyp))?; [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/node/lambda.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / impl PartialOrd for LambdaDef { [INFO] [stdout] 44 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 45 | | Some(self.id.cmp(&other.id)) [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [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] 44 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 45 - Some(self.id.cmp(&other.id)) [INFO] [stdout] 46 - } [INFO] [stdout] 44 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:112:53 [INFO] [stdout] | [INFO] [stdout] 112 | wrap!(arg, typ.check_contains(&ctx.env, &arg.typ()))?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `arg.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:115:66 [INFO] [stdout] | [INFO] [stdout] 115 | wrap!(self.body, self.typ.rtype.check_contains(&ctx.env, &self.body.typ()))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.body.typ()` [INFO] [stdout] | [INFO] [stdout] = help: 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] --> src/node/lambda.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | / pub(super) fn new( [INFO] [stdout] 149 | | ctx: &mut ExecCtx, [INFO] [stdout] 150 | | flags: BitFlags, [INFO] [stdout] 151 | | typ: Arc, [INFO] [stdout] ... | [INFO] [stdout] 156 | | body: Expr, [INFO] [stdout] 157 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:172:46 [INFO] [stdout] | [INFO] [stdout] 172 | let body = compile(ctx, flags, body, &scope, tid)?; [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = 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 loop variable `i` is used to index `args` [INFO] [stdout] --> src/node/lambda.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | for i in 0..args.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 209 - for i in 0..args.len() { [INFO] [stdout] 209 + for (i, ) in args.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/lambda.rs:216:58 [INFO] [stdout] | [INFO] [stdout] 216 | wrap!(args[i], atyp.check_contains(&ctx.env, &args[i].typ()))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `args[i].typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/node/lambda.rs:327:58 [INFO] [stdout] | [INFO] [stdout] 327 | let rtype = rtype.clone().unwrap_or_else(|| Type::empty_tvar()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Type::empty_tvar` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/node/lambda.rs:329:60 [INFO] [stdout] | [INFO] [stdout] 329 | let throws = throws.clone().unwrap_or_else(|| Type::empty_tvar()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Type::empty_tvar` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/node/map.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 110 - Ok(self.typ.check_contains(&ctx.env, &rtype)?) [INFO] [stdout] 110 + self.typ.check_contains(&ctx.env, &rtype) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/map.rs:102:14 [INFO] [stdout] | [INFO] [stdout] 102 | .fold(Ok(Type::Bottom), |acc, n| n.node.typ().union(&ctx.env, &acc?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Type::Bottom, |acc, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/map.rs:107:14 [INFO] [stdout] | [INFO] [stdout] 107 | .fold(Ok(Type::Bottom), |acc, n| n.node.typ().union(&ctx.env, &acc?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Type::Bottom, |acc, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/module.rs:115:57 [INFO] [stdout] | [INFO] [stdout] 115 | && let Some(proxy_bind) = ctx.env.by_id.get(&proxy_id) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `proxy_id` [INFO] [stdout] | [INFO] [stdout] = help: 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] --> src/node/module.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | / pub(super) fn compile_dynamic( [INFO] [stdout] 227 | | ctx: &mut ExecCtx, [INFO] [stdout] 228 | | flags: BitFlags, [INFO] [stdout] 229 | | spec: Expr, [INFO] [stdout] ... | [INFO] [stdout] 234 | | top_id: ExprId, [INFO] [stdout] 235 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/module.rs:238:42 [INFO] [stdout] | [INFO] [stdout] 238 | bind_sig(&mut ctx.env, &mut env, &scope, &sig) [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/module.rs:265:42 [INFO] [stdout] | [INFO] [stdout] 265 | bind_sig(&mut ctx.env, &mut env, &scope, &sig) [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node/pattern.rs:474:53 [INFO] [stdout] | [INFO] [stdout] 474 | Self::Variant { tag, all: _, binds } if binds.len() == 0 => match v { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `binds.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node/pattern.rs:530:17 [INFO] [stdout] | [INFO] [stdout] 530 | binds.len() > 0 && binds.iter().any(|p| p.is_refutable()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!binds.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/pattern.rs:542:35 [INFO] [stdout] | [INFO] [stdout] 542 | ctx.cached.remove(&id); [INFO] [stdout] | ^^^ help: change this to: `id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/pattern.rs:643:63 [INFO] [stdout] | [INFO] [stdout] 643 | .map(|g| compiler::compile(ctx, flags, g.clone(), &scope, top_id)) [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/select.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | / if arg_up && pat.guard.is_some() { [INFO] [stdout] 70 | | if let Some(arg) = arg.cached.as_ref() { [INFO] [stdout] 71 | | pat.bind_event(ctx, event, arg); [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if arg_up && pat.guard.is_some() [INFO] [stdout] 70 ~ && let Some(arg) = arg.cached.as_ref() { [INFO] [stdout] 71 | pat.bind_event(ctx, event, arg); [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/select.rs:207:40 [INFO] [stdout] | [INFO] [stdout] 207 | itype.check_contains(&ctx.env, &self.arg.node.typ()).map_err(|e| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.arg.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/select.rs:212:40 [INFO] [stdout] | [INFO] [stdout] 212 | mtype.check_contains(&ctx.env, &self.arg.node.typ()).map_err(|e| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.arg.node.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/node/mod.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / pub(crate) fn new(typ: Type) -> Node { [INFO] [stdout] 96 | | Box::new(Nop { typ }) [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/mod.rs:169:9 [INFO] [stdout] | [INFO] [stdout] 169 | &self.n.typ() [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.n.typ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/node/mod.rs:419:9 [INFO] [stdout] | [INFO] [stdout] 419 | &self.children.last().map(|n| n.typ()).unwrap_or(&Type::Bottom) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.children.last().map(|n| n.typ()).unwrap_or(&Type::Bottom)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/node/mod.rs:469:43 [INFO] [stdout] | [INFO] [stdout] 469 | static BUF: RefCell = RefCell::new(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/mod.rs:623:9 [INFO] [stdout] | [INFO] [stdout] 623 | / if let Some(Value::U64(id)) = event.variables.get(&self.src_id) { [INFO] [stdout] 624 | | if let Some(target_id) = ctx.env.byref_chain.get(&BindId::from(*id)) { [INFO] [stdout] 625 | | self.target_id = Some(*target_id); [INFO] [stdout] 626 | | up = true; [INFO] [stdout] 627 | | } [INFO] [stdout] 628 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 623 ~ if let Some(Value::U64(id)) = event.variables.get(&self.src_id) [INFO] [stdout] 624 ~ && let Some(target_id) = ctx.env.byref_chain.get(&BindId::from(*id)) { [INFO] [stdout] 625 | self.target_id = Some(*target_id); [INFO] [stdout] 626 | up = true; [INFO] [stdout] 627 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/mod.rs:629:9 [INFO] [stdout] | [INFO] [stdout] 629 | / if up { [INFO] [stdout] 630 | | if let Some(v) = &self.rhs.cached { [INFO] [stdout] 631 | | if let Some(id) = self.target_id { [INFO] [stdout] 632 | | ctx.set_var(id, v.clone()); [INFO] [stdout] ... | [INFO] [stdout] 635 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 629 ~ if up [INFO] [stdout] 630 ~ && let Some(v) = &self.rhs.cached { [INFO] [stdout] 631 | if let Some(id) = self.target_id { [INFO] [stdout] 632 | ctx.set_var(id, v.clone()); [INFO] [stdout] 633 | } [INFO] [stdout] 634 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/node/mod.rs:630:13 [INFO] [stdout] | [INFO] [stdout] 630 | / if let Some(v) = &self.rhs.cached { [INFO] [stdout] 631 | | if let Some(id) = self.target_id { [INFO] [stdout] 632 | | ctx.set_var(id, v.clone()); [INFO] [stdout] 633 | | } [INFO] [stdout] 634 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 630 ~ if let Some(v) = &self.rhs.cached [INFO] [stdout] 631 ~ && let Some(id) = self.target_id { [INFO] [stdout] 632 | ctx.set_var(id, v.clone()); [INFO] [stdout] 633 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/node/mod.rs:789:27 [INFO] [stdout] | [INFO] [stdout] 789 | self.n.iter().fold(Ok(rtyp), |rtype, n| rtype?.union(&ctx.env, n.typ())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(rtyp, |rtype, n| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/node/mod.rs:829:16 [INFO] [stdout] | [INFO] [stdout] 829 | if let Some(_) = self.trigger.update(ctx, event) { [INFO] [stdout] | -------^^^^^^^---------------------------------- help: try: `if self.trigger.update(ctx, event).is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:18:67 [INFO] [stdout] | [INFO] [stdout] 18 | Type::Set(s) | Type::Abstract { id: _, params: s } => Ok(for t in s.iter() { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 19 | | t.check_cast_int(env, hist)? [INFO] [stdout] 20 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 18 ~ Type::Set(s) | Type::Abstract { id: _, params: s } => { [INFO] [stdout] 19 + let _: () = for t in s.iter() { [INFO] [stdout] 20 + t.check_cast_int(env, hist)? [INFO] [stdout] 21 + }; [INFO] [stdout] 22 + Ok(()) [INFO] [stdout] 23 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | Type::Tuple(ts) => Ok(for t in ts.iter() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 33 | | t.check_cast_int(env, hist)? [INFO] [stdout] 34 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 32 ~ Type::Tuple(ts) => { [INFO] [stdout] 33 + let _: () = for t in ts.iter() { [INFO] [stdout] 34 + t.check_cast_int(env, hist)? [INFO] [stdout] 35 + }; [INFO] [stdout] 36 + Ok(()) [INFO] [stdout] 37 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:35:33 [INFO] [stdout] | [INFO] [stdout] 35 | Type::Struct(ts) => Ok(for (_, t) in ts.iter() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 36 | | t.check_cast_int(env, hist)? [INFO] [stdout] 37 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 35 ~ Type::Struct(ts) => { [INFO] [stdout] 36 + let _: () = for (_, t) in ts.iter() { [INFO] [stdout] 37 + t.check_cast_int(env, hist)? [INFO] [stdout] 38 + }; [INFO] [stdout] 39 + Ok(()) [INFO] [stdout] 40 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/typ/cast.rs:38:37 [INFO] [stdout] | [INFO] [stdout] 38 | Type::Variant(_, ts) => Ok(for t in ts.iter() { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 39 | | t.check_cast_int(env, hist)? [INFO] [stdout] 40 | | }), [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 38 ~ Type::Variant(_, ts) => { [INFO] [stdout] 39 + let _: () = for t in ts.iter() { [INFO] [stdout] 40 + t.check_cast_int(env, hist)? [INFO] [stdout] 41 + }; [INFO] [stdout] 42 + Ok(()) [INFO] [stdout] 43 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/typ/cast.rs:144:60 [INFO] [stdout] | [INFO] [stdout] 144 | Value::Array(a) if a.len() == 2 => match &a[0] { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 145 | | Value::String(_) => true, [INFO] [stdout] 146 | | _ => false, [INFO] [stdout] 147 | | }, [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 144 - Value::Array(a) if a.len() == 2 => match &a[0] { [INFO] [stdout] 145 - Value::String(_) => true, [INFO] [stdout] 146 - _ => false, [INFO] [stdout] 147 - }, [INFO] [stdout] 144 + Value::Array(a) if a.len() == 2 => matches!(&a[0], Value::String(_)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/cast.rs:161:64 [INFO] [stdout] | [INFO] [stdout] 161 | let keys_ok = ts.iter().zip(elts_s.iter()).fold( [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 162 | | Ok(true), [INFO] [stdout] 163 | | |acc: Result<_>, ((fname, t), v)| { [INFO] [stdout] 164 | | let kok = acc?; [INFO] [stdout] ... | [INFO] [stdout] 175 | | }, [INFO] [stdout] 176 | | )?; [INFO] [stdout] | |_____________________^ help: use `try_fold` instead: `try_fold(true, |acc: Result<_>, ((fname, t), v)| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/cast.rs:202:39 [INFO] [stdout] | [INFO] [stdout] 202 | Type::Variant(tag, ts) if ts.len() == 0 => match &v { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/cast.rs:273:55 [INFO] [stdout] | [INFO] [stdout] 273 | Type::Primitive(t) => t.contains(Typ::get(&v)), [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/cast.rs:316:39 [INFO] [stdout] | [INFO] [stdout] 316 | Type::Variant(tag, ts) if ts.len() == 0 => match &v { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ts.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/typ/cast.rs:338:28 [INFO] [stdout] | [INFO] [stdout] 338 | Type::Fn(_) => match v { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 339 | | Value::Abstract(a) if AbstractTypeRegistry::is_a(a, "lambda") => true, [INFO] [stdout] 340 | | _ => false, [INFO] [stdout] 341 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 338 - Type::Fn(_) => match v { [INFO] [stdout] 339 - Value::Abstract(a) if AbstractTypeRegistry::is_a(a, "lambda") => true, [INFO] [stdout] 340 - _ => false, [INFO] [stdout] 341 - }, [INFO] [stdout] 338 + Type::Fn(_) => matches!(v, Value::Abstract(a) if AbstractTypeRegistry::is_a(a, "lambda")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/contains.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | hist: &mut RefHist, Option), bool>>, [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: use `std::ptr::eq` when comparing raw pointers [INFO] [stdout] --> src/typ/contains.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | if (self as *const Type) == (t as *const Type) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self, t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq [INFO] [stdout] = note: `#[warn(clippy::ptr_eq)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/typ/contains.rs:72:24 [INFO] [stdout] | [INFO] [stdout] 72 | if let Some(_) = &*t0.read().typ.read() { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if (*t0.read().typ.read()).is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/typ/contains.rs:214:70 [INFO] [stdout] | [INFO] [stdout] 214 | ... return t0.contains_int(flags, env, hist, &*t1) [INFO] [stdout] | ^^^^ help: if you would like to reborrow, try removing `&*`: `t1` [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: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/contains.rs:279:18 [INFO] [stdout] | [INFO] [stdout] 279 | .fold(Ok::<_, anyhow::Error>(false), |acc, t0| { [INFO] [stdout] | __________________^ [INFO] [stdout] 280 | | Ok(acc? || t0.contains_int(flags, env, hist, t)?) [INFO] [stdout] 281 | | })? [INFO] [stdout] | |__________________^ help: use `try_fold` instead: `try_fold(false, |acc, t0| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/contains.rs:282:35 [INFO] [stdout] | [INFO] [stdout] 282 | || t.iter_prims().fold(Ok::<_, anyhow::Error>(true), |acc, t1| { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 283 | | Ok(acc? [INFO] [stdout] 284 | | && s.iter().fold(Ok::<_, anyhow::Error>(false), |acc, t0| { [INFO] [stdout] 285 | | Ok(acc? || t0.contains_int(flags, env, hist, &t1)?) [INFO] [stdout] 286 | | })?) [INFO] [stdout] 287 | | })?), [INFO] [stdout] | |__________________^ help: use `try_fold` instead: `try_fold(true, |acc, t1| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/typ/contains.rs:284:37 [INFO] [stdout] | [INFO] [stdout] 284 | && s.iter().fold(Ok::<_, anyhow::Error>(false), |acc, t0| { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 285 | | Ok(acc? || t0.contains_int(flags, env, hist, &t1)?) [INFO] [stdout] 286 | | })?) [INFO] [stdout] | |__________________________^ help: use `try_fold` instead: `try_fold(false, |acc, t0| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:34:22 [INFO] [stdout] | [INFO] [stdout] 34 | pub constraints: Arc>>>, [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: needlessly taken reference of both operands [INFO] [stdout] --> src/typ/fntyp.rs:60:16 [INFO] [stdout] | [INFO] [stdout] 60 | && &*constraints0.read() == &*constraints1.read() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 60 - && &*constraints0.read() == &*constraints1.read() [INFO] [stdout] 60 + && *constraints0.read() == *constraints1.read() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/typ/fntyp.rs:67:1 [INFO] [stdout] | [INFO] [stdout] 67 | / impl PartialOrd for FnType { [INFO] [stdout] 68 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 69 | | use std::cmp::Ordering; [INFO] [stdout] 70 | | let Self { [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 69 - use std::cmp::Ordering; [INFO] [stdout] 70 - let Self { [INFO] [stdout] 71 - args: args0, [INFO] [stdout] 72 - vargs: vargs0, [INFO] [stdout] 73 - rtype: rtype0, [INFO] [stdout] 74 - constraints: constraints0, [INFO] [stdout] 75 - throws: th0, [INFO] [stdout] 76 - explicit_throws: _, [INFO] [stdout] 77 - } = self; [INFO] [stdout] 78 - let Self { [INFO] [stdout] 79 - args: args1, [INFO] [stdout] 80 - vargs: vargs1, [INFO] [stdout] 81 - rtype: rtype1, [INFO] [stdout] 82 - constraints: constraints1, [INFO] [stdout] 83 - throws: th1, [INFO] [stdout] 84 - explicit_throws: _, [INFO] [stdout] 85 - } = other; [INFO] [stdout] 86 - match args0.partial_cmp(&args1) { [INFO] [stdout] 87 - Some(Ordering::Equal) => match vargs0.partial_cmp(vargs1) { [INFO] [stdout] 88 - Some(Ordering::Equal) => match rtype0.partial_cmp(rtype1) { [INFO] [stdout] 89 - Some(Ordering::Equal) => { [INFO] [stdout] 90 - match constraints0.read().partial_cmp(&*constraints1.read()) { [INFO] [stdout] 91 - Some(Ordering::Equal) => th0.partial_cmp(th1), [INFO] [stdout] 92 - r => r, [INFO] [stdout] 93 - } [INFO] [stdout] 94 - } [INFO] [stdout] 95 - r => r, [INFO] [stdout] 96 - }, [INFO] [stdout] 97 - r => r, [INFO] [stdout] 98 - }, [INFO] [stdout] 99 - r => r, [INFO] [stdout] 100 - } [INFO] [stdout] 101 - } [INFO] [stdout] 68 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/fntyp.rs:86:33 [INFO] [stdout] | [INFO] [stdout] 86 | match args0.partial_cmp(&args1) { [INFO] [stdout] | ^^^^^^ help: change this to: `args1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/typ/fntyp.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | / if let Some(t) = tv.read().typ.read().as_ref() [INFO] [stdout] 165 | | && t != &Type::Bottom [INFO] [stdout] 166 | | && t != &Type::Any [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 166 ~ && t != &Type::Any [INFO] [stdout] 167 ~ && !constraints.iter().any(|(tv, _)| tv.name == name) { [INFO] [stdout] 168 | t.bind_as(&Type::Any); [INFO] [stdout] 169 | constraints.push((tv.clone(), t.normalize())); [INFO] [stdout] 170 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:340:15 [INFO] [stdout] | [INFO] [stdout] 340 | hist: &mut RefHist, Option), bool>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:592:10 [INFO] [stdout] | [INFO] [stdout] 592 | ) -> LPooled, 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/fntyp.rs:593:22 [INFO] [stdout] | [INFO] [stdout] 593 | let mut tbl: LPooled, 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: length comparison to zero [INFO] [stdout] --> src/typ/fntyp.rs:639:12 [INFO] [stdout] | [INFO] [stdout] 639 | if constraints.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `constraints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/matches.rs:17:15 [INFO] [stdout] | [INFO] [stdout] 17 | hist: &mut RefHist, Option), bool>>, [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: use `std::ptr::eq` when comparing raw pointers [INFO] [stdout] --> src/typ/matches.rs:174:12 [INFO] [stdout] | [INFO] [stdout] 174 | if (self as *const Type) == (impl_type as *const Type) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self, impl_type)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/typ/normalize.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | ... s.iter().map(|t| t.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `s.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/print.rs:45:39 [INFO] [stdout] | [INFO] [stdout] 45 | Self::Variant(tag, ts) if ts.len() == 0 => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/typ/print.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | } else if s.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/setops.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | hist: &mut RefHist, Option), Type>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/setops.rs:217:15 [INFO] [stdout] | [INFO] [stdout] 217 | hist: &mut RefHist, Option), Type>>, [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: needlessly taken reference of both operands [INFO] [stdout] --> src/typ/setops.rs:340:20 [INFO] [stdout] | [INFO] [stdout] 340 | if &**t == &Type::Any { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 340 - if &**t == &Type::Any { [INFO] [stdout] 340 + if **t == Type::Any { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/typ/setops.rs:366:20 [INFO] [stdout] | [INFO] [stdout] 366 | if &**e == &Type::Any { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 366 - if &**e == &Type::Any { [INFO] [stdout] 366 + if **e == Type::Any { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:22:27 [INFO] [stdout] | [INFO] [stdout] 22 | if !self.typ.is_a(&self.env, &self.v) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self.env` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:22:38 [INFO] [stdout] | [INFO] [stdout] 22 | if !self.typ.is_a(&self.env, &self.v) { [INFO] [stdout] | ^^^^^^^ help: change this to: `self.v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:42:53 [INFO] [stdout] | [INFO] [stdout] 42 | let typ = match self.typ.lookup_ref(&self.env) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self.env` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tval.rs:123:67 [INFO] [stdout] | [INFO] [stdout] 123 | (Type::Set(ts), v) => match ts.iter().find(|t| t.is_a(&self.env, v)) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self.env` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:35:51 [INFO] [stdout] | [INFO] [stdout] 35 | Type::Array(a) => would_cycle_inner(addr, &**a), [INFO] [stdout] | ^^^^ help: try: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:37:37 [INFO] [stdout] | [INFO] [stdout] 37 | would_cycle_inner(addr, &**key) || would_cycle_inner(addr, &**value) [INFO] [stdout] | ^^^^^^ help: try: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:37:72 [INFO] [stdout] | [INFO] [stdout] 37 | would_cycle_inner(addr, &**key) || would_cycle_inner(addr, &**value) [INFO] [stdout] | ^^^^^^^^ help: try: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/typ/tvar.rs:57:44 [INFO] [stdout] | [INFO] [stdout] 57 | || would_cycle_inner(addr, &throws) [INFO] [stdout] | ^^^^^^^ help: change this to: `throws` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/tvar.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | &*self.0 [INFO] [stdout] | ^^^^^^^^ help: try: `&self.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/typ/tvar.rs:120:1 [INFO] [stdout] | [INFO] [stdout] 120 | / impl PartialOrd for TVar { [INFO] [stdout] 121 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 122 | | let t0 = self.read(); [INFO] [stdout] 123 | | let t1 = other.read(); [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 121 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 122 - let t0 = self.read(); [INFO] [stdout] 123 - let t1 = other.read(); [INFO] [stdout] 124 - if t0.typ.as_ptr().addr() == t1.typ.as_ptr().addr() { [INFO] [stdout] 125 - Some(std::cmp::Ordering::Equal) [INFO] [stdout] 126 - } else { [INFO] [stdout] 127 - let t0 = t0.typ.read(); [INFO] [stdout] 128 - let t1 = t1.typ.read(); [INFO] [stdout] 129 - t0.partial_cmp(&*t1) [INFO] [stdout] 130 - } [INFO] [stdout] 131 - } [INFO] [stdout] 121 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/typ/tvar.rs:552:26 [INFO] [stdout] | [INFO] [stdout] 552 | .or_insert_with(TVar::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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/typ/mod.rs:41:14 [INFO] [stdout] | [INFO] [stdout] 41 | ref_ids: LPooled, usize); 2]>>>, [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: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/mod.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | &*self.inner [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/typ/mod.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | &mut *self.inner [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&mut self.inner` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/typ/mod.rs:110:1 [INFO] [stdout] | [INFO] [stdout] 110 | / impl Default for Type { [INFO] [stdout] 111 | | fn default() -> Self { [INFO] [stdout] 112 | | Self::Bottom [INFO] [stdout] 113 | | } [INFO] [stdout] 114 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 92 + #[derive(Default)] [INFO] [stdout] 93 | pub enum Type { [INFO] [stdout] 94 ~ #[default] [INFO] [stdout] 95 ~ Bottom, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:222:25 [INFO] [stdout] | [INFO] [stdout] 222 | pub static CBATCH_POOL: LazyLock)>>> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/lib.rs:362:13 [INFO] [stdout] | [INFO] [stdout] 362 | fn refs<'a>(&self, _refs: &mut Refs) {} [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: named constant with interior mutability [INFO] [stdout] --> src/lib.rs:410:11 [INFO] [stdout] | [INFO] [stdout] 410 | const TYP: LazyLock; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b, 'c [INFO] [stdout] --> src/lib.rs:412:17 [INFO] [stdout] | [INFO] [stdout] 412 | fn init<'a, 'b, 'c>( [INFO] [stdout] | ^^ ^^ [INFO] [stdout] ... [INFO] [stdout] 415 | scope: &'b Scope, [INFO] [stdout] | ^^ [INFO] [stdout] 416 | from: &'c [Node], [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] 412 ~ fn init<'a>( [INFO] [stdout] 413 | ctx: &'a mut ExecCtx, [INFO] [stdout] 414 | typ: &'a FnType, [INFO] [stdout] 415 ~ scope: &Scope, [INFO] [stdout] 416 ~ from: &[Node], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:563:12 [INFO] [stdout] | [INFO] [stdout] 563 | s: mpsc::Receiver)>>>, [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: deref which would be done by auto-deref [INFO] [stdout] --> src/lib.rs:691:11 [INFO] [stdout] | [INFO] [stdout] 691 | f(&mut *g) [INFO] [stdout] | ^^^^^^^ help: try: `&mut g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/lib.rs:707:25 [INFO] [stdout] | [INFO] [stdout] 707 | Self::with(|rg| rg.by_uuid.get(&a.id()).map(|r| *r)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `rg.by_uuid.get(&a.id()).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/lib.rs:770:27 [INFO] [stdout] | [INFO] [stdout] 770 | e.insert((T::TYP.clone(), T::init)); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 09s [INFO] running `Command { std: "docker" "inspect" "f0b19ac4f56f06ceafd9dd874ed34665debe1bb7398b1a6ccfe66aedef70b325", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f0b19ac4f56f06ceafd9dd874ed34665debe1bb7398b1a6ccfe66aedef70b325", kill_on_drop: false }` [INFO] [stdout] f0b19ac4f56f06ceafd9dd874ed34665debe1bb7398b1a6ccfe66aedef70b325