[INFO] cloning repository https://github.com/skkestrel/coatl [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/skkestrel/coatl" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskkestrel%2Fcoatl", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskkestrel%2Fcoatl'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fbd936a554b681be206dba39785cc36393bd4e23 [INFO] linting skkestrel/coatl against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskkestrel%2Fcoatl" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/skkestrel/coatl [INFO] finished tweaking git repo https://github.com/skkestrel/coatl [INFO] tweaked toml for git repo https://github.com/skkestrel/coatl written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/skkestrel/coatl on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/skkestrel/coatl 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 wit-bindgen-rust-macro v0.21.0 [INFO] [stderr] Downloaded wasm-metadata v0.201.0 [INFO] [stderr] Downloaded wasm-encoder v0.201.0 [INFO] [stderr] Downloaded wit-bindgen-rt v0.21.0 [INFO] [stderr] Downloaded wit-bindgen-core v0.21.0 [INFO] [stderr] Downloaded clap_derive v4.5.45 [INFO] [stderr] Downloaded ariadne v0.5.1 [INFO] [stderr] Downloaded clap v4.5.46 [INFO] [stderr] Downloaded wit-parser v0.201.0 [INFO] [stderr] Downloaded wit-bindgen v0.21.0 [INFO] [stderr] Downloaded wit-bindgen-rust v0.21.0 [INFO] [stderr] Downloaded wasmparser v0.201.0 [INFO] [stderr] Downloaded wit-component v0.201.0 [INFO] [stderr] Downloaded clap_builder v4.5.46 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] e891bc1fd462058e864062c1998d417a0c2fc0daa8fc06aa3c493186622cf3a5 [INFO] running `Command { std: "docker" "start" "-a" "e891bc1fd462058e864062c1998d417a0c2fc0daa8fc06aa3c493186622cf3a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e891bc1fd462058e864062c1998d417a0c2fc0daa8fc06aa3c493186622cf3a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e891bc1fd462058e864062c1998d417a0c2fc0daa8fc06aa3c493186622cf3a5", kill_on_drop: false }` [INFO] [stdout] e891bc1fd462058e864062c1998d417a0c2fc0daa8fc06aa3c493186622cf3a5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] dd064e0f7504f93dcc1ec7e24ccdee74f83860294c1a849955dbf010fc83b851 [INFO] running `Command { std: "docker" "start" "-a" "dd064e0f7504f93dcc1ec7e24ccdee74f83860294c1a849955dbf010fc83b851", kill_on_drop: false }` [INFO] [stderr] Compiling anyhow v1.0.99 [INFO] [stderr] Compiling target-lexicon v0.13.2 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Checking koatl-parser v0.1.0 (/opt/rustwide/workdir/koatl-parser) [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Compiling serde_json v1.0.143 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Compiling leb128 v0.2.5 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking ariadne v0.5.1 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling id-arena v2.2.1 [INFO] [stderr] Compiling wit-bindgen-rust v0.21.0 [INFO] [stderr] Compiling heck v0.4.1 [INFO] [stderr] Compiling wit-bindgen-rt v0.21.0 [INFO] [stderr] Compiling wit-bindgen-rust-macro v0.21.0 [INFO] [stderr] Compiling indoc v2.0.6 [INFO] [stderr] Checking bitflags v2.9.3 [INFO] [stderr] Checking clap_builder v4.5.46 [INFO] [stderr] Compiling wasm-encoder v0.201.0 [INFO] [stderr] Compiling spdx v0.10.9 [INFO] [stderr] Checking unindent v0.2.4 [INFO] [stderr] Checking similar v2.7.0 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-parser/src/lexer.rs:1537:17 [INFO] [stdout] | [INFO] [stdout] 1537 | start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-parser/src/lexer.rs:1542:17 [INFO] [stdout] | [INFO] [stdout] 1542 | start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-parser/src/lexer.rs:1537:17 [INFO] [stdout] | [INFO] [stdout] 1537 | start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-parser/src/lexer.rs:1542:17 [INFO] [stdout] | [INFO] [stdout] 1542 | start: start, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling pyo3-build-config v0.25.1 [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> koatl-parser/src/lexer.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | if !s [INFO] [stdout] | _________^ [INFO] [stdout] 233 | | .chars() [INFO] [stdout] 234 | | .next() [INFO] [stdout] 235 | | .map_or(false, |c| c.is_ascii_alphabetic() || c == '_') [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 235 - .map_or(false, |c| c.is_ascii_alphabetic() || c == '_') [INFO] [stdout] 235 + .is_some_and(|c| c.is_ascii_alphabetic() || c == '_') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:482:21 [INFO] [stdout] | [INFO] [stdout] 482 | return self.parse_binary_number(start); [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] 482 - return self.parse_binary_number(start); [INFO] [stdout] 482 + self.parse_binary_number(start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:486:21 [INFO] [stdout] | [INFO] [stdout] 486 | return self.parse_octal_number(start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 486 - return self.parse_octal_number(start); [INFO] [stdout] 486 + self.parse_octal_number(start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:490:21 [INFO] [stdout] | [INFO] [stdout] 490 | return self.parse_hex_number(start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 490 - return self.parse_hex_number(start); [INFO] [stdout] 490 + self.parse_hex_number(start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:498:25 [INFO] [stdout] | [INFO] [stdout] 498 | return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 498 - return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] 498 + Ok((Token::Int(num_str), span, false)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:501:25 [INFO] [stdout] | [INFO] [stdout] 501 | return self.parse_decimal_float(start, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 501 - return self.parse_decimal_float(start, true); [INFO] [stdout] 501 + self.parse_decimal_float(start, true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:506:21 [INFO] [stdout] | [INFO] [stdout] 506 | return self.parse_decimal_number(start, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 506 - return self.parse_decimal_number(start, true); [INFO] [stdout] 506 + self.parse_decimal_number(start, true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:510:21 [INFO] [stdout] | [INFO] [stdout] 510 | return self.parse_decimal_float(start, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 510 - return self.parse_decimal_float(start, true); [INFO] [stdout] 510 + self.parse_decimal_float(start, true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:516:21 [INFO] [stdout] | [INFO] [stdout] 516 | return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 516 - return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] 516 + Ok((Token::Int(num_str), span, false)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:521:13 [INFO] [stdout] | [INFO] [stdout] 521 | return self.parse_decimal_float(start, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 521 - return self.parse_decimal_float(start, false); [INFO] [stdout] 521 + self.parse_decimal_float(start, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:523:13 [INFO] [stdout] | [INFO] [stdout] 523 | return self.parse_decimal_number(start, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 523 - return self.parse_decimal_number(start, false); [INFO] [stdout] 523 + self.parse_decimal_number(start, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> koatl-parser/src/lexer.rs:623:40 [INFO] [stdout] | [INFO] [stdout] 623 | if self.peek() == Some('.') && !self.look_ahead(|x| x.parse_seq("..")).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.look_ahead(|x| x.parse_seq("..")).is_err()` [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 `if` has identical blocks [INFO] [stdout] --> koatl-parser/src/lexer.rs:623:88 [INFO] [stdout] | [INFO] [stdout] 623 | if self.peek() == Some('.') && !self.look_ahead(|x| x.parse_seq("..")).is_ok() { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 624 | | return self.parse_decimal_float(start, has_digits); [INFO] [stdout] 625 | | } else if matches!(self.peek(), Some('e') | Some('E')) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> koatl-parser/src/lexer.rs:625:64 [INFO] [stdout] | [INFO] [stdout] 625 | } else if matches!(self.peek(), Some('e') | Some('E')) { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 626 | | return self.parse_decimal_float(start, has_digits); [INFO] [stdout] 627 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> koatl-parser/src/lexer.rs:649:40 [INFO] [stdout] | [INFO] [stdout] 649 | if self.peek() == Some('.') && !self.look_ahead(|x| x.parse_seq("..")).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.look_ahead(|x| x.parse_seq("..")).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:725:13 [INFO] [stdout] | [INFO] [stdout] 725 | / return Err(LexError::custom( [INFO] [stdout] 726 | | self.span_since(&start), [INFO] [stdout] 727 | | "expected newline", [INFO] [stdout] 728 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 725 ~ Err(LexError::custom( [INFO] [stdout] 726 + self.span_since(&start), [INFO] [stdout] 727 + "expected newline", [INFO] [stdout] 728 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | / return Err(LexError::custom( [INFO] [stdout] 751 | | self.span_since(&self.cursor()), [INFO] [stdout] 752 | | "expected newline or end of file", [INFO] [stdout] 753 | | )); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 750 ~ Err(LexError::custom( [INFO] [stdout] 751 + self.span_since(&self.cursor()), [INFO] [stdout] 752 + "expected newline or end of file", [INFO] [stdout] 753 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:848:9 [INFO] [stdout] | [INFO] [stdout] 848 | / return Err(LexError::custom( [INFO] [stdout] 849 | | self.span_since(&start), [INFO] [stdout] 850 | | "unterminated block comment", [INFO] [stdout] 851 | | )); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 848 ~ Err(LexError::custom( [INFO] [stdout] 849 + self.span_since(&start), [INFO] [stdout] 850 + "unterminated block comment", [INFO] [stdout] 851 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> koatl-parser/src/lexer.rs:831:19 [INFO] [stdout] | [INFO] [stdout] 831 | while let Some(_) = self.peek() { [INFO] [stdout] | ----------^^^^^^^-------------- help: try: `while self.peek().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> koatl-parser/src/lexer.rs:1326:36 [INFO] [stdout] | [INFO] [stdout] 1326 | self.try_parse(|ctx| TokenizeCtx::parse_empty_line(ctx)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `TokenizeCtx::parse_empty_line` [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: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1360:29 [INFO] [stdout] | [INFO] [stdout] 1360 | ... t.extend(first_token.leading_trivia.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t.append(&mut first_token.leading_trivia)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1374:25 [INFO] [stdout] | [INFO] [stdout] 1374 | tokens.extend(line_tokens.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `tokens.append(&mut line_tokens)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1483:21 [INFO] [stdout] | [INFO] [stdout] 1483 | vec.extend(tok.leading_trivia.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.append(&mut tok.leading_trivia)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/lexer.rs:1488:13 [INFO] [stdout] | [INFO] [stdout] 1488 | / if let Some(last_token) = line_tokens.last() { [INFO] [stdout] 1489 | | if let Token::Symbol(s) = last_token.token { [INFO] [stdout] 1490 | | if s == "=>" [INFO] [stdout] 1491 | | || s == ":" [INFO] [stdout] ... | [INFO] [stdout] 1497 | | } [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] 1488 ~ if let Some(last_token) = line_tokens.last() [INFO] [stdout] 1489 ~ && let Token::Symbol(s) = last_token.token { [INFO] [stdout] 1490 | if s == "=>" [INFO] [stdout] ... [INFO] [stdout] 1495 | } [INFO] [stdout] 1496 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/lexer.rs:1489:17 [INFO] [stdout] | [INFO] [stdout] 1489 | / if let Token::Symbol(s) = last_token.token { [INFO] [stdout] 1490 | | if s == "=>" [INFO] [stdout] 1491 | | || s == ":" [INFO] [stdout] 1492 | | || OPEN_DELIMS.contains(&s.chars().next().unwrap_or('\0')) [INFO] [stdout] ... | [INFO] [stdout] 1496 | | } [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] 1489 ~ if let Token::Symbol(s) = last_token.token [INFO] [stdout] 1490 ~ && (s == "=>" [INFO] [stdout] 1491 | || s == ":" [INFO] [stdout] 1492 ~ || OPEN_DELIMS.contains(&s.chars().next().unwrap_or('\0'))) [INFO] [stdout] 1493 | { [INFO] [stdout] 1494 | expect_new_block = true; [INFO] [stdout] 1495 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1514:13 [INFO] [stdout] | [INFO] [stdout] 1514 | tokens.extend(line_tokens.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `tokens.append(&mut line_tokens)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> koatl-parser/src/lexer.rs:1547:12 [INFO] [stdout] | [INFO] [stdout] 1547 | if delim_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!delim_stack.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: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1559:13 [INFO] [stdout] | [INFO] [stdout] 1559 | / tokens[i] [INFO] [stdout] 1560 | | .trailing_trivia [INFO] [stdout] 1561 | | .extend(cur_block_unassigned_trivia.drain(..)); [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1559 ~ tokens[i] [INFO] [stdout] 1560 ~ .trailing_trivia.append(&mut cur_block_unassigned_trivia); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1566:9 [INFO] [stdout] | [INFO] [stdout] 1566 | / self.unassigned_trivia [INFO] [stdout] 1567 | | .extend(cur_block_unassigned_trivia.drain(..)); [INFO] [stdout] | |__________________________________________________________^ help: try: `self.unassigned_trivia.append(&mut cur_block_unassigned_trivia)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> koatl-parser/src/lexer.rs:1573:16 [INFO] [stdout] | [INFO] [stdout] 1573 | if let None = self.peek() { [INFO] [stdout] | -------^^^^-------------- help: try: `if self.peek().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> koatl-parser/src/lexer.rs:1654:9 [INFO] [stdout] | [INFO] [stdout] 1654 | / assert!( [INFO] [stdout] 1655 | | false, [INFO] [stdout] 1656 | | "Expected token '{}' not found. Candidates:\n{}", [INFO] [stdout] 1657 | | token, [INFO] [stdout] ... | [INFO] [stdout] 1662 | | .join("\n") [INFO] [stdout] 1663 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> koatl-parser/src/lexer.rs:1669:13 [INFO] [stdout] | [INFO] [stdout] 1669 | assert!(false, "Errors during tokenization: {:?}", errors); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | / if let Some(found) = next { [INFO] [stdout] 178 | | if found.token == *token { [INFO] [stdout] 179 | | return Ok(found); [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [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] 177 ~ if let Some(found) = next [INFO] [stdout] 178 ~ && found.token == *token { [INFO] [stdout] 179 | return Ok(found); [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | Err(self.set_error(start, ErrMsg::Expected(format!("{}", token).into()))) [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] 183 ~ self.set_error(start, ErrMsg::Expected(format!("{}", token).into())); [INFO] [stdout] 184 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | / if let Some(found) = next { [INFO] [stdout] 204 | | if let Token::Ident(_) = found.token { [INFO] [stdout] 205 | | return Ok(found); [INFO] [stdout] 206 | | } [INFO] [stdout] 207 | | } [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] 203 ~ if let Some(found) = next [INFO] [stdout] 204 ~ && let Token::Ident(_) = found.token { [INFO] [stdout] 205 | return Ok(found); [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | Err(self.set_error(start, ErrMsg::Expected("identifier".into()))) [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] 209 ~ self.set_error(start, ErrMsg::Expected("identifier".into())); [INFO] [stdout] 210 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | / if let Some(found) = next { [INFO] [stdout] 218 | | if let Token::Int(_) [INFO] [stdout] 219 | | | Token::IntBin(_) [INFO] [stdout] 220 | | | Token::IntHex(_) [INFO] [stdout] ... | [INFO] [stdout] 229 | | } [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] 217 ~ if let Some(found) = next [INFO] [stdout] 218 ~ && let Token::Int(_) [INFO] [stdout] 219 | | Token::IntBin(_) [INFO] [stdout] ... [INFO] [stdout] 227 | return Ok(found); [INFO] [stdout] 228 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | Err(self.set_error(start, ErrMsg::Expected("literal".into()))) [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] 231 ~ self.set_error(start, ErrMsg::Expected("literal".into())); [INFO] [stdout] 232 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:415:28 [INFO] [stdout] | [INFO] [stdout] 415 | return Err(self.set_error( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 416 | | before_star, [INFO] [stdout] 417 | | ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 418 | | )); [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] 415 ~ return { [INFO] [stdout] 416 + self.set_error( [INFO] [stdout] 417 + before_star, [INFO] [stdout] 418 + ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 419 + ); [INFO] [stdout] 420 + Err(()) [INFO] [stdout] 421 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:610:25 [INFO] [stdout] | [INFO] [stdout] 610 | / Err(ctx.set_error( [INFO] [stdout] 611 | | ctx.cursor, [INFO] [stdout] 612 | | ErrMsg::Custom( [INFO] [stdout] 613 | | "f-strings are not allowed as mapping-pattern keys".into(), [INFO] [stdout] 614 | | ), [INFO] [stdout] 615 | | )) [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] 610 ~ let _: () = ctx.set_error( [INFO] [stdout] 611 + ctx.cursor, [INFO] [stdout] 612 + ErrMsg::Custom( [INFO] [stdout] 613 + "f-strings are not allowed as mapping-pattern keys".into(), [INFO] [stdout] 614 + ), [INFO] [stdout] 615 + ); [INFO] [stdout] 616 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> koatl-parser/src/parser.rs:914:61 [INFO] [stdout] | [INFO] [stdout] 914 | ctx.listing("(", ")", Token::Symbol(","), |ctx| Ok(ctx.call_item()?)) [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] 914 - ctx.listing("(", ")", Token::Symbol(","), |ctx| Ok(ctx.call_item()?)) [INFO] [stdout] 914 + ctx.listing("(", ")", Token::Symbol(","), |ctx| ctx.call_item()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> koatl-parser/src/parser.rs:1015:10 [INFO] [stdout] | [INFO] [stdout] 1015 | ) -> ParseResult<( [INFO] [stdout] | __________^ [INFO] [stdout] 1016 | | &'tok SToken<'src>, [INFO] [stdout] 1017 | | &'tok SToken<'src>, [INFO] [stdout] 1018 | | Vec<(SFmtExpr<'src, 'tok>, &'tok SToken<'src>)>, [INFO] [stdout] 1019 | | &'tok SToken<'src>, [INFO] [stdout] 1020 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1025:13 [INFO] [stdout] | [INFO] [stdout] 1025 | / if let Some(token) = next { [INFO] [stdout] 1026 | | if let Token::FstrBegin(_) | Token::VerbatimFstrBegin(_) = token.token { [INFO] [stdout] 1027 | | break 'block token; [INFO] [stdout] 1028 | | } [INFO] [stdout] 1029 | | } [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] 1025 ~ if let Some(token) = next [INFO] [stdout] 1026 ~ && let Token::FstrBegin(_) | Token::VerbatimFstrBegin(_) = token.token { [INFO] [stdout] 1027 | break 'block token; [INFO] [stdout] 1028 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1031:20 [INFO] [stdout] | [INFO] [stdout] 1031 | return Err(self.set_error(start, ErrMsg::Expected("f-string begin".into()))); [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] 1031 ~ return { [INFO] [stdout] 1032 + self.set_error(start, ErrMsg::Expected("f-string begin".into())); [INFO] [stdout] 1033 + Err(()) [INFO] [stdout] 1034 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1038:13 [INFO] [stdout] | [INFO] [stdout] 1038 | / if let Some(token) = next { [INFO] [stdout] 1039 | | if let Token::FstrEnd(_) | Token::VerbatimFstrEnd(_) = token.token { [INFO] [stdout] 1040 | | break 'block token; [INFO] [stdout] 1041 | | } [INFO] [stdout] 1042 | | } [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] 1038 ~ if let Some(token) = next [INFO] [stdout] 1039 ~ && let Token::FstrEnd(_) | Token::VerbatimFstrEnd(_) = token.token { [INFO] [stdout] 1040 | break 'block token; [INFO] [stdout] 1041 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1044:20 [INFO] [stdout] | [INFO] [stdout] 1044 | return Err(self.set_error(start, ErrMsg::Expected("f-string end".into()))); [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] 1044 ~ return { [INFO] [stdout] 1045 + self.set_error(start, ErrMsg::Expected("f-string end".into())); [INFO] [stdout] 1046 + Err(()) [INFO] [stdout] 1047 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1059:13 [INFO] [stdout] | [INFO] [stdout] 1059 | / if let Some(token) = next { [INFO] [stdout] 1060 | | if let Token::FstrInner(..) = token.token { [INFO] [stdout] 1061 | | break 'block token; [INFO] [stdout] 1062 | | } [INFO] [stdout] 1063 | | } [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] 1059 ~ if let Some(token) = next [INFO] [stdout] 1060 ~ && let Token::FstrInner(..) = token.token { [INFO] [stdout] 1061 | break 'block token; [INFO] [stdout] 1062 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1064:20 [INFO] [stdout] | [INFO] [stdout] 1064 | return Err(self.set_error( [INFO] [stdout] | ____________________^ [INFO] [stdout] 1065 | | self.cursor, [INFO] [stdout] 1066 | | ErrMsg::Expected("f-string head content".into()), [INFO] [stdout] 1067 | | )); [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] 1064 ~ return { [INFO] [stdout] 1065 + self.set_error( [INFO] [stdout] 1066 + self.cursor, [INFO] [stdout] 1067 + ErrMsg::Expected("f-string head content".into()), [INFO] [stdout] 1068 + ); [INFO] [stdout] 1069 + Err(()) [INFO] [stdout] 1070 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:1072:9 [INFO] [stdout] | [INFO] [stdout] 1072 | / loop { [INFO] [stdout] 1073 | | let Some(expr) = optional!(self, |ctx| { [INFO] [stdout] 1074 | | let expr = ctx.open_expr()?.boxed(); [INFO] [stdout] 1075 | | Ok(expr) [INFO] [stdout] ... | [INFO] [stdout] 1102 | | parts.push((fmt_expr, inner_content)); [INFO] [stdout] 1103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1072 ~ while let Some(expr) = optional!(self, |ctx| { [INFO] [stdout] 1073 + let expr = ctx.open_expr()?.boxed(); [INFO] [stdout] 1074 + Ok(expr) [INFO] [stdout] 1075 + })? { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1091:17 [INFO] [stdout] | [INFO] [stdout] 1091 | / if let Some(token) = next { [INFO] [stdout] 1092 | | if let Token::FstrInner(..) = token.token { [INFO] [stdout] 1093 | | break 'block token; [INFO] [stdout] 1094 | | } [INFO] [stdout] 1095 | | } [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] 1091 ~ if let Some(token) = next [INFO] [stdout] 1092 ~ && let Token::FstrInner(..) = token.token { [INFO] [stdout] 1093 | break 'block token; [INFO] [stdout] 1094 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1096:24 [INFO] [stdout] | [INFO] [stdout] 1096 | return Err(self.set_error( [INFO] [stdout] | ________________________^ [INFO] [stdout] 1097 | | self.cursor, [INFO] [stdout] 1098 | | ErrMsg::Expected("f-string content after expression".into()), [INFO] [stdout] 1099 | | )); [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] 1096 ~ return { [INFO] [stdout] 1097 + self.set_error( [INFO] [stdout] 1098 + self.cursor, [INFO] [stdout] 1099 + ErrMsg::Expected("f-string content after expression".into()), [INFO] [stdout] 1100 + ); [INFO] [stdout] 1101 + Err(()) [INFO] [stdout] 1102 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1130:9 [INFO] [stdout] | [INFO] [stdout] 1130 | / if let Some(found) = next { [INFO] [stdout] 1131 | | if let Token::Symbol(sym) = found.token { [INFO] [stdout] 1132 | | if let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | | return Ok((found, matched.1.clone())); [INFO] [stdout] ... | [INFO] [stdout] 1136 | | } [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] 1130 ~ if let Some(found) = next [INFO] [stdout] 1131 ~ && let Token::Symbol(sym) = found.token { [INFO] [stdout] 1132 | if let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | return Ok((found, matched.1.clone())); [INFO] [stdout] 1134 | } [INFO] [stdout] 1135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1131:13 [INFO] [stdout] | [INFO] [stdout] 1131 | / if let Token::Symbol(sym) = found.token { [INFO] [stdout] 1132 | | if let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | | return Ok((found, matched.1.clone())); [INFO] [stdout] 1134 | | } [INFO] [stdout] 1135 | | } [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] 1131 ~ if let Token::Symbol(sym) = found.token [INFO] [stdout] 1132 ~ && let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | return Ok((found, matched.1.clone())); [INFO] [stdout] 1134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1138:9 [INFO] [stdout] | [INFO] [stdout] 1138 | Err(self.set_error(start, ErrMsg::Expected("specific symbol".into()))) [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] 1138 ~ self.set_error(start, ErrMsg::Expected("specific symbol".into())); [INFO] [stdout] 1139 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1290:9 [INFO] [stdout] | [INFO] [stdout] 1290 | / if let Some(token) = self.peek_token() { [INFO] [stdout] 1291 | | if matches!( [INFO] [stdout] 1292 | | token.token, [INFO] [stdout] 1293 | | Token::Symbol("+") | Token::Symbol("-") | Token::Symbol("~") | Token::Symbol("@") [INFO] [stdout] ... | [INFO] [stdout] 1305 | | } [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] 1290 ~ if let Some(token) = self.peek_token() [INFO] [stdout] 1291 ~ && matches!( [INFO] [stdout] 1292 | token.token, [INFO] [stdout] ... [INFO] [stdout] 1303 | .spanned(self.span_from(start))); [INFO] [stdout] 1304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1507:36 [INFO] [stdout] | [INFO] [stdout] 1507 | ... return Err(self.set_error( [INFO] [stdout] | ______________________________^ [INFO] [stdout] 1508 | | ... start, [INFO] [stdout] 1509 | | ... ErrMsg::Custom("Decorator cannot be used with ? operator".into()), [INFO] [stdout] 1510 | | ... )); [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] 1507 ~ return { [INFO] [stdout] 1508 + self.set_error( [INFO] [stdout] 1509 + start, [INFO] [stdout] 1510 + ErrMsg::Custom("Decorator cannot be used with ? operator".into()), [INFO] [stdout] 1511 + ); [INFO] [stdout] 1512 + Err(()) [INFO] [stdout] 1513 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1522:32 [INFO] [stdout] | [INFO] [stdout] 1522 | return Err(self.set_error( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1523 | | start, [INFO] [stdout] 1524 | | ErrMsg::Custom("'?' must be followed by a call, attribute access, or index operation".into()), [INFO] [stdout] 1525 | | )); [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] 1522 ~ return { [INFO] [stdout] 1523 + self.set_error( [INFO] [stdout] 1524 + start, [INFO] [stdout] 1525 + ErrMsg::Custom("'?' must be followed by a call, attribute access, or index operation".into()), [INFO] [stdout] 1526 + ); [INFO] [stdout] 1527 + Err(()) [INFO] [stdout] 1528 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/parser.rs:1578:13 [INFO] [stdout] | [INFO] [stdout] 1578 | return Ok(expr); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1578 - return Ok(expr); [INFO] [stdout] 1578 + Ok(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1822:13 [INFO] [stdout] | [INFO] [stdout] 1822 | / if let Some(tok) = self.peek_token() { [INFO] [stdout] 1823 | | if tok.token == Token::Dedent { [INFO] [stdout] 1824 | | break; [INFO] [stdout] 1825 | | } [INFO] [stdout] 1826 | | } [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] 1822 ~ if let Some(tok) = self.peek_token() [INFO] [stdout] 1823 ~ && tok.token == Token::Dedent { [INFO] [stdout] 1824 | break; [INFO] [stdout] 1825 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:1917:13 [INFO] [stdout] | [INFO] [stdout] 1917 | / loop { [INFO] [stdout] 1918 | | let Some(except) = optional!(self, |ctx| { [INFO] [stdout] 1919 | | ctx.token(&Token::Eol)?; [INFO] [stdout] 1920 | | ctx.keyword("except") [INFO] [stdout] ... | [INFO] [stdout] 1943 | | }); [INFO] [stdout] 1944 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1917 ~ while let Some(except) = optional!(self, |ctx| { [INFO] [stdout] 1918 + ctx.token(&Token::Eol)?; [INFO] [stdout] 1919 + ctx.keyword("except") [INFO] [stdout] 1920 + })? { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2064:56 [INFO] [stdout] | [INFO] [stdout] 2064 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into()))); [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] 2064 ~ return { [INFO] [stdout] 2065 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into())); [INFO] [stdout] 2066 + Err(()) [INFO] [stdout] 2067 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2070:56 [INFO] [stdout] | [INFO] [stdout] 2070 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into()))); [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] 2070 ~ return { [INFO] [stdout] 2071 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into())); [INFO] [stdout] 2072 + Err(()) [INFO] [stdout] 2073 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2084:56 [INFO] [stdout] | [INFO] [stdout] 2084 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into()))); [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] 2084 ~ return { [INFO] [stdout] 2085 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into())); [INFO] [stdout] 2086 + Err(()) [INFO] [stdout] 2087 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2090:56 [INFO] [stdout] | [INFO] [stdout] 2090 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into()))); [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] 2090 ~ return { [INFO] [stdout] 2091 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into())); [INFO] [stdout] 2092 + Err(()) [INFO] [stdout] 2093 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> koatl-parser/src/parser.rs:2163:20 [INFO] [stdout] | [INFO] [stdout] 2163 | if let Some(_) = star { [INFO] [stdout] | -------^^^^^^^------- help: try: `if star.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2164:24 [INFO] [stdout] | [INFO] [stdout] 2164 | return Err(self.set_error( [INFO] [stdout] | ________________________^ [INFO] [stdout] 2165 | | before_star, [INFO] [stdout] 2166 | | ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 2167 | | )); [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] 2164 ~ return { [INFO] [stdout] 2165 + self.set_error( [INFO] [stdout] 2166 + before_star, [INFO] [stdout] 2167 + ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 2168 + ); [INFO] [stdout] 2169 + Err(()) [INFO] [stdout] 2170 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:2285:9 [INFO] [stdout] | [INFO] [stdout] 2285 | / loop { [INFO] [stdout] 2286 | | let Some(tok) = self.peek_token() else { [INFO] [stdout] 2287 | | break; [INFO] [stdout] 2288 | | }; [INFO] [stdout] ... | [INFO] [stdout] 2295 | | self.next_token(); [INFO] [stdout] 2296 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(tok) = self.peek_token() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> koatl-parser/src/parser.rs:2291:37 [INFO] [stdout] | [INFO] [stdout] 2291 | Token::Symbol(s) if s == "." => dots.push((tok, 1)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2291 - Token::Symbol(s) if s == "." => dots.push((tok, 1)), [INFO] [stdout] 2291 + Token::Symbol(".") => dots.push((tok, 1)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> koatl-parser/src/parser.rs:2292:37 [INFO] [stdout] | [INFO] [stdout] 2292 | Token::Symbol(s) if s == ".." => dots.push((tok, 2)), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2292 - Token::Symbol(s) if s == ".." => dots.push((tok, 2)), [INFO] [stdout] 2292 + Token::Symbol("..") => dots.push((tok, 2)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:2300:9 [INFO] [stdout] | [INFO] [stdout] 2300 | / loop { [INFO] [stdout] 2301 | | let Some((ident, dot)) = optional!(self, |ctx| { [INFO] [stdout] 2302 | | let ident = ctx.any_ident()?; [INFO] [stdout] 2303 | | let dot = ctx.symbol(".")?; [INFO] [stdout] ... | [INFO] [stdout] 2310 | | trunk.push((ident, dot)); [INFO] [stdout] 2311 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2300 ~ while let Some((ident, dot)) = optional!(self, |ctx| { [INFO] [stdout] 2301 + let ident = ctx.any_ident()?; [INFO] [stdout] 2302 + let dot = ctx.symbol(".")?; [INFO] [stdout] 2303 + Ok((ident, dot)) [INFO] [stdout] 2304 + })? { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2421:33 [INFO] [stdout] | [INFO] [stdout] 2421 | let pat = ctx.parse(&pattern)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `pattern` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2423:34 [INFO] [stdout] | [INFO] [stdout] 2423 | let expr = ctx.parse(&expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2434:33 [INFO] [stdout] | [INFO] [stdout] 2434 | let lhs = ctx.parse(&expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2459:37 [INFO] [stdout] | [INFO] [stdout] 2459 | let rhs = ctx.parse(&expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> koatl-parser/src/parser.rs:2627:74 [INFO] [stdout] | [INFO] [stdout] 2627 | ... Token::Symbol(")") => Some(Token::Symbol("(".into())), [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> koatl-parser/src/parser.rs:2628:74 [INFO] [stdout] | [INFO] [stdout] 2628 | ... Token::Symbol("]") => Some(Token::Symbol("[".into())), [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> koatl-parser/src/parser.rs:2629:74 [INFO] [stdout] | [INFO] [stdout] 2629 | ... Token::Symbol("}") => Some(Token::Symbol("{".into())), [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `"{"` [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: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2659:20 [INFO] [stdout] | [INFO] [stdout] 2659 | return Err(self.set_error(self.cursor, ErrMsg::Trailing)); [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] 2659 ~ return { [INFO] [stdout] 2660 + self.set_error(self.cursor, ErrMsg::Trailing); [INFO] [stdout] 2661 + Err(()) [INFO] [stdout] 2662 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> koatl-parser/src/simple_fmt.rs:62:40 [INFO] [stdout] | [INFO] [stdout] 62 | TupleKind::Unit(..) => format!("()"), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.to_string()`: `"()".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> koatl-parser/src/simple_fmt.rs:694:16 [INFO] [stdout] | [INFO] [stdout] 694 | if let Some(_) = &self.fmt { [INFO] [stdout] | -------^^^^^^^------------ help: try: `if self.fmt.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> koatl-parser/src/lexer.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | if !s [INFO] [stdout] | _________^ [INFO] [stdout] 233 | | .chars() [INFO] [stdout] 234 | | .next() [INFO] [stdout] 235 | | .map_or(false, |c| c.is_ascii_alphabetic() || c == '_') [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 235 - .map_or(false, |c| c.is_ascii_alphabetic() || c == '_') [INFO] [stdout] 235 + .is_some_and(|c| c.is_ascii_alphabetic() || c == '_') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:482:21 [INFO] [stdout] | [INFO] [stdout] 482 | return self.parse_binary_number(start); [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] 482 - return self.parse_binary_number(start); [INFO] [stdout] 482 + self.parse_binary_number(start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:486:21 [INFO] [stdout] | [INFO] [stdout] 486 | return self.parse_octal_number(start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 486 - return self.parse_octal_number(start); [INFO] [stdout] 486 + self.parse_octal_number(start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:490:21 [INFO] [stdout] | [INFO] [stdout] 490 | return self.parse_hex_number(start); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 490 - return self.parse_hex_number(start); [INFO] [stdout] 490 + self.parse_hex_number(start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:498:25 [INFO] [stdout] | [INFO] [stdout] 498 | return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 498 - return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] 498 + Ok((Token::Int(num_str), span, false)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:501:25 [INFO] [stdout] | [INFO] [stdout] 501 | return self.parse_decimal_float(start, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 501 - return self.parse_decimal_float(start, true); [INFO] [stdout] 501 + self.parse_decimal_float(start, true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:506:21 [INFO] [stdout] | [INFO] [stdout] 506 | return self.parse_decimal_number(start, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 506 - return self.parse_decimal_number(start, true); [INFO] [stdout] 506 + self.parse_decimal_number(start, true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:510:21 [INFO] [stdout] | [INFO] [stdout] 510 | return self.parse_decimal_float(start, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 510 - return self.parse_decimal_float(start, true); [INFO] [stdout] 510 + self.parse_decimal_float(start, true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:516:21 [INFO] [stdout] | [INFO] [stdout] 516 | return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 516 - return Ok((Token::Int(num_str), span, false)); [INFO] [stdout] 516 + Ok((Token::Int(num_str), span, false)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:521:13 [INFO] [stdout] | [INFO] [stdout] 521 | return self.parse_decimal_float(start, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 521 - return self.parse_decimal_float(start, false); [INFO] [stdout] 521 + self.parse_decimal_float(start, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:523:13 [INFO] [stdout] | [INFO] [stdout] 523 | return self.parse_decimal_number(start, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 523 - return self.parse_decimal_number(start, false); [INFO] [stdout] 523 + self.parse_decimal_number(start, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> koatl-parser/src/lexer.rs:623:40 [INFO] [stdout] | [INFO] [stdout] 623 | if self.peek() == Some('.') && !self.look_ahead(|x| x.parse_seq("..")).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.look_ahead(|x| x.parse_seq("..")).is_err()` [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 `if` has identical blocks [INFO] [stdout] --> koatl-parser/src/lexer.rs:623:88 [INFO] [stdout] | [INFO] [stdout] 623 | if self.peek() == Some('.') && !self.look_ahead(|x| x.parse_seq("..")).is_ok() { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 624 | | return self.parse_decimal_float(start, has_digits); [INFO] [stdout] 625 | | } else if matches!(self.peek(), Some('e') | Some('E')) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> koatl-parser/src/lexer.rs:625:64 [INFO] [stdout] | [INFO] [stdout] 625 | } else if matches!(self.peek(), Some('e') | Some('E')) { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 626 | | return self.parse_decimal_float(start, has_digits); [INFO] [stdout] 627 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> koatl-parser/src/lexer.rs:649:40 [INFO] [stdout] | [INFO] [stdout] 649 | if self.peek() == Some('.') && !self.look_ahead(|x| x.parse_seq("..")).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.look_ahead(|x| x.parse_seq("..")).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:725:13 [INFO] [stdout] | [INFO] [stdout] 725 | / return Err(LexError::custom( [INFO] [stdout] 726 | | self.span_since(&start), [INFO] [stdout] 727 | | "expected newline", [INFO] [stdout] 728 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 725 ~ Err(LexError::custom( [INFO] [stdout] 726 + self.span_since(&start), [INFO] [stdout] 727 + "expected newline", [INFO] [stdout] 728 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | / return Err(LexError::custom( [INFO] [stdout] 751 | | self.span_since(&self.cursor()), [INFO] [stdout] 752 | | "expected newline or end of file", [INFO] [stdout] 753 | | )); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 750 ~ Err(LexError::custom( [INFO] [stdout] 751 + self.span_since(&self.cursor()), [INFO] [stdout] 752 + "expected newline or end of file", [INFO] [stdout] 753 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/lexer.rs:848:9 [INFO] [stdout] | [INFO] [stdout] 848 | / return Err(LexError::custom( [INFO] [stdout] 849 | | self.span_since(&start), [INFO] [stdout] 850 | | "unterminated block comment", [INFO] [stdout] 851 | | )); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 848 ~ Err(LexError::custom( [INFO] [stdout] 849 + self.span_since(&start), [INFO] [stdout] 850 + "unterminated block comment", [INFO] [stdout] 851 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> koatl-parser/src/lexer.rs:831:19 [INFO] [stdout] | [INFO] [stdout] 831 | while let Some(_) = self.peek() { [INFO] [stdout] | ----------^^^^^^^-------------- help: try: `while self.peek().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> koatl-parser/src/lexer.rs:1326:36 [INFO] [stdout] | [INFO] [stdout] 1326 | self.try_parse(|ctx| TokenizeCtx::parse_empty_line(ctx)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `TokenizeCtx::parse_empty_line` [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: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1360:29 [INFO] [stdout] | [INFO] [stdout] 1360 | ... t.extend(first_token.leading_trivia.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t.append(&mut first_token.leading_trivia)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1374:25 [INFO] [stdout] | [INFO] [stdout] 1374 | tokens.extend(line_tokens.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `tokens.append(&mut line_tokens)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1483:21 [INFO] [stdout] | [INFO] [stdout] 1483 | vec.extend(tok.leading_trivia.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.append(&mut tok.leading_trivia)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/lexer.rs:1488:13 [INFO] [stdout] | [INFO] [stdout] 1488 | / if let Some(last_token) = line_tokens.last() { [INFO] [stdout] 1489 | | if let Token::Symbol(s) = last_token.token { [INFO] [stdout] 1490 | | if s == "=>" [INFO] [stdout] 1491 | | || s == ":" [INFO] [stdout] ... | [INFO] [stdout] 1497 | | } [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] 1488 ~ if let Some(last_token) = line_tokens.last() [INFO] [stdout] 1489 ~ && let Token::Symbol(s) = last_token.token { [INFO] [stdout] 1490 | if s == "=>" [INFO] [stdout] ... [INFO] [stdout] 1495 | } [INFO] [stdout] 1496 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/lexer.rs:1489:17 [INFO] [stdout] | [INFO] [stdout] 1489 | / if let Token::Symbol(s) = last_token.token { [INFO] [stdout] 1490 | | if s == "=>" [INFO] [stdout] 1491 | | || s == ":" [INFO] [stdout] 1492 | | || OPEN_DELIMS.contains(&s.chars().next().unwrap_or('\0')) [INFO] [stdout] ... | [INFO] [stdout] 1496 | | } [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] 1489 ~ if let Token::Symbol(s) = last_token.token [INFO] [stdout] 1490 ~ && (s == "=>" [INFO] [stdout] 1491 | || s == ":" [INFO] [stdout] 1492 ~ || OPEN_DELIMS.contains(&s.chars().next().unwrap_or('\0'))) [INFO] [stdout] 1493 | { [INFO] [stdout] 1494 | expect_new_block = true; [INFO] [stdout] 1495 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1514:13 [INFO] [stdout] | [INFO] [stdout] 1514 | tokens.extend(line_tokens.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `tokens.append(&mut line_tokens)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> koatl-parser/src/lexer.rs:1547:12 [INFO] [stdout] | [INFO] [stdout] 1547 | if delim_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!delim_stack.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: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1559:13 [INFO] [stdout] | [INFO] [stdout] 1559 | / tokens[i] [INFO] [stdout] 1560 | | .trailing_trivia [INFO] [stdout] 1561 | | .extend(cur_block_unassigned_trivia.drain(..)); [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1559 ~ tokens[i] [INFO] [stdout] 1560 ~ .trailing_trivia.append(&mut cur_block_unassigned_trivia); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-parser/src/lexer.rs:1566:9 [INFO] [stdout] | [INFO] [stdout] 1566 | / self.unassigned_trivia [INFO] [stdout] 1567 | | .extend(cur_block_unassigned_trivia.drain(..)); [INFO] [stdout] | |__________________________________________________________^ help: try: `self.unassigned_trivia.append(&mut cur_block_unassigned_trivia)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> koatl-parser/src/lexer.rs:1573:16 [INFO] [stdout] | [INFO] [stdout] 1573 | if let None = self.peek() { [INFO] [stdout] | -------^^^^-------------- help: try: `if self.peek().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | / if let Some(found) = next { [INFO] [stdout] 178 | | if found.token == *token { [INFO] [stdout] 179 | | return Ok(found); [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [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] 177 ~ if let Some(found) = next [INFO] [stdout] 178 ~ && found.token == *token { [INFO] [stdout] 179 | return Ok(found); [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | Err(self.set_error(start, ErrMsg::Expected(format!("{}", token).into()))) [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] 183 ~ self.set_error(start, ErrMsg::Expected(format!("{}", token).into())); [INFO] [stdout] 184 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | / if let Some(found) = next { [INFO] [stdout] 204 | | if let Token::Ident(_) = found.token { [INFO] [stdout] 205 | | return Ok(found); [INFO] [stdout] 206 | | } [INFO] [stdout] 207 | | } [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] 203 ~ if let Some(found) = next [INFO] [stdout] 204 ~ && let Token::Ident(_) = found.token { [INFO] [stdout] 205 | return Ok(found); [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | Err(self.set_error(start, ErrMsg::Expected("identifier".into()))) [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] 209 ~ self.set_error(start, ErrMsg::Expected("identifier".into())); [INFO] [stdout] 210 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | / if let Some(found) = next { [INFO] [stdout] 218 | | if let Token::Int(_) [INFO] [stdout] 219 | | | Token::IntBin(_) [INFO] [stdout] 220 | | | Token::IntHex(_) [INFO] [stdout] ... | [INFO] [stdout] 229 | | } [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] 217 ~ if let Some(found) = next [INFO] [stdout] 218 ~ && let Token::Int(_) [INFO] [stdout] 219 | | Token::IntBin(_) [INFO] [stdout] ... [INFO] [stdout] 227 | return Ok(found); [INFO] [stdout] 228 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | Err(self.set_error(start, ErrMsg::Expected("literal".into()))) [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] 231 ~ self.set_error(start, ErrMsg::Expected("literal".into())); [INFO] [stdout] 232 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:415:28 [INFO] [stdout] | [INFO] [stdout] 415 | return Err(self.set_error( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 416 | | before_star, [INFO] [stdout] 417 | | ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 418 | | )); [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] 415 ~ return { [INFO] [stdout] 416 + self.set_error( [INFO] [stdout] 417 + before_star, [INFO] [stdout] 418 + ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 419 + ); [INFO] [stdout] 420 + Err(()) [INFO] [stdout] 421 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:610:25 [INFO] [stdout] | [INFO] [stdout] 610 | / Err(ctx.set_error( [INFO] [stdout] 611 | | ctx.cursor, [INFO] [stdout] 612 | | ErrMsg::Custom( [INFO] [stdout] 613 | | "f-strings are not allowed as mapping-pattern keys".into(), [INFO] [stdout] 614 | | ), [INFO] [stdout] 615 | | )) [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] 610 ~ let _: () = ctx.set_error( [INFO] [stdout] 611 + ctx.cursor, [INFO] [stdout] 612 + ErrMsg::Custom( [INFO] [stdout] 613 + "f-strings are not allowed as mapping-pattern keys".into(), [INFO] [stdout] 614 + ), [INFO] [stdout] 615 + ); [INFO] [stdout] 616 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> koatl-parser/src/parser.rs:914:61 [INFO] [stdout] | [INFO] [stdout] 914 | ctx.listing("(", ")", Token::Symbol(","), |ctx| Ok(ctx.call_item()?)) [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] 914 - ctx.listing("(", ")", Token::Symbol(","), |ctx| Ok(ctx.call_item()?)) [INFO] [stdout] 914 + ctx.listing("(", ")", Token::Symbol(","), |ctx| ctx.call_item()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> koatl-parser/src/parser.rs:1015:10 [INFO] [stdout] | [INFO] [stdout] 1015 | ) -> ParseResult<( [INFO] [stdout] | __________^ [INFO] [stdout] 1016 | | &'tok SToken<'src>, [INFO] [stdout] 1017 | | &'tok SToken<'src>, [INFO] [stdout] 1018 | | Vec<(SFmtExpr<'src, 'tok>, &'tok SToken<'src>)>, [INFO] [stdout] 1019 | | &'tok SToken<'src>, [INFO] [stdout] 1020 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1025:13 [INFO] [stdout] | [INFO] [stdout] 1025 | / if let Some(token) = next { [INFO] [stdout] 1026 | | if let Token::FstrBegin(_) | Token::VerbatimFstrBegin(_) = token.token { [INFO] [stdout] 1027 | | break 'block token; [INFO] [stdout] 1028 | | } [INFO] [stdout] 1029 | | } [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] 1025 ~ if let Some(token) = next [INFO] [stdout] 1026 ~ && let Token::FstrBegin(_) | Token::VerbatimFstrBegin(_) = token.token { [INFO] [stdout] 1027 | break 'block token; [INFO] [stdout] 1028 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1031:20 [INFO] [stdout] | [INFO] [stdout] 1031 | return Err(self.set_error(start, ErrMsg::Expected("f-string begin".into()))); [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] 1031 ~ return { [INFO] [stdout] 1032 + self.set_error(start, ErrMsg::Expected("f-string begin".into())); [INFO] [stdout] 1033 + Err(()) [INFO] [stdout] 1034 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1038:13 [INFO] [stdout] | [INFO] [stdout] 1038 | / if let Some(token) = next { [INFO] [stdout] 1039 | | if let Token::FstrEnd(_) | Token::VerbatimFstrEnd(_) = token.token { [INFO] [stdout] 1040 | | break 'block token; [INFO] [stdout] 1041 | | } [INFO] [stdout] 1042 | | } [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] 1038 ~ if let Some(token) = next [INFO] [stdout] 1039 ~ && let Token::FstrEnd(_) | Token::VerbatimFstrEnd(_) = token.token { [INFO] [stdout] 1040 | break 'block token; [INFO] [stdout] 1041 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1044:20 [INFO] [stdout] | [INFO] [stdout] 1044 | return Err(self.set_error(start, ErrMsg::Expected("f-string end".into()))); [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] 1044 ~ return { [INFO] [stdout] 1045 + self.set_error(start, ErrMsg::Expected("f-string end".into())); [INFO] [stdout] 1046 + Err(()) [INFO] [stdout] 1047 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1059:13 [INFO] [stdout] | [INFO] [stdout] 1059 | / if let Some(token) = next { [INFO] [stdout] 1060 | | if let Token::FstrInner(..) = token.token { [INFO] [stdout] 1061 | | break 'block token; [INFO] [stdout] 1062 | | } [INFO] [stdout] 1063 | | } [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] 1059 ~ if let Some(token) = next [INFO] [stdout] 1060 ~ && let Token::FstrInner(..) = token.token { [INFO] [stdout] 1061 | break 'block token; [INFO] [stdout] 1062 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1064:20 [INFO] [stdout] | [INFO] [stdout] 1064 | return Err(self.set_error( [INFO] [stdout] | ____________________^ [INFO] [stdout] 1065 | | self.cursor, [INFO] [stdout] 1066 | | ErrMsg::Expected("f-string head content".into()), [INFO] [stdout] 1067 | | )); [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] 1064 ~ return { [INFO] [stdout] 1065 + self.set_error( [INFO] [stdout] 1066 + self.cursor, [INFO] [stdout] 1067 + ErrMsg::Expected("f-string head content".into()), [INFO] [stdout] 1068 + ); [INFO] [stdout] 1069 + Err(()) [INFO] [stdout] 1070 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:1072:9 [INFO] [stdout] | [INFO] [stdout] 1072 | / loop { [INFO] [stdout] 1073 | | let Some(expr) = optional!(self, |ctx| { [INFO] [stdout] 1074 | | let expr = ctx.open_expr()?.boxed(); [INFO] [stdout] 1075 | | Ok(expr) [INFO] [stdout] ... | [INFO] [stdout] 1102 | | parts.push((fmt_expr, inner_content)); [INFO] [stdout] 1103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1072 ~ while let Some(expr) = optional!(self, |ctx| { [INFO] [stdout] 1073 + let expr = ctx.open_expr()?.boxed(); [INFO] [stdout] 1074 + Ok(expr) [INFO] [stdout] 1075 + })? { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling pyo3-macros-backend v0.25.1 [INFO] [stderr] Compiling pyo3-ffi v0.25.1 [INFO] [stderr] Compiling pyo3 v0.25.1 [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1091:17 [INFO] [stdout] | [INFO] [stdout] 1091 | / if let Some(token) = next { [INFO] [stdout] 1092 | | if let Token::FstrInner(..) = token.token { [INFO] [stdout] 1093 | | break 'block token; [INFO] [stdout] 1094 | | } [INFO] [stdout] 1095 | | } [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] 1091 ~ if let Some(token) = next [INFO] [stdout] 1092 ~ && let Token::FstrInner(..) = token.token { [INFO] [stdout] 1093 | break 'block token; [INFO] [stdout] 1094 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1096:24 [INFO] [stdout] | [INFO] [stdout] 1096 | return Err(self.set_error( [INFO] [stdout] | ________________________^ [INFO] [stdout] 1097 | | self.cursor, [INFO] [stdout] 1098 | | ErrMsg::Expected("f-string content after expression".into()), [INFO] [stdout] 1099 | | )); [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] 1096 ~ return { [INFO] [stdout] 1097 + self.set_error( [INFO] [stdout] 1098 + self.cursor, [INFO] [stdout] 1099 + ErrMsg::Expected("f-string content after expression".into()), [INFO] [stdout] 1100 + ); [INFO] [stdout] 1101 + Err(()) [INFO] [stdout] 1102 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1130:9 [INFO] [stdout] | [INFO] [stdout] 1130 | / if let Some(found) = next { [INFO] [stdout] 1131 | | if let Token::Symbol(sym) = found.token { [INFO] [stdout] 1132 | | if let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | | return Ok((found, matched.1.clone())); [INFO] [stdout] ... | [INFO] [stdout] 1136 | | } [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] 1130 ~ if let Some(found) = next [INFO] [stdout] 1131 ~ && let Token::Symbol(sym) = found.token { [INFO] [stdout] 1132 | if let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | return Ok((found, matched.1.clone())); [INFO] [stdout] 1134 | } [INFO] [stdout] 1135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1131:13 [INFO] [stdout] | [INFO] [stdout] 1131 | / if let Token::Symbol(sym) = found.token { [INFO] [stdout] 1132 | | if let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | | return Ok((found, matched.1.clone())); [INFO] [stdout] 1134 | | } [INFO] [stdout] 1135 | | } [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] 1131 ~ if let Token::Symbol(sym) = found.token [INFO] [stdout] 1132 ~ && let Some(matched) = symbols.iter().find(|(s, _)| *s == sym) { [INFO] [stdout] 1133 | return Ok((found, matched.1.clone())); [INFO] [stdout] 1134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1138:9 [INFO] [stdout] | [INFO] [stdout] 1138 | Err(self.set_error(start, ErrMsg::Expected("specific symbol".into()))) [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] 1138 ~ self.set_error(start, ErrMsg::Expected("specific symbol".into())); [INFO] [stdout] 1139 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1290:9 [INFO] [stdout] | [INFO] [stdout] 1290 | / if let Some(token) = self.peek_token() { [INFO] [stdout] 1291 | | if matches!( [INFO] [stdout] 1292 | | token.token, [INFO] [stdout] 1293 | | Token::Symbol("+") | Token::Symbol("-") | Token::Symbol("~") | Token::Symbol("@") [INFO] [stdout] ... | [INFO] [stdout] 1305 | | } [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] 1290 ~ if let Some(token) = self.peek_token() [INFO] [stdout] 1291 ~ && matches!( [INFO] [stdout] 1292 | token.token, [INFO] [stdout] ... [INFO] [stdout] 1303 | .spanned(self.span_from(start))); [INFO] [stdout] 1304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1507:36 [INFO] [stdout] | [INFO] [stdout] 1507 | ... return Err(self.set_error( [INFO] [stdout] | ______________________________^ [INFO] [stdout] 1508 | | ... start, [INFO] [stdout] 1509 | | ... ErrMsg::Custom("Decorator cannot be used with ? operator".into()), [INFO] [stdout] 1510 | | ... )); [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] 1507 ~ return { [INFO] [stdout] 1508 + self.set_error( [INFO] [stdout] 1509 + start, [INFO] [stdout] 1510 + ErrMsg::Custom("Decorator cannot be used with ? operator".into()), [INFO] [stdout] 1511 + ); [INFO] [stdout] 1512 + Err(()) [INFO] [stdout] 1513 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:1522:32 [INFO] [stdout] | [INFO] [stdout] 1522 | return Err(self.set_error( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1523 | | start, [INFO] [stdout] 1524 | | ErrMsg::Custom("'?' must be followed by a call, attribute access, or index operation".into()), [INFO] [stdout] 1525 | | )); [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] 1522 ~ return { [INFO] [stdout] 1523 + self.set_error( [INFO] [stdout] 1524 + start, [INFO] [stdout] 1525 + ErrMsg::Custom("'?' must be followed by a call, attribute access, or index operation".into()), [INFO] [stdout] 1526 + ); [INFO] [stdout] 1527 + Err(()) [INFO] [stdout] 1528 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-parser/src/parser.rs:1578:13 [INFO] [stdout] | [INFO] [stdout] 1578 | return Ok(expr); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1578 - return Ok(expr); [INFO] [stdout] 1578 + Ok(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-parser/src/parser.rs:1822:13 [INFO] [stdout] | [INFO] [stdout] 1822 | / if let Some(tok) = self.peek_token() { [INFO] [stdout] 1823 | | if tok.token == Token::Dedent { [INFO] [stdout] 1824 | | break; [INFO] [stdout] 1825 | | } [INFO] [stdout] 1826 | | } [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] 1822 ~ if let Some(tok) = self.peek_token() [INFO] [stdout] 1823 ~ && tok.token == Token::Dedent { [INFO] [stdout] 1824 | break; [INFO] [stdout] 1825 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:1917:13 [INFO] [stdout] | [INFO] [stdout] 1917 | / loop { [INFO] [stdout] 1918 | | let Some(except) = optional!(self, |ctx| { [INFO] [stdout] 1919 | | ctx.token(&Token::Eol)?; [INFO] [stdout] 1920 | | ctx.keyword("except") [INFO] [stdout] ... | [INFO] [stdout] 1943 | | }); [INFO] [stdout] 1944 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1917 ~ while let Some(except) = optional!(self, |ctx| { [INFO] [stdout] 1918 + ctx.token(&Token::Eol)?; [INFO] [stdout] 1919 + ctx.keyword("except") [INFO] [stdout] 1920 + })? { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2064:56 [INFO] [stdout] | [INFO] [stdout] 2064 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into()))); [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] 2064 ~ return { [INFO] [stdout] 2065 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into())); [INFO] [stdout] 2066 + Err(()) [INFO] [stdout] 2067 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2070:56 [INFO] [stdout] | [INFO] [stdout] 2070 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into()))); [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] 2070 ~ return { [INFO] [stdout] 2071 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into())); [INFO] [stdout] 2072 + Err(()) [INFO] [stdout] 2073 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2084:56 [INFO] [stdout] | [INFO] [stdout] 2084 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into()))); [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] 2084 ~ return { [INFO] [stdout] 2085 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("No arguments are allowed after **kwargs in a delegate".into())); [INFO] [stdout] 2086 + Err(()) [INFO] [stdout] 2087 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2090:56 [INFO] [stdout] | [INFO] [stdout] 2090 | ... return Err(ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into()))); [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] 2090 ~ return { [INFO] [stdout] 2091 + let _: () = ctx.set_error(ctx.cursor, ErrMsg::Custom("Only one **kwargs is allowed in a delegate".into())); [INFO] [stdout] 2092 + Err(()) [INFO] [stdout] 2093 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> koatl-parser/src/parser.rs:2163:20 [INFO] [stdout] | [INFO] [stdout] 2163 | if let Some(_) = star { [INFO] [stdout] | -------^^^^^^^------- help: try: `if star.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2164:24 [INFO] [stdout] | [INFO] [stdout] 2164 | return Err(self.set_error( [INFO] [stdout] | ________________________^ [INFO] [stdout] 2165 | | before_star, [INFO] [stdout] 2166 | | ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 2167 | | )); [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] 2164 ~ return { [INFO] [stdout] 2165 + self.set_error( [INFO] [stdout] 2166 + before_star, [INFO] [stdout] 2167 + ErrMsg::Custom("Spread is not allowed outside of tuples".into()), [INFO] [stdout] 2168 + ); [INFO] [stdout] 2169 + Err(()) [INFO] [stdout] 2170 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:2285:9 [INFO] [stdout] | [INFO] [stdout] 2285 | / loop { [INFO] [stdout] 2286 | | let Some(tok) = self.peek_token() else { [INFO] [stdout] 2287 | | break; [INFO] [stdout] 2288 | | }; [INFO] [stdout] ... | [INFO] [stdout] 2295 | | self.next_token(); [INFO] [stdout] 2296 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(tok) = self.peek_token() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> koatl-parser/src/parser.rs:2291:37 [INFO] [stdout] | [INFO] [stdout] 2291 | Token::Symbol(s) if s == "." => dots.push((tok, 1)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2291 - Token::Symbol(s) if s == "." => dots.push((tok, 1)), [INFO] [stdout] 2291 + Token::Symbol(".") => dots.push((tok, 1)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> koatl-parser/src/parser.rs:2292:37 [INFO] [stdout] | [INFO] [stdout] 2292 | Token::Symbol(s) if s == ".." => dots.push((tok, 2)), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2292 - Token::Symbol(s) if s == ".." => dots.push((tok, 2)), [INFO] [stdout] 2292 + Token::Symbol("..") => dots.push((tok, 2)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-parser/src/parser.rs:2300:9 [INFO] [stdout] | [INFO] [stdout] 2300 | / loop { [INFO] [stdout] 2301 | | let Some((ident, dot)) = optional!(self, |ctx| { [INFO] [stdout] 2302 | | let ident = ctx.any_ident()?; [INFO] [stdout] 2303 | | let dot = ctx.symbol(".")?; [INFO] [stdout] ... | [INFO] [stdout] 2310 | | trunk.push((ident, dot)); [INFO] [stdout] 2311 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2300 ~ while let Some((ident, dot)) = optional!(self, |ctx| { [INFO] [stdout] 2301 + let ident = ctx.any_ident()?; [INFO] [stdout] 2302 + let dot = ctx.symbol(".")?; [INFO] [stdout] 2303 + Ok((ident, dot)) [INFO] [stdout] 2304 + })? { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2421:33 [INFO] [stdout] | [INFO] [stdout] 2421 | let pat = ctx.parse(&pattern)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `pattern` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2423:34 [INFO] [stdout] | [INFO] [stdout] 2423 | let expr = ctx.parse(&expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2434:33 [INFO] [stdout] | [INFO] [stdout] 2434 | let lhs = ctx.parse(&expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> koatl-parser/src/parser.rs:2459:37 [INFO] [stdout] | [INFO] [stdout] 2459 | let rhs = ctx.parse(&expr)?; [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> koatl-parser/src/parser.rs:2627:74 [INFO] [stdout] | [INFO] [stdout] 2627 | ... Token::Symbol(")") => Some(Token::Symbol("(".into())), [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `"("` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> koatl-parser/src/parser.rs:2628:74 [INFO] [stdout] | [INFO] [stdout] 2628 | ... Token::Symbol("]") => Some(Token::Symbol("[".into())), [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `"["` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> koatl-parser/src/parser.rs:2629:74 [INFO] [stdout] | [INFO] [stdout] 2629 | ... Token::Symbol("}") => Some(Token::Symbol("{".into())), [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `"{"` [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: passing a unit value to a function [INFO] [stdout] --> koatl-parser/src/parser.rs:2659:20 [INFO] [stdout] | [INFO] [stdout] 2659 | return Err(self.set_error(self.cursor, ErrMsg::Trailing)); [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] 2659 ~ return { [INFO] [stdout] 2660 + self.set_error(self.cursor, ErrMsg::Trailing); [INFO] [stdout] 2661 + Err(()) [INFO] [stdout] 2662 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> koatl-parser/src/simple_fmt.rs:62:40 [INFO] [stdout] | [INFO] [stdout] 62 | TupleKind::Unit(..) => format!("()"), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.to_string()`: `"()".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> koatl-parser/src/simple_fmt.rs:694:16 [INFO] [stdout] | [INFO] [stdout] 694 | if let Some(_) = &self.fmt { [INFO] [stdout] | -------^^^^^^^------------ help: try: `if self.fmt.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling clap_derive v4.5.45 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling indexmap v2.11.0 [INFO] [stderr] Compiling wasmparser v0.201.0 [INFO] [stderr] Checking clap v4.5.46 [INFO] [stderr] Checking koatl-core v0.1.0 (/opt/rustwide/workdir/koatl-core) [INFO] [stderr] Checking ohtli v0.1.2 (/opt/rustwide/workdir/ohtli) [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> koatl-core/src/py/emit.rs:689:19 [INFO] [stdout] | [INFO] [stdout] 689 | } else { [INFO] [stdout] | ___________________^ [INFO] [stdout] 690 | | } [INFO] [stdout] | |_________________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:983:17 [INFO] [stdout] | [INFO] [stdout] 983 | fn traverse(self: Self, state: &mut ResolveState<'src>) -> Indirect> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 983 - fn traverse(self: Self, state: &mut ResolveState<'src>) -> Indirect> { [INFO] [stdout] 983 + fn traverse(self, state: &mut ResolveState<'src>) -> Indirect> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:988:9 [INFO] [stdout] | [INFO] [stdout] 988 | self: Self, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 988 - self: Self, [INFO] [stdout] 988 + self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-core/src/transform.rs:1541:17 [INFO] [stdout] | [INFO] [stdout] 1541 | args: args, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-core/src/transform.rs:1542:17 [INFO] [stdout] | [INFO] [stdout] 1542 | body: body, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-core/src/transform.rs:1543:17 [INFO] [stdout] | [INFO] [stdout] 1543 | decorators: decorators, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `decorators` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> ohtli/src/formatter.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | format!("{}", line_strs.join("\n")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_strs.join("\n").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> ohtli/src/formatter.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | / match &t.data { [INFO] [stdout] 196 | | ElementData::Block { inline: false, .. } => { [INFO] [stdout] 197 | | cur_line.push(t); [INFO] [stdout] 198 | | lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] ... | [INFO] [stdout] 201 | | _ => {} [INFO] [stdout] 202 | | } [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] 195 ~ if let ElementData::Block { inline: false, .. } = &t.data { [INFO] [stdout] 196 + cur_line.push(t); [INFO] [stdout] 197 + lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] 198 + continue; [INFO] [stdout] 199 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> ohtli/src/formatter.rs:821:51 [INFO] [stdout] | [INFO] [stdout] 821 | line!(class_kw, args.as_ref().map(|x| attached_listing(x)), body) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `attached_listing` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> ohtli/src/formatter.rs:951:17 [INFO] [stdout] | [INFO] [stdout] 950 | let elems = line!(delegate_kw, (&**target), items); [INFO] [stdout] | --------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 951 | elems [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 950 ~ [INFO] [stdout] 951 ~ { [INFO] [stdout] 952 + let mut v: Vec = vec![]; [INFO] [stdout] 953 + [INFO] [stdout] 954 + $( [INFO] [stdout] 955 + v.extend($v.to_elements()); [INFO] [stdout] 956 + )+ [INFO] [stdout] 957 + [INFO] [stdout] 958 + v [INFO] [stdout] 959 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> ohtli/src/formatter.rs:1538:17 [INFO] [stdout] | [INFO] [stdout] 1538 | / if top.just_emitted_line_break && top.seen_atom { [INFO] [stdout] 1539 | | if !top.continued { [INFO] [stdout] 1540 | | top.continued = true; [INFO] [stdout] 1541 | | self.indent_level += 1; [INFO] [stdout] 1542 | | } [INFO] [stdout] 1543 | | } [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] 1538 ~ if top.just_emitted_line_break && top.seen_atom [INFO] [stdout] 1539 ~ && !top.continued { [INFO] [stdout] 1540 | top.continued = true; [INFO] [stdout] 1541 | self.indent_level += 1; [INFO] [stdout] 1542 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> koatl-core/src/py/emit.rs:689:19 [INFO] [stdout] | [INFO] [stdout] 689 | } else { [INFO] [stdout] | ___________________^ [INFO] [stdout] 690 | | } [INFO] [stdout] | |_________________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:983:17 [INFO] [stdout] | [INFO] [stdout] 983 | fn traverse(self: Self, state: &mut ResolveState<'src>) -> Indirect> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 983 - fn traverse(self: Self, state: &mut ResolveState<'src>) -> Indirect> { [INFO] [stdout] 983 + fn traverse(self, state: &mut ResolveState<'src>) -> Indirect> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:988:9 [INFO] [stdout] | [INFO] [stdout] 988 | self: Self, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 988 - self: Self, [INFO] [stdout] 988 + self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-core/src/transform.rs:1541:17 [INFO] [stdout] | [INFO] [stdout] 1541 | args: args, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-core/src/transform.rs:1542:17 [INFO] [stdout] | [INFO] [stdout] 1542 | body: body, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> koatl-core/src/transform.rs:1543:17 [INFO] [stdout] | [INFO] [stdout] 1543 | decorators: decorators, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `decorators` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> ohtli/src/formatter.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | format!("{}", line_strs.join("\n")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_strs.join("\n").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> ohtli/src/formatter.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | / match &t.data { [INFO] [stdout] 196 | | ElementData::Block { inline: false, .. } => { [INFO] [stdout] 197 | | cur_line.push(t); [INFO] [stdout] 198 | | lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] ... | [INFO] [stdout] 201 | | _ => {} [INFO] [stdout] 202 | | } [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] 195 ~ if let ElementData::Block { inline: false, .. } = &t.data { [INFO] [stdout] 196 + cur_line.push(t); [INFO] [stdout] 197 + lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] 198 + continue; [INFO] [stdout] 199 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> ohtli/src/formatter.rs:821:51 [INFO] [stdout] | [INFO] [stdout] 821 | line!(class_kw, args.as_ref().map(|x| attached_listing(x)), body) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `attached_listing` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> ohtli/src/formatter.rs:951:17 [INFO] [stdout] | [INFO] [stdout] 950 | let elems = line!(delegate_kw, (&**target), items); [INFO] [stdout] | --------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 951 | elems [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 950 ~ [INFO] [stdout] 951 ~ { [INFO] [stdout] 952 + let mut v: Vec = vec![]; [INFO] [stdout] 953 + [INFO] [stdout] 954 + $( [INFO] [stdout] 955 + v.extend($v.to_elements()); [INFO] [stdout] 956 + )+ [INFO] [stdout] 957 + [INFO] [stdout] 958 + v [INFO] [stdout] 959 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> ohtli/src/formatter.rs:1538:17 [INFO] [stdout] | [INFO] [stdout] 1538 | / if top.just_emitted_line_break && top.seen_atom { [INFO] [stdout] 1539 | | if !top.continued { [INFO] [stdout] 1540 | | top.continued = true; [INFO] [stdout] 1541 | | self.indent_level += 1; [INFO] [stdout] 1542 | | } [INFO] [stdout] 1543 | | } [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] 1538 ~ if top.just_emitted_line_break && top.seen_atom [INFO] [stdout] 1539 ~ && !top.continued { [INFO] [stdout] 1540 | top.continued = true; [INFO] [stdout] 1541 | self.indent_level += 1; [INFO] [stdout] 1542 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> ohtli/src/formatter.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | format!("{}", line_strs.join("\n")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_strs.join("\n").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> ohtli/src/formatter.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | / match &t.data { [INFO] [stdout] 196 | | ElementData::Block { inline: false, .. } => { [INFO] [stdout] 197 | | cur_line.push(t); [INFO] [stdout] 198 | | lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] ... | [INFO] [stdout] 201 | | _ => {} [INFO] [stdout] 202 | | } [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] 195 ~ if let ElementData::Block { inline: false, .. } = &t.data { [INFO] [stdout] 196 + cur_line.push(t); [INFO] [stdout] 197 + lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] 198 + continue; [INFO] [stdout] 199 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> ohtli/src/formatter.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | format!("{}", line_strs.join("\n")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line_strs.join("\n").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> ohtli/src/formatter.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | / match &t.data { [INFO] [stdout] 196 | | ElementData::Block { inline: false, .. } => { [INFO] [stdout] 197 | | cur_line.push(t); [INFO] [stdout] 198 | | lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] ... | [INFO] [stdout] 201 | | _ => {} [INFO] [stdout] 202 | | } [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] 195 ~ if let ElementData::Block { inline: false, .. } = &t.data { [INFO] [stdout] 196 + cur_line.push(t); [INFO] [stdout] 197 + lines.push(std::mem::take(&mut cur_line)); [INFO] [stdout] 198 + continue; [INFO] [stdout] 199 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> ohtli/src/formatter.rs:821:51 [INFO] [stdout] | [INFO] [stdout] 821 | line!(class_kw, args.as_ref().map(|x| attached_listing(x)), body) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `attached_listing` [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] --> ohtli/src/formatter.rs:821:51 [INFO] [stdout] | [INFO] [stdout] 821 | line!(class_kw, args.as_ref().map(|x| attached_listing(x)), body) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `attached_listing` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> ohtli/src/formatter.rs:951:17 [INFO] [stdout] | [INFO] [stdout] 950 | let elems = line!(delegate_kw, (&**target), items); [INFO] [stdout] | --------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 951 | elems [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 950 ~ [INFO] [stdout] 951 ~ { [INFO] [stdout] 952 + let mut v: Vec = vec![]; [INFO] [stdout] 953 + [INFO] [stdout] 954 + $( [INFO] [stdout] 955 + v.extend($v.to_elements()); [INFO] [stdout] 956 + )+ [INFO] [stdout] 957 + [INFO] [stdout] 958 + v [INFO] [stdout] 959 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> ohtli/src/formatter.rs:951:17 [INFO] [stdout] | [INFO] [stdout] 950 | let elems = line!(delegate_kw, (&**target), items); [INFO] [stdout] | --------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 951 | elems [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 950 ~ [INFO] [stdout] 951 ~ { [INFO] [stdout] 952 + let mut v: Vec = vec![]; [INFO] [stdout] 953 + [INFO] [stdout] 954 + $( [INFO] [stdout] 955 + v.extend($v.to_elements()); [INFO] [stdout] 956 + )+ [INFO] [stdout] 957 + [INFO] [stdout] 958 + v [INFO] [stdout] 959 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> ohtli/src/formatter.rs:1538:17 [INFO] [stdout] | [INFO] [stdout] 1538 | / if top.just_emitted_line_break && top.seen_atom { [INFO] [stdout] 1539 | | if !top.continued { [INFO] [stdout] 1540 | | top.continued = true; [INFO] [stdout] 1541 | | self.indent_level += 1; [INFO] [stdout] 1542 | | } [INFO] [stdout] 1543 | | } [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] 1538 ~ if top.just_emitted_line_break && top.seen_atom [INFO] [stdout] 1539 ~ && !top.continued { [INFO] [stdout] 1540 | top.continued = true; [INFO] [stdout] 1541 | self.indent_level += 1; [INFO] [stdout] 1542 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> ohtli/src/formatter.rs:1538:17 [INFO] [stdout] | [INFO] [stdout] 1538 | / if top.just_emitted_line_break && top.seen_atom { [INFO] [stdout] 1539 | | if !top.continued { [INFO] [stdout] 1540 | | top.continued = true; [INFO] [stdout] 1541 | | self.indent_level += 1; [INFO] [stdout] 1542 | | } [INFO] [stdout] 1543 | | } [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] 1538 ~ if top.just_emitted_line_break && top.seen_atom [INFO] [stdout] 1539 ~ && !top.continued { [INFO] [stdout] 1540 | top.continued = true; [INFO] [stdout] 1541 | self.indent_level += 1; [INFO] [stdout] 1542 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/inference.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | return typ; [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] 295 - return typ; [INFO] [stdout] 295 + typ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> koatl-core/src/inference.rs:273:29 [INFO] [stdout] | [INFO] [stdout] 273 | / ... if let Some(default) = default { [INFO] [stdout] 274 | | ... default.traverse(ctx); [INFO] [stdout] 275 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> koatl-core/src/inference.rs:272:48 [INFO] [stdout] | [INFO] [stdout] 272 | ArgDefItem::Arg(_expr, default) => { [INFO] [stdout] | ^^^^^^^ replace this binding [INFO] [stdout] 273 | if let Some(default) = default { [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> koatl-core/src/inference.rs:271:21 [INFO] [stdout] | [INFO] [stdout] 271 | / match arg { [INFO] [stdout] 272 | | ArgDefItem::Arg(_expr, default) => { [INFO] [stdout] 273 | | if let Some(default) = default { [INFO] [stdout] 274 | | default.traverse(ctx); [INFO] [stdout] ... | [INFO] [stdout] 277 | | _ => {} [INFO] [stdout] 278 | | }; [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] 271 ~ if let ArgDefItem::Arg(_expr, default) = arg { [INFO] [stdout] 272 + if let Some(default) = default { [INFO] [stdout] 273 + default.traverse(ctx); [INFO] [stdout] 274 + } [INFO] [stdout] 275 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lift_cst.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | lift_fstr(&fmt.head, &fmt.parts) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `fmt.head` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> koatl-core/src/lift_cst.rs:92:35 [INFO] [stdout] | [INFO] [stdout] 92 | Token::Kw(k) => match k.as_ref() { [INFO] [stdout] | ^^^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/lift_cst.rs:498:59 [INFO] [stdout] | [INFO] [stdout] 498 | ast::Stmt::Assign(lhs.lift(), rhs.lift(), op.clone()) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*op` [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: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> koatl-core/src/lift_cst.rs:556:25 [INFO] [stdout] | [INFO] [stdout] 556 | .map(|stmt: &Box| -> Indirect { (*stmt).lift() }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&cst::SStmt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PyDecorators<'a>` [INFO] [stdout] --> koatl-core/src/py/ast.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn new() -> Self { [INFO] [stdout] 39 | | PyDecorators(Vec::new()) [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 37 + impl<'a> Default for PyDecorators<'a> { [INFO] [stdout] 38 + fn default() -> Self { [INFO] [stdout] 39 + Self::new() [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PyBlock<'a>` [INFO] [stdout] --> koatl-core/src/py/ast.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / pub fn new() -> Self { [INFO] [stdout] 96 | | PyBlock(Vec::new()) [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_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 94 + impl<'a> Default for PyBlock<'a> { [INFO] [stdout] 95 + fn default() -> Self { [INFO] [stdout] 96 + Self::new() [INFO] [stdout] 97 + } [INFO] [stdout] 98 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> koatl-core/src/py/ast.rs:239:1 [INFO] [stdout] | [INFO] [stdout] 239 | / pub enum PyFstrPart<'a> { [INFO] [stdout] 240 | | Str(PyToken<'a>), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] 241 | | Expr(SPyExpr<'a>, Option>), [INFO] [stdout] | | -------------------------------------- the largest variant contains at least 336 bytes [INFO] [stdout] 242 | | } [INFO] [stdout] | |_^ the entire enum is at least 336 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 241 - Expr(SPyExpr<'a>, Option>), [INFO] [stdout] 241 + Expr(SPyExpr<'a>, Box>>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> koatl-core/src/py/ast.rs:307:1 [INFO] [stdout] | [INFO] [stdout] 307 | / pub enum PyPatternSequenceItem<'a> { [INFO] [stdout] 308 | | Item(SPyPattern<'a>), [INFO] [stdout] | | -------------------- the largest variant contains at least 256 bytes [INFO] [stdout] 309 | | Spread(Option>), [INFO] [stdout] | | --------------------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] 310 | | } [INFO] [stdout] | |_^ the entire enum is at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 308 - Item(SPyPattern<'a>), [INFO] [stdout] 308 + Item(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EmitCtx` [INFO] [stdout] --> koatl-core/src/py/emit.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | EmitCtx { [INFO] [stdout] 28 | | lineno: 1, [INFO] [stdout] 29 | | indentation: 0, [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 25 + impl Default for EmitCtx { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/py/emit.rs:35:52 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn record_source_map(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/py/emit.rs:74:45 [INFO] [stdout] | [INFO] [stdout] 74 | fn emit_to(&mut self, ctx: &mut EmitCtx) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:364:30 [INFO] [stdout] | [INFO] [stdout] 364 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:367:30 [INFO] [stdout] | [INFO] [stdout] 367 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:373:30 [INFO] [stdout] | [INFO] [stdout] 373 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:376:30 [INFO] [stdout] | [INFO] [stdout] 376 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:382:30 [INFO] [stdout] | [INFO] [stdout] 382 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:385:30 [INFO] [stdout] | [INFO] [stdout] 385 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:391:30 [INFO] [stdout] | [INFO] [stdout] 391 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:394:30 [INFO] [stdout] | [INFO] [stdout] 394 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:400:30 [INFO] [stdout] | [INFO] [stdout] 400 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:403:30 [INFO] [stdout] | [INFO] [stdout] 403 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:453:26 [INFO] [stdout] | [INFO] [stdout] 453 | ctx.emit(&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: called `unwrap` on `case.guard` after checking its variant with `is_some` [INFO] [stdout] --> koatl-core/src/py/emit.rs:945:25 [INFO] [stdout] | [INFO] [stdout] 943 | if case.guard.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &mut case.guard` [INFO] [stdout] 944 | ctx.emit(" if "); [INFO] [stdout] 945 | case.guard.as_mut().unwrap().emit_to(ctx, LOW_PREC)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:799:30 [INFO] [stdout] | [INFO] [stdout] 799 | ctx.emit(&module); [INFO] [stdout] | ^^^^^^^ help: change this to: `module` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:833:26 [INFO] [stdout] | [INFO] [stdout] 833 | ctx.emit(&name); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:855:26 [INFO] [stdout] | [INFO] [stdout] 855 | ctx.emit(&name); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:70:14 [INFO] [stdout] | [INFO] [stdout] 70 | fn top_scope<'src, 'state>( [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:71:18 [INFO] [stdout] | [INFO] [stdout] 71 | scope_stack: &'state Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 71 - scope_stack: &'state Vec, [INFO] [stdout] 71 + scope_stack: &'state [ScopeKey], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | fn top_scope_and_key<'src, 'state>( [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | scope_stack: &'state Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 78 - scope_stack: &'state Vec, [INFO] [stdout] 78 + scope_stack: &'state [ScopeKey], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | / return Err(simple_err( [INFO] [stdout] 193 | | "Undeclared identifier; either declare with 'let' or mark as 'global'.", [INFO] [stdout] 194 | | ident.span, [INFO] [stdout] 195 | | )); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 192 ~ Err(simple_err( [INFO] [stdout] 193 + "Undeclared identifier; either declare with 'let' or mark as 'global'.", [INFO] [stdout] 194 + ident.span, [INFO] [stdout] 195 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `util::TlErrs` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:144:28 [INFO] [stdout] | [INFO] [stdout] 144 | return Err(simple_err("Internal error: no function context", ident.span).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `simple_err("Internal error: no function context", ident.span)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `resolve_scopes::DeclarationKey` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:147:36 [INFO] [stdout] | [INFO] [stdout] 147 | fn_ctx.captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `found.decl.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:147:36 [INFO] [stdout] | [INFO] [stdout] 147 | fn_ctx.captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `found.decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `resolve_scopes::DeclarationKey` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:154:49 [INFO] [stdout] | [INFO] [stdout] 154 | fn_ctx.indirect_captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `found.decl.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:154:49 [INFO] [stdout] | [INFO] [stdout] 154 | fn_ctx.indirect_captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `found.decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | / if lhs { [INFO] [stdout] 163 | | if scope.is_class || scope.is_global { [INFO] [stdout] 164 | | let decl = self.declarations.insert_declaration( [INFO] [stdout] 165 | | &mut self.phantom_fn_stack, [INFO] [stdout] ... | [INFO] [stdout] 175 | | } [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] 162 ~ if lhs [INFO] [stdout] 163 ~ && (scope.is_class || scope.is_global) { [INFO] [stdout] 164 | let decl = self.declarations.insert_declaration( [INFO] [stdout] ... [INFO] [stdout] 173 | return Ok(decl); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:171:35 [INFO] [stdout] | [INFO] [stdout] 171 | scope.locals.push(decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:187:54 [INFO] [stdout] | [INFO] [stdout] 187 | self.scopes[self.root_scope].locals.push(decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:281:13 [INFO] [stdout] | [INFO] [stdout] 281 | return fn_node; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 281 - return fn_node; [INFO] [stdout] 281 + fn_node [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 301 - return result; [INFO] [stdout] 301 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:271:33 [INFO] [stdout] | [INFO] [stdout] 271 | decls: vec![placeholder_ctx.arg_decl.clone()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `placeholder_ctx.arg_decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | / if class || global { [INFO] [stdout] 335 | | if let Some(found) = self.scope_stack.find_decl(self, &name) { [INFO] [stdout] 336 | | if !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] 337 | | self.errors.extend( [INFO] [stdout] ... | [INFO] [stdout] 351 | | } [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] 334 ~ if (class || global) { [INFO] [stdout] 335 ~ && let Some(found) = self.scope_stack.find_decl(self, &name) { [INFO] [stdout] 336 | if !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] ... [INFO] [stdout] 349 | } [INFO] [stdout] 350 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:335:21 [INFO] [stdout] | [INFO] [stdout] 335 | / if let Some(found) = self.scope_stack.find_decl(self, &name) { [INFO] [stdout] 336 | | if !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] 337 | | self.errors.extend( [INFO] [stdout] 338 | | TlErrBuilder::new() [INFO] [stdout] ... | [INFO] [stdout] 350 | | } [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] 335 ~ if let Some(found) = self.scope_stack.find_decl(self, &name) [INFO] [stdout] 336 ~ && !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] 337 | self.errors.extend( [INFO] [stdout] ... [INFO] [stdout] 348 | ); [INFO] [stdout] 349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:365:48 [INFO] [stdout] | [INFO] [stdout] 365 | self.scopes[key].lifted_decls.push(decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:373:40 [INFO] [stdout] | [INFO] [stdout] 373 | fn set_async(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:384:37 [INFO] [stdout] | [INFO] [stdout] 384 | fn set_do(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:395:44 [INFO] [stdout] | [INFO] [stdout] 395 | fn set_generator(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:523:9 [INFO] [stdout] | [INFO] [stdout] 523 | / if let Some(fnctx) = fn_stack.last_mut() { [INFO] [stdout] 524 | | if matches!(modifier, DeclType::Let | DeclType::Const) { [INFO] [stdout] 525 | | fnctx.decls.push(key); [INFO] [stdout] 526 | | } [INFO] [stdout] 527 | | } [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] 523 ~ if let Some(fnctx) = fn_stack.last_mut() [INFO] [stdout] 524 ~ && matches!(modifier, DeclType::Let | DeclType::Const) { [INFO] [stdout] 525 | fnctx.decls.push(key); [INFO] [stdout] 526 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:677:43 [INFO] [stdout] | [INFO] [stdout] 677 | .insert(expr.as_ref().into(), placeholder_ctx.arg_decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `placeholder_ctx.arg_decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:713:17 [INFO] [stdout] | [INFO] [stdout] 713 | / if !allow_uppercase_capture { [INFO] [stdout] 714 | | if cap.as_ref().is_some_and(|x| { [INFO] [stdout] 715 | | char::is_uppercase(x.value.0.chars().nth(0).unwrap_or('_')) [INFO] [stdout] 716 | | }) { [INFO] [stdout] ... | [INFO] [stdout] 722 | | } [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] 713 ~ if !allow_uppercase_capture [INFO] [stdout] 714 ~ && cap.as_ref().is_some_and(|x| { [INFO] [stdout] 715 | char::is_uppercase(x.value.0.chars().nth(0).unwrap_or('_')) [INFO] [stdout] ... [INFO] [stdout] 720 | )); [INFO] [stdout] 721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1021:64 [INFO] [stdout] | [INFO] [stdout] 1021 | state.resolutions.insert(expr.as_ref().into(), decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1250:44 [INFO] [stdout] | [INFO] [stdout] 1250 | ... decls: arg_decls.iter().map(|x| x.clone()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `arg_decls.iter().copied()` [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: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1250:69 [INFO] [stdout] | [INFO] [stdout] 1250 | ... decls: arg_decls.iter().map(|x| x.clone()).collect(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1315:61 [INFO] [stdout] | [INFO] [stdout] 1315 | ... let kwarg_spread = kwarg_spread.map(|name| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1315 ~ let kwarg_spread = kwarg_spread.inspect(|name| { [INFO] [stdout] 1316 | let decl = state.declarations.insert_declaration( [INFO] [stdout] ... [INFO] [stdout] 1322 | state.declarations[decl].is_fn_arg = true; [INFO] [stdout] 1323 ~ decls.push(decl); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1338:21 [INFO] [stdout] | [INFO] [stdout] 1338 | / if state.declarations[*decl].name.0 != "_" { [INFO] [stdout] 1339 | | if let Some(found) = decls[..i].iter().find(|x| { [INFO] [stdout] 1340 | | state.declarations[**x].name == state.declarations[*decl].name [INFO] [stdout] 1341 | | }) { [INFO] [stdout] ... | [INFO] [stdout] 1350 | | } [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] 1338 ~ if state.declarations[*decl].name.0 != "_" [INFO] [stdout] 1339 ~ && let Some(found) = decls[..i].iter().find(|x| { [INFO] [stdout] 1340 | state.declarations[**x].name == state.declarations[*decl].name [INFO] [stdout] ... [INFO] [stdout] 1348 | ); [INFO] [stdout] 1349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1366:21 [INFO] [stdout] | [INFO] [stdout] 1366 | / fndef_scope [INFO] [stdout] 1367 | | .locals [INFO] [stdout] 1368 | | .extend(fndef_scope.lifted_decls.drain(..)); [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1366 ~ fndef_scope [INFO] [stdout] 1367 ~ .locals.append(&mut fndef_scope.lifted_decls); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1374:25 [INFO] [stdout] | [INFO] [stdout] 1374 | / classdef_scope [INFO] [stdout] 1375 | | .locals [INFO] [stdout] 1376 | | .extend(classdef_scope.lifted_decls.drain(..)); [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1374 ~ classdef_scope [INFO] [stdout] 1375 ~ .locals.append(&mut classdef_scope.lifted_decls); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1660:17 [INFO] [stdout] | [INFO] [stdout] 1660 | scope.locals.extend(scope.lifted_decls.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `scope.locals.append(&mut scope.lifted_decls)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1709:17 [INFO] [stdout] | [INFO] [stdout] 1709 | / if reexport { [INFO] [stdout] 1710 | | if !scope.is_global { [INFO] [stdout] 1711 | | state.errors.extend(simple_err( [INFO] [stdout] 1712 | | "Re-exporting imports is only allowed in the global scope", [INFO] [stdout] ... | [INFO] [stdout] 1716 | | } [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] 1709 ~ if reexport [INFO] [stdout] 1710 ~ && !scope.is_global { [INFO] [stdout] 1711 | state.errors.extend(simple_err( [INFO] [stdout] ... [INFO] [stdout] 1714 | )); [INFO] [stdout] 1715 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1744:37 [INFO] [stdout] | [INFO] [stdout] 1744 | ... &branch, [INFO] [stdout] | ^^^^^^^ help: change this to: `branch` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1770:68 [INFO] [stdout] | [INFO] [stdout] 1770 | ... .insert(tree.leaf.as_ref().into(), decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1801:68 [INFO] [stdout] | [INFO] [stdout] 1801 | ... .insert(tree.leaf.as_ref().into(), decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ScopeKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1843:17 [INFO] [stdout] | [INFO] [stdout] 1843 | .scoped(state.root_scope.clone(), |state| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state.root_scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:465:33 [INFO] [stdout] | [INFO] [stdout] 465 | ctx, lhs_ident, &bases, &body, decorators, span, [INFO] [stdout] | ^^^^^^ help: change this to: `bases` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:465:41 [INFO] [stdout] | [INFO] [stdout] 465 | ctx, lhs_ident, &bases, &body, decorators, span, [INFO] [stdout] | ^^^^^ help: change this to: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:597:56 [INFO] [stdout] | [INFO] [stdout] 597 | let pattern_node = pre.bind(pattern.transform(ctx, &meta)?); [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> koatl-core/src/transform.rs:853:24 [INFO] [stdout] | [INFO] [stdout] 853 | let decl = pattern_meta.decls.iter().next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling: `pattern_meta.decls.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:889:9 [INFO] [stdout] | [INFO] [stdout] 889 | cursor.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `cursor.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:951:22 [INFO] [stdout] | [INFO] [stdout] 951 | PyExpr::Name(ret_varname.clone().into(), PyAccessCtx::Load), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ret_varname.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:956:22 [INFO] [stdout] | [INFO] [stdout] 956 | PyExpr::Name(ret_varname.clone().into(), PyAccessCtx::Store), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ret_varname.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/transform.rs:976:9 [INFO] [stdout] | [INFO] [stdout] 976 | / if case.guard.is_none() { [INFO] [stdout] 977 | | if default { [INFO] [stdout] 978 | | has_default_case = true; [INFO] [stdout] 979 | | } [INFO] [stdout] 980 | | } [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] 976 ~ if case.guard.is_none() [INFO] [stdout] 977 ~ && default { [INFO] [stdout] 978 | has_default_case = true; [INFO] [stdout] 979 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:1212:83 [INFO] [stdout] | [INFO] [stdout] 1212 | let (matcher, cursor) = create_throwing_matcher(ctx, arg_pattern, &meta)?; [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> koatl-core/src/transform.rs:1280:21 [INFO] [stdout] | [INFO] [stdout] 1280 | / match item { [INFO] [stdout] 1281 | | DelegateArgItem { [INFO] [stdout] 1282 | | name, [INFO] [stdout] 1283 | | alias, [INFO] [stdout] ... | [INFO] [stdout] 1313 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 1280 ~ let DelegateArgItem { [INFO] [stdout] 1281 + name, [INFO] [stdout] 1282 + alias, [INFO] [stdout] 1283 + default: item_default, [INFO] [stdout] 1284 + } = item; [INFO] [stdout] 1285 + { [INFO] [stdout] 1286 + let local_name = alias.as_ref().unwrap_or(name); [INFO] [stdout] 1287 + let decl = info [INFO] [stdout] 1288 + .arg_names [INFO] [stdout] 1289 + .iter() [INFO] [stdout] 1290 + .find(|key| ctx.declarations[**key].name == local_name.value) [INFO] [stdout] 1291 + .ok_or_else(|| { [INFO] [stdout] 1292 + simple_err("Internal: missing arg name", local_name.span) [INFO] [stdout] 1293 + })?; [INFO] [stdout] 1294 + [INFO] [stdout] 1295 + let py_name = ctx.decl_py_ident(*decl)?; [INFO] [stdout] 1296 + kwonlyargs.push((py_name.clone(), None)); [INFO] [stdout] 1297 + delegate_arg_names.push(PyCallItem::Arg(a.str(py_name.clone()))); [INFO] [stdout] 1298 + [INFO] [stdout] 1299 + // If renamed, record the mapping [INFO] [stdout] 1300 + if alias.is_some() { [INFO] [stdout] 1301 + delegate_renames.push(PyCallItem::Kwarg( [INFO] [stdout] 1302 + py_name.clone(), [INFO] [stdout] 1303 + a.str(name.value.0.clone()), [INFO] [stdout] 1304 + )); [INFO] [stdout] 1305 + } [INFO] [stdout] 1306 + [INFO] [stdout] 1307 + // If default overridden, record it [INFO] [stdout] 1308 + if let Some(default_expr) = item_default { [INFO] [stdout] 1309 + let default_val = pre.bind(default_expr.transform(ctx)?); [INFO] [stdout] 1310 + delegate_defaults.push(PyCallItem::Kwarg(py_name, default_val)); [INFO] [stdout] 1311 + } [INFO] [stdout] 1312 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> koatl-core/src/transform.rs:1404:1 [INFO] [stdout] | [INFO] [stdout] 1404 | / enum FnDef<'src, 'ast> { [INFO] [stdout] 1405 | | /** [INFO] [stdout] 1406 | | * Args, body, is_do, is_async [INFO] [stdout] 1407 | | */ [INFO] [stdout] 1408 | | PyFnDef(PyArgList<'src>, SPyExprWithPre<'src>, bool, bool), [INFO] [stdout] | | ---------------------------------------------------------- the largest variant contains at least 314 bytes [INFO] [stdout] ... | [INFO] [stdout] 1411 | |/ TlFnDef( [INFO] [stdout] 1412 | || &'ast SExpr<'src>, [INFO] [stdout] 1413 | || &'ast [SArgDefItem<'src>], [INFO] [stdout] 1414 | || &'ast SExpr<'src>, [INFO] [stdout] 1415 | || ), [INFO] [stdout] | ||_____- the second-largest variant contains at least 32 bytes [INFO] [stdout] 1416 | | } [INFO] [stdout] | |__^ the entire enum is at least 320 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1408 - PyFnDef(PyArgList<'src>, SPyExprWithPre<'src>, bool, bool), [INFO] [stdout] 1408 + PyFnDef(PyArgList<'src>, Box>, bool, bool), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:1540:23 [INFO] [stdout] | [INFO] [stdout] 1540 | name: name.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `name.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:1552:30 [INFO] [stdout] | [INFO] [stdout] 1552 | value: (PyExpr::Name(name.into(), PyAccessCtx::Load), *span).into(), [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:1584:23 [INFO] [stdout] | [INFO] [stdout] 1584 | name: name.into(), [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] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> koatl-core/src/transform.rs:1667:22 [INFO] [stdout] | [INFO] [stdout] 1667 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:1729:66 [INFO] [stdout] | [INFO] [stdout] 1729 | let t = inner_pre.bind(transform_call_items(ctx, &list, &expr.span)?); [INFO] [stdout] | ^^^^^ help: change this to: `list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:1733:71 [INFO] [stdout] | [INFO] [stdout] 1733 | let t = inner_pre.bind(transform_subscript_items(ctx, &list, &expr.span)?); [INFO] [stdout] | ^^^^^ help: change this to: `list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1912:49 [INFO] [stdout] | [INFO] [stdout] 1912 | Literal::Int(num) => PyLiteral::Int(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] = note: `#[warn(clippy::suspicious_to_owned)]` on by default [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1912 | Literal::Int(num) => PyLiteral::Int(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1912 - Literal::Int(num) => PyLiteral::Int(num.to_owned()), [INFO] [stdout] 1912 + Literal::Int(num) => PyLiteral::Int(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1913:55 [INFO] [stdout] | [INFO] [stdout] 1913 | Literal::IntBin(num) => PyLiteral::IntBin(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1913 | Literal::IntBin(num) => PyLiteral::IntBin(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1913 - Literal::IntBin(num) => PyLiteral::IntBin(num.to_owned()), [INFO] [stdout] 1913 + Literal::IntBin(num) => PyLiteral::IntBin(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1914:55 [INFO] [stdout] | [INFO] [stdout] 1914 | Literal::IntOct(num) => PyLiteral::IntOct(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1914 | Literal::IntOct(num) => PyLiteral::IntOct(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1914 - Literal::IntOct(num) => PyLiteral::IntOct(num.to_owned()), [INFO] [stdout] 1914 + Literal::IntOct(num) => PyLiteral::IntOct(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1915:55 [INFO] [stdout] | [INFO] [stdout] 1915 | Literal::IntHex(num) => PyLiteral::IntHex(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1915 | Literal::IntHex(num) => PyLiteral::IntHex(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1915 - Literal::IntHex(num) => PyLiteral::IntHex(num.to_owned()), [INFO] [stdout] 1915 + Literal::IntHex(num) => PyLiteral::IntHex(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1916:53 [INFO] [stdout] | [INFO] [stdout] 1916 | Literal::Float(num) => PyLiteral::Float(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1916 | Literal::Float(num) => PyLiteral::Float(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1916 - Literal::Float(num) => PyLiteral::Float(num.to_owned()), [INFO] [stdout] 1916 + Literal::Float(num) => PyLiteral::Float(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1917:47 [INFO] [stdout] | [INFO] [stdout] 1917 | Literal::Str(s) => PyLiteral::Str(s.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1917 | Literal::Str(s) => PyLiteral::Str(s.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1917 - Literal::Str(s) => PyLiteral::Str(s.to_owned()), [INFO] [stdout] 1917 + Literal::Str(s) => PyLiteral::Str(s.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:2078:68 [INFO] [stdout] | [INFO] [stdout] 2078 | let pattern_node = pre.bind(pattern.transform(ctx, &meta)?); [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> koatl-core/src/transform.rs:2128:32 [INFO] [stdout] | [INFO] [stdout] 2128 | ... if trunk_accum.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `trunk_accum.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: length comparison to zero [INFO] [stdout] --> koatl-core/src/transform.rs:2165:32 [INFO] [stdout] | [INFO] [stdout] 2165 | ... if trunk_accum.len() == 0 && level == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `trunk_accum.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/transform.rs:2193:17 [INFO] [stdout] | [INFO] [stdout] 2193 | / if tree.level == 0 { [INFO] [stdout] 2194 | | if let Some(tl) = tree.trunk.first() { [INFO] [stdout] 2195 | | pre.push(a.import(vec![a.import_alias(tl.value.escape(), None)])); [INFO] [stdout] 2196 | | } [INFO] [stdout] 2197 | | } [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] 2193 ~ if tree.level == 0 [INFO] [stdout] 2194 ~ && let Some(tl) = tree.trunk.first() { [INFO] [stdout] 2195 | pre.push(a.import(vec![a.import_alias(tl.value.escape(), None)])); [INFO] [stdout] 2196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> koatl-core/src/transform.rs:2105:21 [INFO] [stdout] | [INFO] [stdout] 2105 | reexport: bool, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reexport` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> koatl-core/src/transform.rs:2184:37 [INFO] [stdout] | [INFO] [stdout] 2184 | ... reexport, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:2325:36 [INFO] [stdout] | [INFO] [stdout] 2325 | let name: Cow<_> = ctx.create_aux_var("clsexp", span.start).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ctx.create_aux_var("clsexp", span.start)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:2371:79 [INFO] [stdout] | [INFO] [stdout] 2371 | let (matcher, cursor) = create_throwing_matcher(ctx, pattern, &info)?; [INFO] [stdout] | ^^^^^ help: change this to: `info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:2404:21 [INFO] [stdout] | [INFO] [stdout] 2404 | var_name.into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `var_name` [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] [stderr] Compiling pyo3-macros v0.25.1 [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:2458:21 [INFO] [stdout] | [INFO] [stdout] 2458 | &meta, [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-core/src/transform.rs:2833:9 [INFO] [stdout] | [INFO] [stdout] 2833 | / loop { [INFO] [stdout] 2834 | | let Some(parent) = scope.parent else { [INFO] [stdout] 2835 | | break; [INFO] [stdout] 2836 | | }; [INFO] [stdout] ... | [INFO] [stdout] 2842 | | scope = &ctx.scopes[parent]; [INFO] [stdout] 2843 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(parent) = scope.parent { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> koatl-core/src/transform.rs:2853:33 [INFO] [stdout] | [INFO] [stdout] 2853 | py_body.push(a.nonlocal(nonlocals.iter().map(|x| x.clone()).collect())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `nonlocals.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: you are using an explicit closure for cloning elements [INFO] [stdout] --> koatl-core/src/transform.rs:2856:31 [INFO] [stdout] | [INFO] [stdout] 2856 | py_body.push(a.global(globals.iter().map(|x| x.clone()).collect())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `globals.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: you should consider adding a `Default` implementation for `TlErrs` [INFO] [stdout] --> koatl-core/src/util.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / pub fn new() -> Self { [INFO] [stdout] 73 | | TlErrs(vec![]) [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 71 + impl Default for TlErrs { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TlErrBuilder` [INFO] [stdout] --> koatl-core/src/util.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | / pub fn new() -> Self { [INFO] [stdout] 102 | | TlErrBuilder { [INFO] [stdout] 103 | | message: String::new(), [INFO] [stdout] 104 | | span: None, [INFO] [stdout] ... | [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 100 + impl Default for TlErrBuilder { [INFO] [stdout] 101 + fn default() -> Self { [INFO] [stdout] 102 + Self::new() [INFO] [stdout] 103 + } [INFO] [stdout] 104 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:83:44 [INFO] [stdout] | [INFO] [stdout] 83 | let inference = match inference::infer(&src, &tl_ast, &resolve_state) { [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | &src, [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | &filename, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `filename` [INFO] [stdout] | [INFO] [stdout] = 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] --> koatl-core/src/lib.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | if errs.0.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errs.0.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:250:41 [INFO] [stdout] | [INFO] [stdout] 250 | let (tokens, token_errs) = tokenize(&src, true); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:269:46 [INFO] [stdout] | [INFO] [stdout] 269 | let (tl_cst, parser_errs) = parse_tokens(&src, &tokens); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/inference.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | return typ; [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] 295 - return typ; [INFO] [stdout] 295 + typ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> koatl-core/src/inference.rs:273:29 [INFO] [stdout] | [INFO] [stdout] 273 | / ... if let Some(default) = default { [INFO] [stdout] 274 | | ... default.traverse(ctx); [INFO] [stdout] 275 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> koatl-core/src/inference.rs:272:48 [INFO] [stdout] | [INFO] [stdout] 272 | ArgDefItem::Arg(_expr, default) => { [INFO] [stdout] | ^^^^^^^ replace this binding [INFO] [stdout] 273 | if let Some(default) = default { [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> koatl-core/src/inference.rs:271:21 [INFO] [stdout] | [INFO] [stdout] 271 | / match arg { [INFO] [stdout] 272 | | ArgDefItem::Arg(_expr, default) => { [INFO] [stdout] 273 | | if let Some(default) = default { [INFO] [stdout] 274 | | default.traverse(ctx); [INFO] [stdout] ... | [INFO] [stdout] 277 | | _ => {} [INFO] [stdout] 278 | | }; [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] 271 ~ if let ArgDefItem::Arg(_expr, default) = arg { [INFO] [stdout] 272 + if let Some(default) = default { [INFO] [stdout] 273 + default.traverse(ctx); [INFO] [stdout] 274 + } [INFO] [stdout] 275 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lift_cst.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | lift_fstr(&fmt.head, &fmt.parts) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `fmt.head` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> koatl-core/src/lift_cst.rs:92:35 [INFO] [stdout] | [INFO] [stdout] 92 | Token::Kw(k) => match k.as_ref() { [INFO] [stdout] | ^^^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/lift_cst.rs:498:59 [INFO] [stdout] | [INFO] [stdout] 498 | ast::Stmt::Assign(lhs.lift(), rhs.lift(), op.clone()) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*op` [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: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> koatl-core/src/lift_cst.rs:556:25 [INFO] [stdout] | [INFO] [stdout] 556 | .map(|stmt: &Box| -> Indirect { (*stmt).lift() }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&cst::SStmt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PyDecorators<'a>` [INFO] [stdout] --> koatl-core/src/py/ast.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn new() -> Self { [INFO] [stdout] 39 | | PyDecorators(Vec::new()) [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 37 + impl<'a> Default for PyDecorators<'a> { [INFO] [stdout] 38 + fn default() -> Self { [INFO] [stdout] 39 + Self::new() [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PyBlock<'a>` [INFO] [stdout] --> koatl-core/src/py/ast.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / pub fn new() -> Self { [INFO] [stdout] 96 | | PyBlock(Vec::new()) [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_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 94 + impl<'a> Default for PyBlock<'a> { [INFO] [stdout] 95 + fn default() -> Self { [INFO] [stdout] 96 + Self::new() [INFO] [stdout] 97 + } [INFO] [stdout] 98 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> koatl-core/src/py/ast.rs:239:1 [INFO] [stdout] | [INFO] [stdout] 239 | / pub enum PyFstrPart<'a> { [INFO] [stdout] 240 | | Str(PyToken<'a>), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] 241 | | Expr(SPyExpr<'a>, Option>), [INFO] [stdout] | | -------------------------------------- the largest variant contains at least 336 bytes [INFO] [stdout] 242 | | } [INFO] [stdout] | |_^ the entire enum is at least 336 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 241 - Expr(SPyExpr<'a>, Option>), [INFO] [stdout] 241 + Expr(SPyExpr<'a>, Box>>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> koatl-core/src/py/ast.rs:307:1 [INFO] [stdout] | [INFO] [stdout] 307 | / pub enum PyPatternSequenceItem<'a> { [INFO] [stdout] 308 | | Item(SPyPattern<'a>), [INFO] [stdout] | | -------------------- the largest variant contains at least 256 bytes [INFO] [stdout] 309 | | Spread(Option>), [INFO] [stdout] | | --------------------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] 310 | | } [INFO] [stdout] | |_^ the entire enum is at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 308 - Item(SPyPattern<'a>), [INFO] [stdout] 308 + Item(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EmitCtx` [INFO] [stdout] --> koatl-core/src/py/emit.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | EmitCtx { [INFO] [stdout] 28 | | lineno: 1, [INFO] [stdout] 29 | | indentation: 0, [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 25 + impl Default for EmitCtx { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/py/emit.rs:35:52 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn record_source_map(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/py/emit.rs:74:45 [INFO] [stdout] | [INFO] [stdout] 74 | fn emit_to(&mut self, ctx: &mut EmitCtx) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:364:30 [INFO] [stdout] | [INFO] [stdout] 364 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:367:30 [INFO] [stdout] | [INFO] [stdout] 367 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:373:30 [INFO] [stdout] | [INFO] [stdout] 373 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:376:30 [INFO] [stdout] | [INFO] [stdout] 376 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:382:30 [INFO] [stdout] | [INFO] [stdout] 382 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:385:30 [INFO] [stdout] | [INFO] [stdout] 385 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:391:30 [INFO] [stdout] | [INFO] [stdout] 391 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:394:30 [INFO] [stdout] | [INFO] [stdout] 394 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:400:30 [INFO] [stdout] | [INFO] [stdout] 400 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> koatl-core/src/py/emit.rs:403:30 [INFO] [stdout] | [INFO] [stdout] 403 | ctx.emit(&num.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `num.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:453:26 [INFO] [stdout] | [INFO] [stdout] 453 | ctx.emit(&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: called `unwrap` on `case.guard` after checking its variant with `is_some` [INFO] [stdout] --> koatl-core/src/py/emit.rs:945:25 [INFO] [stdout] | [INFO] [stdout] 943 | if case.guard.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &mut case.guard` [INFO] [stdout] 944 | ctx.emit(" if "); [INFO] [stdout] 945 | case.guard.as_mut().unwrap().emit_to(ctx, LOW_PREC)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:799:30 [INFO] [stdout] | [INFO] [stdout] 799 | ctx.emit(&module); [INFO] [stdout] | ^^^^^^^ help: change this to: `module` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:833:26 [INFO] [stdout] | [INFO] [stdout] 833 | ctx.emit(&name); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/py/emit.rs:855:26 [INFO] [stdout] | [INFO] [stdout] 855 | ctx.emit(&name); [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:70:14 [INFO] [stdout] | [INFO] [stdout] 70 | fn top_scope<'src, 'state>( [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:71:18 [INFO] [stdout] | [INFO] [stdout] 71 | scope_stack: &'state Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 71 - scope_stack: &'state Vec, [INFO] [stdout] 71 + scope_stack: &'state [ScopeKey], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | fn top_scope_and_key<'src, 'state>( [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | scope_stack: &'state Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 78 - scope_stack: &'state Vec, [INFO] [stdout] 78 + scope_stack: &'state [ScopeKey], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | / return Err(simple_err( [INFO] [stdout] 193 | | "Undeclared identifier; either declare with 'let' or mark as 'global'.", [INFO] [stdout] 194 | | ident.span, [INFO] [stdout] 195 | | )); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 192 ~ Err(simple_err( [INFO] [stdout] 193 + "Undeclared identifier; either declare with 'let' or mark as 'global'.", [INFO] [stdout] 194 + ident.span, [INFO] [stdout] 195 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `util::TlErrs` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:144:28 [INFO] [stdout] | [INFO] [stdout] 144 | return Err(simple_err("Internal error: no function context", ident.span).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `simple_err("Internal error: no function context", ident.span)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `resolve_scopes::DeclarationKey` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:147:36 [INFO] [stdout] | [INFO] [stdout] 147 | fn_ctx.captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `found.decl.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:147:36 [INFO] [stdout] | [INFO] [stdout] 147 | fn_ctx.captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `found.decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `resolve_scopes::DeclarationKey` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:154:49 [INFO] [stdout] | [INFO] [stdout] 154 | fn_ctx.indirect_captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `found.decl.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:154:49 [INFO] [stdout] | [INFO] [stdout] 154 | fn_ctx.indirect_captures.insert(found.decl.clone().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `found.decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | / if lhs { [INFO] [stdout] 163 | | if scope.is_class || scope.is_global { [INFO] [stdout] 164 | | let decl = self.declarations.insert_declaration( [INFO] [stdout] 165 | | &mut self.phantom_fn_stack, [INFO] [stdout] ... | [INFO] [stdout] 175 | | } [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] 162 ~ if lhs [INFO] [stdout] 163 ~ && (scope.is_class || scope.is_global) { [INFO] [stdout] 164 | let decl = self.declarations.insert_declaration( [INFO] [stdout] ... [INFO] [stdout] 173 | return Ok(decl); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:171:35 [INFO] [stdout] | [INFO] [stdout] 171 | scope.locals.push(decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:187:54 [INFO] [stdout] | [INFO] [stdout] 187 | self.scopes[self.root_scope].locals.push(decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:281:13 [INFO] [stdout] | [INFO] [stdout] 281 | return fn_node; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 281 - return fn_node; [INFO] [stdout] 281 + fn_node [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 301 - return result; [INFO] [stdout] 301 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:271:33 [INFO] [stdout] | [INFO] [stdout] 271 | decls: vec![placeholder_ctx.arg_decl.clone()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `placeholder_ctx.arg_decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | / if class || global { [INFO] [stdout] 335 | | if let Some(found) = self.scope_stack.find_decl(self, &name) { [INFO] [stdout] 336 | | if !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] 337 | | self.errors.extend( [INFO] [stdout] ... | [INFO] [stdout] 351 | | } [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] 334 ~ if (class || global) { [INFO] [stdout] 335 ~ && let Some(found) = self.scope_stack.find_decl(self, &name) { [INFO] [stdout] 336 | if !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] ... [INFO] [stdout] 349 | } [INFO] [stdout] 350 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:335:21 [INFO] [stdout] | [INFO] [stdout] 335 | / if let Some(found) = self.scope_stack.find_decl(self, &name) { [INFO] [stdout] 336 | | if !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] 337 | | self.errors.extend( [INFO] [stdout] 338 | | TlErrBuilder::new() [INFO] [stdout] ... | [INFO] [stdout] 350 | | } [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] 335 ~ if let Some(found) = self.scope_stack.find_decl(self, &name) [INFO] [stdout] 336 ~ && !self.declarations[found.decl].is_implicit_global { [INFO] [stdout] 337 | self.errors.extend( [INFO] [stdout] ... [INFO] [stdout] 348 | ); [INFO] [stdout] 349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:365:48 [INFO] [stdout] | [INFO] [stdout] 365 | self.scopes[key].lifted_decls.push(decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:373:40 [INFO] [stdout] | [INFO] [stdout] 373 | fn set_async(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:384:37 [INFO] [stdout] | [INFO] [stdout] 384 | fn set_do(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:395:44 [INFO] [stdout] | [INFO] [stdout] 395 | fn set_generator(&mut self, span: Span) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:523:9 [INFO] [stdout] | [INFO] [stdout] 523 | / if let Some(fnctx) = fn_stack.last_mut() { [INFO] [stdout] 524 | | if matches!(modifier, DeclType::Let | DeclType::Const) { [INFO] [stdout] 525 | | fnctx.decls.push(key); [INFO] [stdout] 526 | | } [INFO] [stdout] 527 | | } [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] 523 ~ if let Some(fnctx) = fn_stack.last_mut() [INFO] [stdout] 524 ~ && matches!(modifier, DeclType::Let | DeclType::Const) { [INFO] [stdout] 525 | fnctx.decls.push(key); [INFO] [stdout] 526 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:677:43 [INFO] [stdout] | [INFO] [stdout] 677 | .insert(expr.as_ref().into(), placeholder_ctx.arg_decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `placeholder_ctx.arg_decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:713:17 [INFO] [stdout] | [INFO] [stdout] 713 | / if !allow_uppercase_capture { [INFO] [stdout] 714 | | if cap.as_ref().is_some_and(|x| { [INFO] [stdout] 715 | | char::is_uppercase(x.value.0.chars().nth(0).unwrap_or('_')) [INFO] [stdout] 716 | | }) { [INFO] [stdout] ... | [INFO] [stdout] 722 | | } [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] 713 ~ if !allow_uppercase_capture [INFO] [stdout] 714 ~ && cap.as_ref().is_some_and(|x| { [INFO] [stdout] 715 | char::is_uppercase(x.value.0.chars().nth(0).unwrap_or('_')) [INFO] [stdout] ... [INFO] [stdout] 720 | )); [INFO] [stdout] 721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1021:64 [INFO] [stdout] | [INFO] [stdout] 1021 | state.resolutions.insert(expr.as_ref().into(), decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1250:44 [INFO] [stdout] | [INFO] [stdout] 1250 | ... decls: arg_decls.iter().map(|x| x.clone()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `arg_decls.iter().copied()` [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: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1250:69 [INFO] [stdout] | [INFO] [stdout] 1250 | ... decls: arg_decls.iter().map(|x| x.clone()).collect(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1315:61 [INFO] [stdout] | [INFO] [stdout] 1315 | ... let kwarg_spread = kwarg_spread.map(|name| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1315 ~ let kwarg_spread = kwarg_spread.inspect(|name| { [INFO] [stdout] 1316 | let decl = state.declarations.insert_declaration( [INFO] [stdout] ... [INFO] [stdout] 1322 | state.declarations[decl].is_fn_arg = true; [INFO] [stdout] 1323 ~ decls.push(decl); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1338:21 [INFO] [stdout] | [INFO] [stdout] 1338 | / if state.declarations[*decl].name.0 != "_" { [INFO] [stdout] 1339 | | if let Some(found) = decls[..i].iter().find(|x| { [INFO] [stdout] 1340 | | state.declarations[**x].name == state.declarations[*decl].name [INFO] [stdout] 1341 | | }) { [INFO] [stdout] ... | [INFO] [stdout] 1350 | | } [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] 1338 ~ if state.declarations[*decl].name.0 != "_" [INFO] [stdout] 1339 ~ && let Some(found) = decls[..i].iter().find(|x| { [INFO] [stdout] 1340 | state.declarations[**x].name == state.declarations[*decl].name [INFO] [stdout] ... [INFO] [stdout] 1348 | ); [INFO] [stdout] 1349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1366:21 [INFO] [stdout] | [INFO] [stdout] 1366 | / fndef_scope [INFO] [stdout] 1367 | | .locals [INFO] [stdout] 1368 | | .extend(fndef_scope.lifted_decls.drain(..)); [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1366 ~ fndef_scope [INFO] [stdout] 1367 ~ .locals.append(&mut fndef_scope.lifted_decls); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1374:25 [INFO] [stdout] | [INFO] [stdout] 1374 | / classdef_scope [INFO] [stdout] 1375 | | .locals [INFO] [stdout] 1376 | | .extend(classdef_scope.lifted_decls.drain(..)); [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1374 ~ classdef_scope [INFO] [stdout] 1375 ~ .locals.append(&mut classdef_scope.lifted_decls); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1660:17 [INFO] [stdout] | [INFO] [stdout] 1660 | scope.locals.extend(scope.lifted_decls.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `scope.locals.append(&mut scope.lifted_decls)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1709:17 [INFO] [stdout] | [INFO] [stdout] 1709 | / if reexport { [INFO] [stdout] 1710 | | if !scope.is_global { [INFO] [stdout] 1711 | | state.errors.extend(simple_err( [INFO] [stdout] 1712 | | "Re-exporting imports is only allowed in the global scope", [INFO] [stdout] ... | [INFO] [stdout] 1716 | | } [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] 1709 ~ if reexport [INFO] [stdout] 1710 ~ && !scope.is_global { [INFO] [stdout] 1711 | state.errors.extend(simple_err( [INFO] [stdout] ... [INFO] [stdout] 1714 | )); [INFO] [stdout] 1715 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1744:37 [INFO] [stdout] | [INFO] [stdout] 1744 | ... &branch, [INFO] [stdout] | ^^^^^^^ help: change this to: `branch` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1770:68 [INFO] [stdout] | [INFO] [stdout] 1770 | ... .insert(tree.leaf.as_ref().into(), decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DeclarationKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1801:68 [INFO] [stdout] | [INFO] [stdout] 1801 | ... .insert(tree.leaf.as_ref().into(), decl.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `decl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ScopeKey` which implements the `Copy` trait [INFO] [stdout] --> koatl-core/src/resolve_scopes.rs:1843:17 [INFO] [stdout] | [INFO] [stdout] 1843 | .scoped(state.root_scope.clone(), |state| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state.root_scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:465:33 [INFO] [stdout] | [INFO] [stdout] 465 | ctx, lhs_ident, &bases, &body, decorators, span, [INFO] [stdout] | ^^^^^^ help: change this to: `bases` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:465:41 [INFO] [stdout] | [INFO] [stdout] 465 | ctx, lhs_ident, &bases, &body, decorators, span, [INFO] [stdout] | ^^^^^ help: change this to: `body` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:597:56 [INFO] [stdout] | [INFO] [stdout] 597 | let pattern_node = pre.bind(pattern.transform(ctx, &meta)?); [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> koatl-core/src/transform.rs:853:24 [INFO] [stdout] | [INFO] [stdout] 853 | let decl = pattern_meta.decls.iter().next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling: `pattern_meta.decls.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:889:9 [INFO] [stdout] | [INFO] [stdout] 889 | cursor.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `cursor.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:951:22 [INFO] [stdout] | [INFO] [stdout] 951 | PyExpr::Name(ret_varname.clone().into(), PyAccessCtx::Load), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ret_varname.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:956:22 [INFO] [stdout] | [INFO] [stdout] 956 | PyExpr::Name(ret_varname.clone().into(), PyAccessCtx::Store), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ret_varname.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/transform.rs:976:9 [INFO] [stdout] | [INFO] [stdout] 976 | / if case.guard.is_none() { [INFO] [stdout] 977 | | if default { [INFO] [stdout] 978 | | has_default_case = true; [INFO] [stdout] 979 | | } [INFO] [stdout] 980 | | } [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] 976 ~ if case.guard.is_none() [INFO] [stdout] 977 ~ && default { [INFO] [stdout] 978 | has_default_case = true; [INFO] [stdout] 979 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:1212:83 [INFO] [stdout] | [INFO] [stdout] 1212 | let (matcher, cursor) = create_throwing_matcher(ctx, arg_pattern, &meta)?; [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> koatl-core/src/transform.rs:1280:21 [INFO] [stdout] | [INFO] [stdout] 1280 | / match item { [INFO] [stdout] 1281 | | DelegateArgItem { [INFO] [stdout] 1282 | | name, [INFO] [stdout] 1283 | | alias, [INFO] [stdout] ... | [INFO] [stdout] 1313 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 1280 ~ let DelegateArgItem { [INFO] [stdout] 1281 + name, [INFO] [stdout] 1282 + alias, [INFO] [stdout] 1283 + default: item_default, [INFO] [stdout] 1284 + } = item; [INFO] [stdout] 1285 + { [INFO] [stdout] 1286 + let local_name = alias.as_ref().unwrap_or(name); [INFO] [stdout] 1287 + let decl = info [INFO] [stdout] 1288 + .arg_names [INFO] [stdout] 1289 + .iter() [INFO] [stdout] 1290 + .find(|key| ctx.declarations[**key].name == local_name.value) [INFO] [stdout] 1291 + .ok_or_else(|| { [INFO] [stdout] 1292 + simple_err("Internal: missing arg name", local_name.span) [INFO] [stdout] 1293 + })?; [INFO] [stdout] 1294 + [INFO] [stdout] 1295 + let py_name = ctx.decl_py_ident(*decl)?; [INFO] [stdout] 1296 + kwonlyargs.push((py_name.clone(), None)); [INFO] [stdout] 1297 + delegate_arg_names.push(PyCallItem::Arg(a.str(py_name.clone()))); [INFO] [stdout] 1298 + [INFO] [stdout] 1299 + // If renamed, record the mapping [INFO] [stdout] 1300 + if alias.is_some() { [INFO] [stdout] 1301 + delegate_renames.push(PyCallItem::Kwarg( [INFO] [stdout] 1302 + py_name.clone(), [INFO] [stdout] 1303 + a.str(name.value.0.clone()), [INFO] [stdout] 1304 + )); [INFO] [stdout] 1305 + } [INFO] [stdout] 1306 + [INFO] [stdout] 1307 + // If default overridden, record it [INFO] [stdout] 1308 + if let Some(default_expr) = item_default { [INFO] [stdout] 1309 + let default_val = pre.bind(default_expr.transform(ctx)?); [INFO] [stdout] 1310 + delegate_defaults.push(PyCallItem::Kwarg(py_name, default_val)); [INFO] [stdout] 1311 + } [INFO] [stdout] 1312 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> koatl-core/src/transform.rs:1404:1 [INFO] [stdout] | [INFO] [stdout] 1404 | / enum FnDef<'src, 'ast> { [INFO] [stdout] 1405 | | /** [INFO] [stdout] 1406 | | * Args, body, is_do, is_async [INFO] [stdout] 1407 | | */ [INFO] [stdout] 1408 | | PyFnDef(PyArgList<'src>, SPyExprWithPre<'src>, bool, bool), [INFO] [stdout] | | ---------------------------------------------------------- the largest variant contains at least 314 bytes [INFO] [stdout] ... | [INFO] [stdout] 1411 | |/ TlFnDef( [INFO] [stdout] 1412 | || &'ast SExpr<'src>, [INFO] [stdout] 1413 | || &'ast [SArgDefItem<'src>], [INFO] [stdout] 1414 | || &'ast SExpr<'src>, [INFO] [stdout] 1415 | || ), [INFO] [stdout] | ||_____- the second-largest variant contains at least 32 bytes [INFO] [stdout] 1416 | | } [INFO] [stdout] | |__^ the entire enum is at least 320 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1408 - PyFnDef(PyArgList<'src>, SPyExprWithPre<'src>, bool, bool), [INFO] [stdout] 1408 + PyFnDef(PyArgList<'src>, Box>, bool, bool), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:1540:23 [INFO] [stdout] | [INFO] [stdout] 1540 | name: name.clone().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `name.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:1552:30 [INFO] [stdout] | [INFO] [stdout] 1552 | value: (PyExpr::Name(name.into(), PyAccessCtx::Load), *span).into(), [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:1584:23 [INFO] [stdout] | [INFO] [stdout] 1584 | name: name.into(), [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] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> koatl-core/src/transform.rs:1667:22 [INFO] [stdout] | [INFO] [stdout] 1667 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:1729:66 [INFO] [stdout] | [INFO] [stdout] 1729 | let t = inner_pre.bind(transform_call_items(ctx, &list, &expr.span)?); [INFO] [stdout] | ^^^^^ help: change this to: `list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:1733:71 [INFO] [stdout] | [INFO] [stdout] 1733 | let t = inner_pre.bind(transform_subscript_items(ctx, &list, &expr.span)?); [INFO] [stdout] | ^^^^^ help: change this to: `list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1912:49 [INFO] [stdout] | [INFO] [stdout] 1912 | Literal::Int(num) => PyLiteral::Int(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] = note: `#[warn(clippy::suspicious_to_owned)]` on by default [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1912 | Literal::Int(num) => PyLiteral::Int(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1912 - Literal::Int(num) => PyLiteral::Int(num.to_owned()), [INFO] [stdout] 1912 + Literal::Int(num) => PyLiteral::Int(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1913:55 [INFO] [stdout] | [INFO] [stdout] 1913 | Literal::IntBin(num) => PyLiteral::IntBin(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1913 | Literal::IntBin(num) => PyLiteral::IntBin(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1913 - Literal::IntBin(num) => PyLiteral::IntBin(num.to_owned()), [INFO] [stdout] 1913 + Literal::IntBin(num) => PyLiteral::IntBin(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1914:55 [INFO] [stdout] | [INFO] [stdout] 1914 | Literal::IntOct(num) => PyLiteral::IntOct(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1914 | Literal::IntOct(num) => PyLiteral::IntOct(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1914 - Literal::IntOct(num) => PyLiteral::IntOct(num.to_owned()), [INFO] [stdout] 1914 + Literal::IntOct(num) => PyLiteral::IntOct(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1915:55 [INFO] [stdout] | [INFO] [stdout] 1915 | Literal::IntHex(num) => PyLiteral::IntHex(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1915 | Literal::IntHex(num) => PyLiteral::IntHex(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1915 - Literal::IntHex(num) => PyLiteral::IntHex(num.to_owned()), [INFO] [stdout] 1915 + Literal::IntHex(num) => PyLiteral::IntHex(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1916:53 [INFO] [stdout] | [INFO] [stdout] 1916 | Literal::Float(num) => PyLiteral::Float(num.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1916 | Literal::Float(num) => PyLiteral::Float(num.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1916 - Literal::Float(num) => PyLiteral::Float(num.to_owned()), [INFO] [stdout] 1916 + Literal::Float(num) => PyLiteral::Float(num.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, str>` itself and does not cause its contents to become owned [INFO] [stdout] --> koatl-core/src/transform.rs:1917:47 [INFO] [stdout] | [INFO] [stdout] 1917 | Literal::Str(s) => PyLiteral::Str(s.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 1917 | Literal::Str(s) => PyLiteral::Str(s.into_owned()), [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 1917 - Literal::Str(s) => PyLiteral::Str(s.to_owned()), [INFO] [stdout] 1917 + Literal::Str(s) => PyLiteral::Str(s.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:2078:68 [INFO] [stdout] | [INFO] [stdout] 2078 | let pattern_node = pre.bind(pattern.transform(ctx, &meta)?); [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> koatl-core/src/transform.rs:2128:32 [INFO] [stdout] | [INFO] [stdout] 2128 | ... if trunk_accum.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `trunk_accum.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: length comparison to zero [INFO] [stdout] --> koatl-core/src/transform.rs:2165:32 [INFO] [stdout] | [INFO] [stdout] 2165 | ... if trunk_accum.len() == 0 && level == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `trunk_accum.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> koatl-core/src/transform.rs:2193:17 [INFO] [stdout] | [INFO] [stdout] 2193 | / if tree.level == 0 { [INFO] [stdout] 2194 | | if let Some(tl) = tree.trunk.first() { [INFO] [stdout] 2195 | | pre.push(a.import(vec![a.import_alias(tl.value.escape(), None)])); [INFO] [stdout] 2196 | | } [INFO] [stdout] 2197 | | } [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] 2193 ~ if tree.level == 0 [INFO] [stdout] 2194 ~ && let Some(tl) = tree.trunk.first() { [INFO] [stdout] 2195 | pre.push(a.import(vec![a.import_alias(tl.value.escape(), None)])); [INFO] [stdout] 2196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> koatl-core/src/transform.rs:2105:21 [INFO] [stdout] | [INFO] [stdout] 2105 | reexport: bool, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reexport` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> koatl-core/src/transform.rs:2184:37 [INFO] [stdout] | [INFO] [stdout] 2184 | ... reexport, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:2325:36 [INFO] [stdout] | [INFO] [stdout] 2325 | let name: Cow<_> = ctx.create_aux_var("clsexp", span.start).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ctx.create_aux_var("clsexp", span.start)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:2371:79 [INFO] [stdout] | [INFO] [stdout] 2371 | let (matcher, cursor) = create_throwing_matcher(ctx, pattern, &info)?; [INFO] [stdout] | ^^^^^ help: change this to: `info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` [INFO] [stdout] --> koatl-core/src/transform.rs:2404:21 [INFO] [stdout] | [INFO] [stdout] 2404 | var_name.into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `var_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/transform.rs:2458:21 [INFO] [stdout] | [INFO] [stdout] 2458 | &meta, [INFO] [stdout] | ^^^^^ help: change this to: `meta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> koatl-core/src/transform.rs:2833:9 [INFO] [stdout] | [INFO] [stdout] 2833 | / loop { [INFO] [stdout] 2834 | | let Some(parent) = scope.parent else { [INFO] [stdout] 2835 | | break; [INFO] [stdout] 2836 | | }; [INFO] [stdout] ... | [INFO] [stdout] 2842 | | scope = &ctx.scopes[parent]; [INFO] [stdout] 2843 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(parent) = scope.parent { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> koatl-core/src/transform.rs:2853:33 [INFO] [stdout] | [INFO] [stdout] 2853 | py_body.push(a.nonlocal(nonlocals.iter().map(|x| x.clone()).collect())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `nonlocals.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: you are using an explicit closure for cloning elements [INFO] [stdout] --> koatl-core/src/transform.rs:2856:31 [INFO] [stdout] | [INFO] [stdout] 2856 | py_body.push(a.global(globals.iter().map(|x| x.clone()).collect())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `globals.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: you should consider adding a `Default` implementation for `TlErrs` [INFO] [stdout] --> koatl-core/src/util.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / pub fn new() -> Self { [INFO] [stdout] 73 | | TlErrs(vec![]) [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 71 + impl Default for TlErrs { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TlErrBuilder` [INFO] [stdout] --> koatl-core/src/util.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | / pub fn new() -> Self { [INFO] [stdout] 102 | | TlErrBuilder { [INFO] [stdout] 103 | | message: String::new(), [INFO] [stdout] 104 | | span: None, [INFO] [stdout] ... | [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 100 + impl Default for TlErrBuilder { [INFO] [stdout] 101 + fn default() -> Self { [INFO] [stdout] 102 + Self::new() [INFO] [stdout] 103 + } [INFO] [stdout] 104 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:83:44 [INFO] [stdout] | [INFO] [stdout] 83 | let inference = match inference::infer(&src, &tl_ast, &resolve_state) { [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | &src, [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | &filename, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `filename` [INFO] [stdout] | [INFO] [stdout] = 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] --> koatl-core/src/lib.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | if errs.0.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errs.0.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:250:41 [INFO] [stdout] | [INFO] [stdout] 250 | let (tokens, token_errs) = tokenize(&src, true); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl-core/src/lib.rs:269:46 [INFO] [stdout] | [INFO] [stdout] 269 | let (tl_cst, parser_errs) = parse_tokens(&src, &tokens); [INFO] [stdout] | ^^^^ help: change this to: `src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking profiling v0.1.0 (/opt/rustwide/workdir/profiling) [INFO] [stderr] Compiling wit-parser v0.201.0 [INFO] [stderr] Compiling wasm-metadata v0.201.0 [INFO] [stderr] Checking koatl v0.4.5 (/opt/rustwide/workdir/koatl) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl/src/emit_py.rs:235:34 [INFO] [stdout] | [INFO] [stdout] 235 | (cls.emit_py(&ctx)?, items_ast, keys, values), [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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> koatl/src/emit_py.rs:521:9 [INFO] [stdout] | [INFO] [stdout] 521 | / Ok(ctx.ast_cls( [INFO] [stdout] 522 | | match self { [INFO] [stdout] 523 | | PyAccessCtx::Load => "Load", [INFO] [stdout] 524 | | PyAccessCtx::Store => "Store", [INFO] [stdout] ... | [INFO] [stdout] 527 | | (), [INFO] [stdout] 528 | | )?) [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] 521 ~ ctx.ast_cls( [INFO] [stdout] 522 | match self { [INFO] [stdout] ... [INFO] [stdout] 527 | (), [INFO] [stdout] 528 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> koatl/src/emit_py.rs:687:28 [INFO] [stdout] | [INFO] [stdout] 687 | return Ok(ctx.ast_node( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 688 | | "Compare", [INFO] [stdout] 689 | | ( [INFO] [stdout] 690 | | left.emit_py(ctx)?, [INFO] [stdout] ... | [INFO] [stdout] 694 | | &self.tl_span, [INFO] [stdout] 695 | | )?); [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] 687 ~ return ctx.ast_node( [INFO] [stdout] 688 | "Compare", [INFO] [stdout] ... [INFO] [stdout] 694 | &self.tl_span, [INFO] [stdout] 695 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `pyo3::Py` [INFO] [stdout] --> koatl/src/emit_py.rs:841:39 [INFO] [stdout] | [INFO] [stdout] 841 | ... keys.push(ctx.py.None().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ctx.py.None()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> koatl/src/emit_py.rs:235:34 [INFO] [stdout] | [INFO] [stdout] 235 | (cls.emit_py(&ctx)?, items_ast, keys, values), [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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> koatl/src/emit_py.rs:521:9 [INFO] [stdout] | [INFO] [stdout] 521 | / Ok(ctx.ast_cls( [INFO] [stdout] 522 | | match self { [INFO] [stdout] 523 | | PyAccessCtx::Load => "Load", [INFO] [stdout] 524 | | PyAccessCtx::Store => "Store", [INFO] [stdout] ... | [INFO] [stdout] 527 | | (), [INFO] [stdout] 528 | | )?) [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] 521 ~ ctx.ast_cls( [INFO] [stdout] 522 | match self { [INFO] [stdout] ... [INFO] [stdout] 527 | (), [INFO] [stdout] 528 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> koatl/src/emit_py.rs:687:28 [INFO] [stdout] | [INFO] [stdout] 687 | return Ok(ctx.ast_node( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 688 | | "Compare", [INFO] [stdout] 689 | | ( [INFO] [stdout] 690 | | left.emit_py(ctx)?, [INFO] [stdout] ... | [INFO] [stdout] 694 | | &self.tl_span, [INFO] [stdout] 695 | | )?); [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] 687 ~ return ctx.ast_node( [INFO] [stdout] 688 | "Compare", [INFO] [stdout] ... [INFO] [stdout] 694 | &self.tl_span, [INFO] [stdout] 695 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `pyo3::Py` [INFO] [stdout] --> koatl/src/emit_py.rs:841:39 [INFO] [stdout] | [INFO] [stdout] 841 | ... keys.push(ctx.py.None().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ctx.py.None()` [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] [stderr] Compiling wit-component v0.201.0 [INFO] [stderr] Compiling wit-bindgen-core v0.21.0 [INFO] [stderr] Checking wit-bindgen v0.21.0 [INFO] [stderr] Checking quetzal v0.1.0 (/opt/rustwide/workdir/quetzal) [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> quetzal/src/lib.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 13 | let result = formatter.format(&o).unwrap_or("".to_string()); [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 14 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 13 ~ [INFO] [stdout] 14 ~ formatter.format(&o).unwrap_or("".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 32.76s [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> quetzal/src/lib.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 13 | let result = formatter.format(&o).unwrap_or("".to_string()); [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 14 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 13 ~ [INFO] [stdout] 14 ~ formatter.format(&o).unwrap_or("".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "dd064e0f7504f93dcc1ec7e24ccdee74f83860294c1a849955dbf010fc83b851", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dd064e0f7504f93dcc1ec7e24ccdee74f83860294c1a849955dbf010fc83b851", kill_on_drop: false }` [INFO] [stdout] dd064e0f7504f93dcc1ec7e24ccdee74f83860294c1a849955dbf010fc83b851