[INFO] cloning repository https://github.com/vsczpv/homework-compiler [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/vsczpv/homework-compiler" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvsczpv%2Fhomework-compiler", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvsczpv%2Fhomework-compiler'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c81c34b7a1e38ef51e14206e728198f8cb8fa7ca [INFO] linting vsczpv/homework-compiler against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvsczpv%2Fhomework-compiler" "/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/vsczpv/homework-compiler [INFO] finished tweaking git repo https://github.com/vsczpv/homework-compiler [INFO] tweaked toml for git repo https://github.com/vsczpv/homework-compiler written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/vsczpv/homework-compiler 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/vsczpv/homework-compiler 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] 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] 8ab4d04ec4a78bad4b2ba226d31816954d60aeb838ac40bb81705afe996deded [INFO] running `Command { std: "docker" "start" "-a" "8ab4d04ec4a78bad4b2ba226d31816954d60aeb838ac40bb81705afe996deded", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8ab4d04ec4a78bad4b2ba226d31816954d60aeb838ac40bb81705afe996deded", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ab4d04ec4a78bad4b2ba226d31816954d60aeb838ac40bb81705afe996deded", kill_on_drop: false }` [INFO] [stdout] 8ab4d04ec4a78bad4b2ba226d31816954d60aeb838ac40bb81705afe996deded [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] 0b97e7a6b4f188efa1d1276b3bf6bf9aad62e95f93b458fa6509814e29e1046f [INFO] running `Command { std: "docker" "start" "-a" "0b97e7a6b4f188efa1d1276b3bf6bf9aad62e95f93b458fa6509814e29e1046f", kill_on_drop: false }` [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking systeml v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/sem/asmspit.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/sem/asmspit.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/sem/symtab.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | / /// [INFO] [stdout] 163 | | [INFO] [stdout] | |_^ [INFO] [stdout] 164 | fn act_on(&mut self, mut node: Box) -> SemanticResult { [INFO] [stdout] | --------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/sem/symtab.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | / /// [INFO] [stdout] 163 | | [INFO] [stdout] | |_^ [INFO] [stdout] 164 | fn act_on(&mut self, mut node: Box) -> SemanticResult { [INFO] [stdout] | --------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after outer attribute [INFO] [stdout] --> src/syn/constants_autogen.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / #[rustfmt::skip] [INFO] [stdout] 7 | | [INFO] [stdout] 8 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub const PARSER_TABLE: [[ParserStateAction; PARSER_TOKEN_CT]; PARSER_STATE_CT] = [ [INFO] [stdout] | ---------------------- the attribute applies to this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after outer attribute [INFO] [stdout] --> src/syn/constants_autogen.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / #[rustfmt::skip] [INFO] [stdout] 7 | | [INFO] [stdout] 8 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub const PARSER_TABLE: [[ParserStateAction; PARSER_TOKEN_CT]; PARSER_STATE_CT] = [ [INFO] [stdout] | ---------------------- the attribute applies to this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/syn/preprocess.rs:677:54 [INFO] [stdout] | [INFO] [stdout] 677 | node.morph(NodeKind::Virt(Virtual::ForExpr { ident: ident })); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `ident` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/syn/preprocess.rs:677:54 [INFO] [stdout] | [INFO] [stdout] 677 | node.morph(NodeKind::Virt(Virtual::ForExpr { ident: ident })); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `ident` [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: name `DOLLAR` contains a capitalized acronym [INFO] [stdout] --> src/lex/tokens.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | DOLLAR, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Dollar` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lex/tokens.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | / match self { [INFO] [stdout] 103 | | Token::GteOptr [INFO] [stdout] 104 | | | Token::LteOptr [INFO] [stdout] 105 | | | Token::GtOptr [INFO] [stdout] ... | [INFO] [stdout] 112 | | _ => false, [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 102 ~ matches!(self, Token::GteOptr [INFO] [stdout] 103 + | Token::LteOptr [INFO] [stdout] 104 + | Token::GtOptr [INFO] [stdout] 105 + | Token::LtOptr [INFO] [stdout] 106 + | Token::EqualsOptr [INFO] [stdout] 107 + | Token::NeqOptr [INFO] [stdout] 108 + | Token::NotOptr [INFO] [stdout] 109 + | Token::AndOptr [INFO] [stdout] 110 + | Token::OrOptr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lex/tokens.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / match self { [INFO] [stdout] 117 | | Token::BitAndOptr | Token::BitOrOptr | Token::BitXorOptr => true, [INFO] [stdout] 118 | | _ => false, [INFO] [stdout] 119 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 116 - match self { [INFO] [stdout] 117 - Token::BitAndOptr | Token::BitOrOptr | Token::BitXorOptr => true, [INFO] [stdout] 118 - _ => false, [INFO] [stdout] 119 - } [INFO] [stdout] 116 + matches!(self, Token::BitAndOptr | Token::BitOrOptr | Token::BitXorOptr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | / if Token::Whitespace == *self { [INFO] [stdout] 177 | | return true; [INFO] [stdout] 178 | | } else { [INFO] [stdout] 179 | | return false; [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Token::Whitespace == *self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if Token::Newline == *self { [INFO] [stdout] 184 | | return true; [INFO] [stdout] 185 | | } else { [INFO] [stdout] 186 | | return false; [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Token::Newline == *self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lex/tokens.rs:190:45 [INFO] [stdout] | [INFO] [stdout] 190 | if Token::MultilineComment == *self { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 191 | | return true; [INFO] [stdout] 192 | | } else if Token::Comment == *self { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lex/tokens.rs:192:43 [INFO] [stdout] | [INFO] [stdout] 192 | } else if Token::Comment == *self { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 193 | | return true; [INFO] [stdout] 194 | | } else { [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:192:16 [INFO] [stdout] | [INFO] [stdout] 192 | } else if Token::Comment == *self { [INFO] [stdout] | ________________^ [INFO] [stdout] 193 | | return true; [INFO] [stdout] 194 | | } else { [INFO] [stdout] 195 | | return false; [INFO] [stdout] 196 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `{ return Token::Comment == *self }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if Token::EverythingElse == *self { [INFO] [stdout] 200 | | return true; [INFO] [stdout] 201 | | } else { [INFO] [stdout] 202 | | return false; [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Token::EverythingElse == *self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOLLAR` contains a capitalized acronym [INFO] [stdout] --> src/lex/tokens.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | DOLLAR, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Dollar` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/asmspit.rs:19:11 [INFO] [stdout] | [INFO] [stdout] 19 | tree: &'a Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&'a AstNode` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lex/tokens.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | / match self { [INFO] [stdout] 103 | | Token::GteOptr [INFO] [stdout] 104 | | | Token::LteOptr [INFO] [stdout] 105 | | | Token::GtOptr [INFO] [stdout] ... | [INFO] [stdout] 112 | | _ => false, [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 102 ~ matches!(self, Token::GteOptr [INFO] [stdout] 103 + | Token::LteOptr [INFO] [stdout] 104 + | Token::GtOptr [INFO] [stdout] 105 + | Token::LtOptr [INFO] [stdout] 106 + | Token::EqualsOptr [INFO] [stdout] 107 + | Token::NeqOptr [INFO] [stdout] 108 + | Token::NotOptr [INFO] [stdout] 109 + | Token::AndOptr [INFO] [stdout] 110 + | Token::OrOptr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/asmspit.rs:23:45 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn new(syms: &'a SymbolTable, tree: &'a Box) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&'a AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lex/tokens.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / match self { [INFO] [stdout] 117 | | Token::BitAndOptr | Token::BitOrOptr | Token::BitXorOptr => true, [INFO] [stdout] 118 | | _ => false, [INFO] [stdout] 119 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 116 - match self { [INFO] [stdout] 117 - Token::BitAndOptr | Token::BitOrOptr | Token::BitXorOptr => true, [INFO] [stdout] 118 - _ => false, [INFO] [stdout] 119 - } [INFO] [stdout] 116 + matches!(self, Token::BitAndOptr | Token::BitOrOptr | Token::BitXorOptr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/asmspit.rs:49:48 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn venture_expression(&mut self, node: &Box) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sem/asmspit.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | / if !matches!(opr, Operator::AssignOptr) { [INFO] [stdout] 94 | | if matches!(rhstype, ValueKind::LvalueRef(_)) { [INFO] [stdout] 95 | | self.program += "\n\t\tmov rbx, qword [rbx]\n"; [INFO] [stdout] 96 | | } [INFO] [stdout] 97 | | } [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] 93 ~ if !matches!(opr, Operator::AssignOptr) [INFO] [stdout] 94 ~ && matches!(rhstype, ValueKind::LvalueRef(_)) { [INFO] [stdout] 95 | self.program += "\n\t\tmov rbx, qword [rbx]\n"; [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | / if Token::Whitespace == *self { [INFO] [stdout] 177 | | return true; [INFO] [stdout] 178 | | } else { [INFO] [stdout] 179 | | return false; [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Token::Whitespace == *self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if Token::Newline == *self { [INFO] [stdout] 184 | | return true; [INFO] [stdout] 185 | | } else { [INFO] [stdout] 186 | | return false; [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Token::Newline == *self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lex/tokens.rs:190:45 [INFO] [stdout] | [INFO] [stdout] 190 | if Token::MultilineComment == *self { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 191 | | return true; [INFO] [stdout] 192 | | } else if Token::Comment == *self { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lex/tokens.rs:192:43 [INFO] [stdout] | [INFO] [stdout] 192 | } else if Token::Comment == *self { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 193 | | return true; [INFO] [stdout] 194 | | } else { [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:192:16 [INFO] [stdout] | [INFO] [stdout] 192 | } else if Token::Comment == *self { [INFO] [stdout] | ________________^ [INFO] [stdout] 193 | | return true; [INFO] [stdout] 194 | | } else { [INFO] [stdout] 195 | | return false; [INFO] [stdout] 196 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `{ return Token::Comment == *self }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lex/tokens.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if Token::EverythingElse == *self { [INFO] [stdout] 200 | | return true; [INFO] [stdout] 201 | | } else { [INFO] [stdout] 202 | | return false; [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Token::EverythingElse == *self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/sem/asmspit.rs:157:48 [INFO] [stdout] | [INFO] [stdout] 157 | ... let grandkid = kid [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 158 | | ... .follow_line(1) [INFO] [stdout] 159 | | ... .get_kind() [INFO] [stdout] 160 | | ... .clone() [INFO] [stdout] ... | [INFO] [stdout] 165 | | ... .unwrap() [INFO] [stdout] 166 | | ... .clone(); [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 157 ~ let grandkid = *kid [INFO] [stdout] 158 + .follow_line(1) [INFO] [stdout] 159 + .get_kind() [INFO] [stdout] 160 + .clone() [INFO] [stdout] 161 + .some_lex() [INFO] [stdout] 162 + .unwrap() [INFO] [stdout] 163 + .get_token() [INFO] [stdout] 164 + .some_number() [INFO] [stdout] 165 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/sem/symtab.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / for s in self.syms.iter().rev() { [INFO] [stdout] 83 | | if s.ident.eq(ident) && s.scope == scope { [INFO] [stdout] 84 | | return Some(s); [INFO] [stdout] ... | [INFO] [stdout] 87 | | return None; [INFO] [stdout] | |____________________^ help: replace with an iterator: `self.syms.iter().rev().find(|&s| s.ident.eq(ident) && s.scope == scope).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/sem/symtab.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / for s in &self.syms { [INFO] [stdout] 92 | | if s.generation == gen { [INFO] [stdout] 93 | | return Some(s); [INFO] [stdout] ... | [INFO] [stdout] 96 | | return None; [INFO] [stdout] | |____________________^ help: replace with an iterator: `self.syms.iter().find(|&s| s.generation == gen).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/symtab.rs:184:32 [INFO] [stdout] | [INFO] [stdout] 184 | pub fn generate(&mut self, mut tree: Box) -> SemanticResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] = note: `#[warn(clippy::boxed_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/asmspit.rs:19:11 [INFO] [stdout] | [INFO] [stdout] 19 | tree: &'a Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&'a AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/asmspit.rs:23:45 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn new(syms: &'a SymbolTable, tree: &'a Box) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&'a AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/sem/symtab.rs:290:42 [INFO] [stdout] | [INFO] [stdout] 290 | return Err(SemanticError(format!( [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 291 | | "Non unique identifier on lambda definition." [INFO] [stdout] 292 | | ))); [INFO] [stdout] | |_________________^ help: consider using `.to_string()`: `"Non unique identifier on lambda definition.".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 `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/asmspit.rs:49:48 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn venture_expression(&mut self, node: &Box) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/symtab.rs:336:34 [INFO] [stdout] | [INFO] [stdout] 336 | fn handle_forexpr(&mut self, mut node: Box, ident: &String) -> SemanticResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sem/asmspit.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | / if !matches!(opr, Operator::AssignOptr) { [INFO] [stdout] 94 | | if matches!(rhstype, ValueKind::LvalueRef(_)) { [INFO] [stdout] 95 | | self.program += "\n\t\tmov rbx, qword [rbx]\n"; [INFO] [stdout] 96 | | } [INFO] [stdout] 97 | | } [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] 93 ~ if !matches!(opr, Operator::AssignOptr) [INFO] [stdout] 94 ~ && matches!(rhstype, ValueKind::LvalueRef(_)) { [INFO] [stdout] 95 | self.program += "\n\t\tmov rbx, qword [rbx]\n"; [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/symtab.rs:397:31 [INFO] [stdout] | [INFO] [stdout] 397 | fn handle_bind(&mut self, mut node: Box) -> SemanticResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/sem/asmspit.rs:157:48 [INFO] [stdout] | [INFO] [stdout] 157 | ... let grandkid = kid [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 158 | | ... .follow_line(1) [INFO] [stdout] 159 | | ... .get_kind() [INFO] [stdout] 160 | | ... .clone() [INFO] [stdout] ... | [INFO] [stdout] 165 | | ... .unwrap() [INFO] [stdout] 166 | | ... .clone(); [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 157 ~ let grandkid = *kid [INFO] [stdout] 158 + .follow_line(1) [INFO] [stdout] 159 + .get_kind() [INFO] [stdout] 160 + .clone() [INFO] [stdout] 161 + .some_lex() [INFO] [stdout] 162 + .unwrap() [INFO] [stdout] 163 + .get_token() [INFO] [stdout] 164 + .some_number() [INFO] [stdout] 165 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/sem/symtab.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / for s in self.syms.iter().rev() { [INFO] [stdout] 83 | | if s.ident.eq(ident) && s.scope == scope { [INFO] [stdout] 84 | | return Some(s); [INFO] [stdout] ... | [INFO] [stdout] 87 | | return None; [INFO] [stdout] | |____________________^ help: replace with an iterator: `self.syms.iter().rev().find(|&s| s.ident.eq(ident) && s.scope == scope).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/sem/symtab.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / for s in &self.syms { [INFO] [stdout] 92 | | if s.generation == gen { [INFO] [stdout] 93 | | return Some(s); [INFO] [stdout] ... | [INFO] [stdout] 96 | | return None; [INFO] [stdout] | |____________________^ help: replace with an iterator: `self.syms.iter().find(|&s| s.generation == gen).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/sem/typechk.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / match self { [INFO] [stdout] 102 | | Self::Array { elem, quant } => true, [INFO] [stdout] 103 | | _ => false, [INFO] [stdout] 104 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 101 - match self { [INFO] [stdout] 102 - Self::Array { elem, quant } => true, [INFO] [stdout] 103 - _ => false, [INFO] [stdout] 104 - } [INFO] [stdout] 101 + matches!(self, Self::Array { elem, quant }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/typechk.rs:135:29 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn parse_type(node: &Box) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/symtab.rs:184:32 [INFO] [stdout] | [INFO] [stdout] 184 | pub fn generate(&mut self, mut tree: Box) -> SemanticResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] = note: `#[warn(clippy::boxed_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/sem/typechk.rs:162:32 [INFO] [stdout] | [INFO] [stdout] 162 | let len = *(&kids[1]) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `kids[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/sem/typechk.rs:186:30 [INFO] [stdout] | [INFO] [stdout] 186 | .map(|n| Self::parse_type(n)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::parse_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/sem/symtab.rs:290:42 [INFO] [stdout] | [INFO] [stdout] 290 | return Err(SemanticError(format!( [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 291 | | "Non unique identifier on lambda definition." [INFO] [stdout] 292 | | ))); [INFO] [stdout] | |_________________^ help: consider using `.to_string()`: `"Non unique identifier on lambda definition.".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: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/symtab.rs:336:34 [INFO] [stdout] | [INFO] [stdout] 336 | fn handle_forexpr(&mut self, mut node: Box, ident: &String) -> SemanticResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/sem/typechk.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | / match self { [INFO] [stdout] 250 | | Self::Brack => false, [INFO] [stdout] 251 | | _ => true, [INFO] [stdout] 252 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 249 - match self { [INFO] [stdout] 250 - Self::Brack => false, [INFO] [stdout] 251 - _ => true, [INFO] [stdout] 252 - } [INFO] [stdout] 249 + !matches!(self, Self::Brack) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/symtab.rs:397:31 [INFO] [stdout] | [INFO] [stdout] 397 | fn handle_bind(&mut self, mut node: Box) -> SemanticResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sem/typechk.rs:314:5 [INFO] [stdout] | [INFO] [stdout] 314 | / if op.must_be_same() { [INFO] [stdout] 315 | | if !rhst.eq(lhst) { [INFO] [stdout] 316 | | return None; [INFO] [stdout] 317 | | } [INFO] [stdout] 318 | | } [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] 314 ~ if op.must_be_same() [INFO] [stdout] 315 ~ && !rhst.eq(lhst) { [INFO] [stdout] 316 | return None; [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/typechk.rs:360:35 [INFO] [stdout] | [INFO] [stdout] 360 | pub fn assure_ints(&mut self, tree: Box) -> SemanticResult { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/sem/typechk.rs:363:17 [INFO] [stdout] | [INFO] [stdout] 363 | / if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 364 | | if !(tp.inner_type().is_array() [INFO] [stdout] 365 | | && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] 366 | | .eq(&SymbolMajorType::Builtin(BuiltinTypes::Int))) [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 362 ~ NodeKind::TypedVirt(_, tp) [INFO] [stdout] 363 ~ if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) => { [INFO] [stdout] 364 | if !(tp.inner_type().is_array() [INFO] [stdout] ... [INFO] [stdout] 371 | } [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/sem/typechk.rs:361:9 [INFO] [stdout] | [INFO] [stdout] 361 | / match tree.get_kind() { [INFO] [stdout] 362 | | NodeKind::TypedVirt(_, tp) => { [INFO] [stdout] 363 | | if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 364 | | if !(tp.inner_type().is_array() [INFO] [stdout] ... | [INFO] [stdout] 374 | | _ => {} [INFO] [stdout] 375 | | } [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] 361 ~ if let NodeKind::TypedVirt(_, tp) = tree.get_kind() { [INFO] [stdout] 362 + if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 363 + if !(tp.inner_type().is_array() [INFO] [stdout] 364 + && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] 365 + .eq(&SymbolMajorType::Builtin(BuiltinTypes::Int))) [INFO] [stdout] 366 + { [INFO] [stdout] 367 + return Err(SemanticError(format!( [INFO] [stdout] 368 + "type error: only ints and int arrays are currently supported. (found {tp:?})" [INFO] [stdout] 369 + ))); [INFO] [stdout] 370 + } [INFO] [stdout] 371 + } [INFO] [stdout] 372 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sem/typechk.rs:363:17 [INFO] [stdout] | [INFO] [stdout] 363 | / if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 364 | | if !(tp.inner_type().is_array() [INFO] [stdout] 365 | | && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] 366 | | .eq(&SymbolMajorType::Builtin(BuiltinTypes::Int))) [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [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] 363 ~ if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) [INFO] [stdout] 364 ~ && !(tp.inner_type().is_array() [INFO] [stdout] 365 | && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] ... [INFO] [stdout] 370 | ))); [INFO] [stdout] 371 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/typechk.rs:438:33 [INFO] [stdout] | [INFO] [stdout] 438 | pub fn typecheck(&mut self, tree: Box) -> SemanticResult { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/sem/typechk.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / match self { [INFO] [stdout] 102 | | Self::Array { elem, quant } => true, [INFO] [stdout] 103 | | _ => false, [INFO] [stdout] 104 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 101 - match self { [INFO] [stdout] 102 - Self::Array { elem, quant } => true, [INFO] [stdout] 103 - _ => false, [INFO] [stdout] 104 - } [INFO] [stdout] 101 + matches!(self, Self::Array { elem, quant }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/sem/typechk.rs:135:29 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn parse_type(node: &Box) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&AstNode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/sem/typechk.rs:162:32 [INFO] [stdout] | [INFO] [stdout] 162 | let len = *(&kids[1]) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `kids[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/sem/typechk.rs:186:30 [INFO] [stdout] | [INFO] [stdout] 186 | .map(|n| Self::parse_type(n)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::parse_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/sem/typechk.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | / match self { [INFO] [stdout] 250 | | Self::Brack => false, [INFO] [stdout] 251 | | _ => true, [INFO] [stdout] 252 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 249 - match self { [INFO] [stdout] 250 - Self::Brack => false, [INFO] [stdout] 251 - _ => true, [INFO] [stdout] 252 - } [INFO] [stdout] 249 + !matches!(self, Self::Brack) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sem/typechk.rs:314:5 [INFO] [stdout] | [INFO] [stdout] 314 | / if op.must_be_same() { [INFO] [stdout] 315 | | if !rhst.eq(lhst) { [INFO] [stdout] 316 | | return None; [INFO] [stdout] 317 | | } [INFO] [stdout] 318 | | } [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] 314 ~ if op.must_be_same() [INFO] [stdout] 315 ~ && !rhst.eq(lhst) { [INFO] [stdout] 316 | return None; [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large array defined as const [INFO] [stdout] --> src/syn/constants_autogen.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | pub const PARSER_TABLE: [[ParserStateAction; PARSER_TOKEN_CT]; PARSER_STATE_CT] = [ [INFO] [stdout] | ^ ----- help: make this a static item: `static` [INFO] [stdout] | _| [INFO] [stdout] | | [INFO] [stdout] 17 | | [Error,Error,Error,Shift(18),Shift(14),Shift(15),Shift(55),Shift(57),Error,Shift(58),Shift(59),Error,Shift(17),Shift(16),Shif... [INFO] [stdout] 18 | | [Accept,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Err... [INFO] [stdout] 19 | | [Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Erro... [INFO] [stdout] ... | [INFO] [stdout] 215 | | [Error,Error,Error,Error,Error,Error,Reduce(123),Reduce(123),Error,Reduce(123),Reduce(123),Error,Error,Error,Reduce(123),Erro... [INFO] [stdout] 216 | | ]; [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays [INFO] [stdout] = note: `#[warn(clippy::large_const_arrays)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/typechk.rs:360:35 [INFO] [stdout] | [INFO] [stdout] 360 | pub fn assure_ints(&mut self, tree: Box) -> SemanticResult { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/sem/typechk.rs:363:17 [INFO] [stdout] | [INFO] [stdout] 363 | / if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 364 | | if !(tp.inner_type().is_array() [INFO] [stdout] 365 | | && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] 366 | | .eq(&SymbolMajorType::Builtin(BuiltinTypes::Int))) [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 362 ~ NodeKind::TypedVirt(_, tp) [INFO] [stdout] 363 ~ if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) => { [INFO] [stdout] 364 | if !(tp.inner_type().is_array() [INFO] [stdout] ... [INFO] [stdout] 371 | } [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/sem/typechk.rs:361:9 [INFO] [stdout] | [INFO] [stdout] 361 | / match tree.get_kind() { [INFO] [stdout] 362 | | NodeKind::TypedVirt(_, tp) => { [INFO] [stdout] 363 | | if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 364 | | if !(tp.inner_type().is_array() [INFO] [stdout] ... | [INFO] [stdout] 374 | | _ => {} [INFO] [stdout] 375 | | } [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] 361 ~ if let NodeKind::TypedVirt(_, tp) = tree.get_kind() { [INFO] [stdout] 362 + if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 363 + if !(tp.inner_type().is_array() [INFO] [stdout] 364 + && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] 365 + .eq(&SymbolMajorType::Builtin(BuiltinTypes::Int))) [INFO] [stdout] 366 + { [INFO] [stdout] 367 + return Err(SemanticError(format!( [INFO] [stdout] 368 + "type error: only ints and int arrays are currently supported. (found {tp:?})" [INFO] [stdout] 369 + ))); [INFO] [stdout] 370 + } [INFO] [stdout] 371 + } [INFO] [stdout] 372 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sem/typechk.rs:363:17 [INFO] [stdout] | [INFO] [stdout] 363 | / if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) { [INFO] [stdout] 364 | | if !(tp.inner_type().is_array() [INFO] [stdout] 365 | | && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] 366 | | .eq(&SymbolMajorType::Builtin(BuiltinTypes::Int))) [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [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] 363 ~ if *tp.inner_type() != SymbolMajorType::Builtin(BuiltinTypes::Int) [INFO] [stdout] 364 ~ && !(tp.inner_type().is_array() [INFO] [stdout] 365 | && (*(tp.inner_type().get_array_elem().unwrap())) [INFO] [stdout] ... [INFO] [stdout] 370 | ))); [INFO] [stdout] 371 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/sem/typechk.rs:438:33 [INFO] [stdout] | [INFO] [stdout] 438 | pub fn typecheck(&mut self, tree: Box) -> SemanticResult { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large array defined as const [INFO] [stdout] --> src/syn/constants_autogen.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | pub const PARSER_TABLE: [[ParserStateAction; PARSER_TOKEN_CT]; PARSER_STATE_CT] = [ [INFO] [stdout] | ^ ----- help: make this a static item: `static` [INFO] [stdout] | _| [INFO] [stdout] | | [INFO] [stdout] 17 | | [Error,Error,Error,Shift(18),Shift(14),Shift(15),Shift(55),Shift(57),Error,Shift(58),Shift(59),Error,Shift(17),Shift(16),Shif... [INFO] [stdout] 18 | | [Accept,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Err... [INFO] [stdout] 19 | | [Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Error,Erro... [INFO] [stdout] ... | [INFO] [stdout] 215 | | [Error,Error,Error,Error,Error,Error,Reduce(123),Reduce(123),Error,Reduce(123),Reduce(123),Error,Error,Error,Reduce(123),Erro... [INFO] [stdout] 216 | | ]; [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays [INFO] [stdout] = note: `#[warn(clippy::large_const_arrays)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large array defined as const [INFO] [stdout] --> src/syn/constants_autogen.rs:220:1 [INFO] [stdout] | [INFO] [stdout] 220 | pub const GOTO_TABLE: [[Option; PARSER_GOTOTABLE_CT]; PARSER_STATE_CT] = [ [INFO] [stdout] | ^ ----- help: make this a static item: `static` [INFO] [stdout] | _| [INFO] [stdout] | | [INFO] [stdout] 221 | | [Some(1),Some(5),Some(2),Some(4),Some(7),Some(8),Some(9),Some(10),Some(11),Some(3),Some(6),Some(13),Some(19),Some(20),Some(21... [INFO] [stdout] 222 | | [None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None... [INFO] [stdout] 223 | | [None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None... [INFO] [stdout] ... | [INFO] [stdout] 421 | | ]; [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large array defined as const [INFO] [stdout] --> src/syn/constants_autogen.rs:220:1 [INFO] [stdout] | [INFO] [stdout] 220 | pub const GOTO_TABLE: [[Option; PARSER_GOTOTABLE_CT]; PARSER_STATE_CT] = [ [INFO] [stdout] | ^ ----- help: make this a static item: `static` [INFO] [stdout] | _| [INFO] [stdout] | | [INFO] [stdout] 221 | | [Some(1),Some(5),Some(2),Some(4),Some(7),Some(8),Some(9),Some(10),Some(11),Some(3),Some(6),Some(13),Some(19),Some(20),Some(21... [INFO] [stdout] 222 | | [None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None... [INFO] [stdout] 223 | | [None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None... [INFO] [stdout] ... | [INFO] [stdout] 421 | | ]; [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/syn/preprocess.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | return node.unpeel_children().into_iter().nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `node.unpeel_children().into_iter().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/syn/preprocess.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | / n.get_kind() [INFO] [stdout] 197 | | .to_owned() [INFO] [stdout] 198 | | .some_lex() [INFO] [stdout] 199 | | .map_or(true, |l| !matches!(l.get_token(), Token::Colon)) [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 199 - .map_or(true, |l| !matches!(l.get_token(), Token::Colon)) [INFO] [stdout] 199 + .is_none_or(|l| !matches!(l.get_token(), Token::Colon)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syn/preprocess.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | / if matches!( [INFO] [stdout] 212 | | node.get_kind(), [INFO] [stdout] 213 | | NodeKind::Virt(Virtual::GenericExpressionList) [INFO] [stdout] 214 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [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] 214 ~ ) [INFO] [stdout] 215 ~ && matches!( [INFO] [stdout] 216 | node.get_children()[1].get_kind(), [INFO] [stdout] ... [INFO] [stdout] 230 | node = newnode; [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/syn/preprocess.rs:486:54 [INFO] [stdout] | [INFO] [stdout] 486 | return node.unpeel_children().into_iter().skip(1).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/preprocess.rs:495:19 [INFO] [stdout] | [INFO] [stdout] 495 | sigtype: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/syn/preprocess.rs:493:5 [INFO] [stdout] | [INFO] [stdout] 493 | root: Box, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/syn/preprocess.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | return node.unpeel_children().into_iter().nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `node.unpeel_children().into_iter().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/syn/preprocess.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | / n.get_kind() [INFO] [stdout] 197 | | .to_owned() [INFO] [stdout] 198 | | .some_lex() [INFO] [stdout] 199 | | .map_or(true, |l| !matches!(l.get_token(), Token::Colon)) [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 199 - .map_or(true, |l| !matches!(l.get_token(), Token::Colon)) [INFO] [stdout] 199 + .is_none_or(|l| !matches!(l.get_token(), Token::Colon)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syn/preprocess.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | / if matches!( [INFO] [stdout] 212 | | node.get_kind(), [INFO] [stdout] 213 | | NodeKind::Virt(Virtual::GenericExpressionList) [INFO] [stdout] 214 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [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] 214 ~ ) [INFO] [stdout] 215 ~ && matches!( [INFO] [stdout] 216 | node.get_children()[1].get_kind(), [INFO] [stdout] ... [INFO] [stdout] 230 | node = newnode; [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/syn/preprocess.rs:548:18 [INFO] [stdout] | [INFO] [stdout] 548 | .zip(signatures_type.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 548 - .zip(signatures_type.into_iter()) [INFO] [stdout] 548 + .zip(signatures_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:610:70 [INFO] [stdout] | [INFO] [stdout] 610 | .retain(|n| !matches!(n.get_kind(), NodeKind::Lex(_)) && n.get_children().len() != 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!n.get_children().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] --> src/syn/preprocess.rs:634:16 [INFO] [stdout] | [INFO] [stdout] 634 | if myield.get_children().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `myield.get_children().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:682:12 [INFO] [stdout] | [INFO] [stdout] 682 | if myield.get_children().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `myield.get_children().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:732:20 [INFO] [stdout] | [INFO] [stdout] 732 | if n.get_children().len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!n.get_children().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:740:12 [INFO] [stdout] | [INFO] [stdout] 740 | if node.follow_line2(1, 1).get_children().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `node.follow_line2(1, 1).get_children().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] --> src/syn/preprocess.rs:751:5 [INFO] [stdout] | [INFO] [stdout] 751 | / if matches!(node.get_kind(), NodeKind::Non(NonTerminal::LTypes)) { [INFO] [stdout] 752 | | if node.get_children().len() != 1 [INFO] [stdout] 753 | | && (matches!( [INFO] [stdout] 754 | | node.follow_line2(1, 1).get_kind(), [INFO] [stdout] ... | [INFO] [stdout] 775 | | } [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] 751 ~ if matches!(node.get_kind(), NodeKind::Non(NonTerminal::LTypes)) [INFO] [stdout] 752 ~ && node.get_children().len() != 1 [INFO] [stdout] 753 | && (matches!( [INFO] [stdout] ... [INFO] [stdout] 773 | node = newnode; [INFO] [stdout] 774 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syn/preprocess.rs:780:5 [INFO] [stdout] | [INFO] [stdout] 780 | / if matches!(node.get_kind(), NodeKind::Non(NonTerminal::Type)) { [INFO] [stdout] 781 | | if node.get_children().len() == 3 [INFO] [stdout] 782 | | && node [INFO] [stdout] 783 | | .follow_line2(1, 0) [INFO] [stdout] ... | [INFO] [stdout] 806 | | } [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] 780 ~ if matches!(node.get_kind(), NodeKind::Non(NonTerminal::Type)) [INFO] [stdout] 781 ~ && node.get_children().len() == 3 [INFO] [stdout] 782 | && node [INFO] [stdout] ... [INFO] [stdout] 804 | .retain(|n| n.get_kind().to_owned().some_lex().is_none()); [INFO] [stdout] 805 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/syn/preprocess.rs:486:54 [INFO] [stdout] | [INFO] [stdout] 486 | return node.unpeel_children().into_iter().skip(1).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/preprocess.rs:495:19 [INFO] [stdout] | [INFO] [stdout] 495 | sigtype: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/syn/preprocess.rs:493:5 [INFO] [stdout] | [INFO] [stdout] 493 | root: Box, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/syn/preprocess.rs:548:18 [INFO] [stdout] | [INFO] [stdout] 548 | .zip(signatures_type.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 548 - .zip(signatures_type.into_iter()) [INFO] [stdout] 548 + .zip(signatures_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syn/preprocess.rs:867:5 [INFO] [stdout] | [INFO] [stdout] 867 | / if matches!(node.get_kind(), NodeKind::Virt(Virtual::GenericExpression)) { [INFO] [stdout] 868 | | if node.get_children().len() == 2 [INFO] [stdout] 869 | | && matches!( [INFO] [stdout] 870 | | node.follow_line2(1, 0).get_kind(), [INFO] [stdout] ... | [INFO] [stdout] 888 | | } [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] 867 ~ if matches!(node.get_kind(), NodeKind::Virt(Virtual::GenericExpression)) [INFO] [stdout] 868 ~ && node.get_children().len() == 2 [INFO] [stdout] 869 | && matches!( [INFO] [stdout] ... [INFO] [stdout] 886 | node = newnode; [INFO] [stdout] 887 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/syntax.rs:42:11 [INFO] [stdout] | [INFO] [stdout] 42 | tree: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:610:70 [INFO] [stdout] | [INFO] [stdout] 610 | .retain(|n| !matches!(n.get_kind(), NodeKind::Lex(_)) && n.get_children().len() != 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!n.get_children().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] --> src/syn/preprocess.rs:634:16 [INFO] [stdout] | [INFO] [stdout] 634 | if myield.get_children().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `myield.get_children().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:682:12 [INFO] [stdout] | [INFO] [stdout] 682 | if myield.get_children().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `myield.get_children().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:732:20 [INFO] [stdout] | [INFO] [stdout] 732 | if n.get_children().len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!n.get_children().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/syn/preprocess.rs:740:12 [INFO] [stdout] | [INFO] [stdout] 740 | if node.follow_line2(1, 1).get_children().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `node.follow_line2(1, 1).get_children().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] --> src/syn/preprocess.rs:751:5 [INFO] [stdout] | [INFO] [stdout] 751 | / if matches!(node.get_kind(), NodeKind::Non(NonTerminal::LTypes)) { [INFO] [stdout] 752 | | if node.get_children().len() != 1 [INFO] [stdout] 753 | | && (matches!( [INFO] [stdout] 754 | | node.follow_line2(1, 1).get_kind(), [INFO] [stdout] ... | [INFO] [stdout] 775 | | } [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] 751 ~ if matches!(node.get_kind(), NodeKind::Non(NonTerminal::LTypes)) [INFO] [stdout] 752 ~ && node.get_children().len() != 1 [INFO] [stdout] 753 | && (matches!( [INFO] [stdout] ... [INFO] [stdout] 773 | node = newnode; [INFO] [stdout] 774 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syn/preprocess.rs:780:5 [INFO] [stdout] | [INFO] [stdout] 780 | / if matches!(node.get_kind(), NodeKind::Non(NonTerminal::Type)) { [INFO] [stdout] 781 | | if node.get_children().len() == 3 [INFO] [stdout] 782 | | && node [INFO] [stdout] 783 | | .follow_line2(1, 0) [INFO] [stdout] ... | [INFO] [stdout] 806 | | } [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] 780 ~ if matches!(node.get_kind(), NodeKind::Non(NonTerminal::Type)) [INFO] [stdout] 781 ~ && node.get_children().len() == 3 [INFO] [stdout] 782 | && node [INFO] [stdout] ... [INFO] [stdout] 804 | .retain(|n| n.get_kind().to_owned().some_lex().is_none()); [INFO] [stdout] 805 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:253:15 [INFO] [stdout] | [INFO] [stdout] 253 | children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syn/preprocess.rs:867:5 [INFO] [stdout] | [INFO] [stdout] 867 | / if matches!(node.get_kind(), NodeKind::Virt(Virtual::GenericExpression)) { [INFO] [stdout] 868 | | if node.get_children().len() == 2 [INFO] [stdout] 869 | | && matches!( [INFO] [stdout] 870 | | node.follow_line2(1, 0).get_kind(), [INFO] [stdout] ... | [INFO] [stdout] 888 | | } [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] 867 ~ if matches!(node.get_kind(), NodeKind::Virt(Virtual::GenericExpression)) [INFO] [stdout] 868 ~ && node.get_children().len() == 2 [INFO] [stdout] 869 | && matches!( [INFO] [stdout] ... [INFO] [stdout] 886 | node = newnode; [INFO] [stdout] 887 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/syn/tree.rs:323:25 [INFO] [stdout] | [INFO] [stdout] 323 | pub fn try_apply(self: Box, transform: F) -> Result, AstPreprocessingError> [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/syntax.rs:42:11 [INFO] [stdout] | [INFO] [stdout] 42 | tree: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/syn/tree.rs:392:74 [INFO] [stdout] | [INFO] [stdout] 392 | pub fn tree_as_string_recursive(&self, text: &mut String, depth: u32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:404:36 [INFO] [stdout] | [INFO] [stdout] 404 | pub fn get_children(&self) -> &Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:407:48 [INFO] [stdout] | [INFO] [stdout] 407 | pub fn get_children_mut(&mut self) -> &mut Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/syn/tree.rs:415:24 [INFO] [stdout] | [INFO] [stdout] 415 | pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 415 - pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] 415 + pub fn follow_line(self: &Box, depth: usize) -> &Box { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:415:34 [INFO] [stdout] | [INFO] [stdout] 415 | pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&'a Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:415:66 [INFO] [stdout] | [INFO] [stdout] 415 | pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&'a Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:437:31 [INFO] [stdout] | [INFO] [stdout] 437 | pub fn follow_line2(self: &Box, depth: usize, direction: usize) -> &Box { [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:437:78 [INFO] [stdout] | [INFO] [stdout] 437 | pub fn follow_line2(self: &Box, depth: usize, direction: usize) -> &Box { [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:456:37 [INFO] [stdout] | [INFO] [stdout] 456 | pub fn unpeel_children(self) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/syn/tree.rs:461:13 [INFO] [stdout] | [INFO] [stdout] 461 | / match kd { [INFO] [stdout] 462 | | NonTerminal::OptrA [INFO] [stdout] 463 | | | NonTerminal::Optr4 [INFO] [stdout] 464 | | | NonTerminal::Optr3 [INFO] [stdout] ... | [INFO] [stdout] 468 | | _ => false, [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/syn/tree.rs:460:30 [INFO] [stdout] | [INFO] [stdout] 460 | if let NodeKind::Non(kd) = self.get_kind() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 461 | match kd { [INFO] [stdout] 462 | / NonTerminal::OptrA [INFO] [stdout] 463 | | | NonTerminal::Optr4 [INFO] [stdout] 464 | | | NonTerminal::Optr3 [INFO] [stdout] 465 | | | NonTerminal::Optr2 [INFO] [stdout] 466 | | | NonTerminal::Optr1 [INFO] [stdout] 467 | | | NonTerminal::Optr0 => true, [INFO] [stdout] | |____________________________________^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:461:13 [INFO] [stdout] | [INFO] [stdout] 461 | / match kd { [INFO] [stdout] 462 | | NonTerminal::OptrA [INFO] [stdout] 463 | | | NonTerminal::Optr4 [INFO] [stdout] 464 | | | NonTerminal::Optr3 [INFO] [stdout] ... | [INFO] [stdout] 468 | | _ => false, [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 461 ~ matches!(kd, NonTerminal::OptrA [INFO] [stdout] 462 + | NonTerminal::Optr4 [INFO] [stdout] 463 + | NonTerminal::Optr3 [INFO] [stdout] 464 + | NonTerminal::Optr2 [INFO] [stdout] 465 + | NonTerminal::Optr1 [INFO] [stdout] 466 + | NonTerminal::Optr0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/syn/tree.rs:476:13 [INFO] [stdout] | [INFO] [stdout] 476 | / match kd { [INFO] [stdout] 477 | | NonTerminal::ExprL [INFO] [stdout] 478 | | | NonTerminal::ExprLast [INFO] [stdout] 479 | | | NonTerminal::ExprA [INFO] [stdout] ... | [INFO] [stdout] 494 | | _ => false, [INFO] [stdout] 495 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/syn/tree.rs:475:30 [INFO] [stdout] | [INFO] [stdout] 475 | if let NodeKind::Non(kd) = self.get_kind() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 476 | match kd { [INFO] [stdout] 477 | / NonTerminal::ExprL [INFO] [stdout] 478 | | | NonTerminal::ExprLast [INFO] [stdout] 479 | | | NonTerminal::ExprA [INFO] [stdout] 480 | | | NonTerminal::Expr9 [INFO] [stdout] ... | [INFO] [stdout] 492 | | | NonTerminal::Unary0 [INFO] [stdout] 493 | | | NonTerminal::Unary1 => true, [INFO] [stdout] | |_____________________________________^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:476:13 [INFO] [stdout] | [INFO] [stdout] 476 | / match kd { [INFO] [stdout] 477 | | NonTerminal::ExprL [INFO] [stdout] 478 | | | NonTerminal::ExprLast [INFO] [stdout] 479 | | | NonTerminal::ExprA [INFO] [stdout] ... | [INFO] [stdout] 494 | | _ => false, [INFO] [stdout] 495 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 476 ~ matches!(kd, NonTerminal::ExprL [INFO] [stdout] 477 + | NonTerminal::ExprLast [INFO] [stdout] 478 + | NonTerminal::ExprA [INFO] [stdout] 479 + | NonTerminal::Expr9 [INFO] [stdout] 480 + | NonTerminal::Expr8 [INFO] [stdout] 481 + | NonTerminal::Expr7 [INFO] [stdout] 482 + | NonTerminal::Expr6 [INFO] [stdout] 483 + | NonTerminal::Expr5 [INFO] [stdout] 484 + | NonTerminal::Expr4 [INFO] [stdout] 485 + | NonTerminal::Expr3 [INFO] [stdout] 486 + | NonTerminal::Expr2 [INFO] [stdout] 487 + | NonTerminal::Expr1 [INFO] [stdout] 488 + | NonTerminal::Expr0 [INFO] [stdout] 489 + | NonTerminal::ExprZ [INFO] [stdout] 490 + | NonTerminal::ExprP [INFO] [stdout] 491 + | NonTerminal::Unary0 [INFO] [stdout] 492 + | NonTerminal::Unary1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/syn/tree.rs:502:13 [INFO] [stdout] | [INFO] [stdout] 502 | / match kd { [INFO] [stdout] 503 | | Virtual::GenericExpression => true, [INFO] [stdout] 504 | | #[allow(unreachable_patterns)] [INFO] [stdout] 505 | | _ => false, [INFO] [stdout] 506 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/syn/tree.rs:501:31 [INFO] [stdout] | [INFO] [stdout] 501 | if let NodeKind::Virt(kd) = self.get_kind() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 502 | match kd { [INFO] [stdout] 503 | Virtual::GenericExpression => true, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:502:13 [INFO] [stdout] | [INFO] [stdout] 502 | / match kd { [INFO] [stdout] 503 | | Virtual::GenericExpression => true, [INFO] [stdout] 504 | | #[allow(unreachable_patterns)] [INFO] [stdout] 505 | | _ => false, [INFO] [stdout] 506 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 502 - match kd { [INFO] [stdout] 503 - Virtual::GenericExpression => true, [INFO] [stdout] 504 - #[allow(unreachable_patterns)] [INFO] [stdout] 505 - _ => false, [INFO] [stdout] 506 - } [INFO] [stdout] 502 + matches!(kd, Virtual::GenericExpression) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:516:9 [INFO] [stdout] | [INFO] [stdout] 516 | / match self.get_kind().to_owned().some_virt() { [INFO] [stdout] 517 | | Some(Virtual::LetBinding { [INFO] [stdout] 518 | | ident, [INFO] [stdout] 519 | | defined, [INFO] [stdout] ... | [INFO] [stdout] 529 | | _ => false, [INFO] [stdout] 530 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 516 ~ matches!(self.get_kind().to_owned().some_virt(), Some(Virtual::LetBinding { [INFO] [stdout] 517 + ident, [INFO] [stdout] 518 + defined, [INFO] [stdout] 519 + typed, [INFO] [stdout] 520 + generation, [INFO] [stdout] 521 + }) | Some(Virtual::ConstBinding { [INFO] [stdout] 522 + ident, [INFO] [stdout] 523 + defined, [INFO] [stdout] 524 + typed, [INFO] [stdout] 525 + generation, [INFO] [stdout] 526 + })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/syn/tree.rs:534:21 [INFO] [stdout] | [INFO] [stdout] 534 | operations: &[(usize, &dyn Fn(Box) -> Box)], [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: unneeded unit return type [INFO] [stdout] --> src/syn/tree.rs:535:6 [INFO] [stdout] | [INFO] [stdout] 535 | ) -> () { [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: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:253:15 [INFO] [stdout] | [INFO] [stdout] 253 | children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if !args.get(1).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.get(1).is_some()` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 91 | let res = tyck.assure_ints(res)?; [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 92 | res [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] 91 ~ [INFO] [stdout] 92 ~ tyck.assure_ints(res)? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/main.rs:107:10 [INFO] [stdout] | [INFO] [stdout] 107 | .fold(true, |left, right| left && right.scope == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `all(|right| right.scope == 0)` [INFO] [stdout] | [INFO] [stdout] = note: the `all` method is short circuiting and may change the program semantics if the iterator has side effects [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/syn/tree.rs:323:25 [INFO] [stdout] | [INFO] [stdout] 323 | pub fn try_apply(self: Box, transform: F) -> Result, AstPreprocessingError> [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/main.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | if global_only == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `!global_only` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:110:27 [INFO] [stdout] | [INFO] [stdout] 110 | Err(SemanticError(format!( [INFO] [stdout] | ___________________________^ [INFO] [stdout] 111 | | "error: compiler only support globals." [INFO] [stdout] 112 | | )))?; [INFO] [stdout] | |_________^ help: consider using `.to_string()`: `"error: compiler only support globals.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/syn/tree.rs:392:74 [INFO] [stdout] | [INFO] [stdout] 392 | pub fn tree_as_string_recursive(&self, text: &mut String, depth: u32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:404:36 [INFO] [stdout] | [INFO] [stdout] 404 | pub fn get_children(&self) -> &Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:407:48 [INFO] [stdout] | [INFO] [stdout] 407 | pub fn get_children_mut(&mut self) -> &mut Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/syn/tree.rs:415:24 [INFO] [stdout] | [INFO] [stdout] 415 | pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 415 - pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] 415 + pub fn follow_line(self: &Box, depth: usize) -> &Box { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:415:34 [INFO] [stdout] | [INFO] [stdout] 415 | pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&'a Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:415:66 [INFO] [stdout] | [INFO] [stdout] 415 | pub fn follow_line<'a>(self: &'a Box, depth: usize) -> &'a Box { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&'a Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:437:31 [INFO] [stdout] | [INFO] [stdout] 437 | pub fn follow_line2(self: &Box, depth: usize, direction: usize) -> &Box { [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/syn/tree.rs:437:78 [INFO] [stdout] | [INFO] [stdout] 437 | pub fn follow_line2(self: &Box, depth: usize, direction: usize) -> &Box { [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/syn/tree.rs:456:37 [INFO] [stdout] | [INFO] [stdout] 456 | pub fn unpeel_children(self) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/syn/tree.rs:461:13 [INFO] [stdout] | [INFO] [stdout] 461 | / match kd { [INFO] [stdout] 462 | | NonTerminal::OptrA [INFO] [stdout] 463 | | | NonTerminal::Optr4 [INFO] [stdout] 464 | | | NonTerminal::Optr3 [INFO] [stdout] ... | [INFO] [stdout] 468 | | _ => false, [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/syn/tree.rs:460:30 [INFO] [stdout] | [INFO] [stdout] 460 | if let NodeKind::Non(kd) = self.get_kind() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 461 | match kd { [INFO] [stdout] 462 | / NonTerminal::OptrA [INFO] [stdout] 463 | | | NonTerminal::Optr4 [INFO] [stdout] 464 | | | NonTerminal::Optr3 [INFO] [stdout] 465 | | | NonTerminal::Optr2 [INFO] [stdout] 466 | | | NonTerminal::Optr1 [INFO] [stdout] 467 | | | NonTerminal::Optr0 => true, [INFO] [stdout] | |____________________________________^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:461:13 [INFO] [stdout] | [INFO] [stdout] 461 | / match kd { [INFO] [stdout] 462 | | NonTerminal::OptrA [INFO] [stdout] 463 | | | NonTerminal::Optr4 [INFO] [stdout] 464 | | | NonTerminal::Optr3 [INFO] [stdout] ... | [INFO] [stdout] 468 | | _ => false, [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 461 ~ matches!(kd, NonTerminal::OptrA [INFO] [stdout] 462 + | NonTerminal::Optr4 [INFO] [stdout] 463 + | NonTerminal::Optr3 [INFO] [stdout] 464 + | NonTerminal::Optr2 [INFO] [stdout] 465 + | NonTerminal::Optr1 [INFO] [stdout] 466 + | NonTerminal::Optr0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/syn/tree.rs:476:13 [INFO] [stdout] | [INFO] [stdout] 476 | / match kd { [INFO] [stdout] 477 | | NonTerminal::ExprL [INFO] [stdout] 478 | | | NonTerminal::ExprLast [INFO] [stdout] 479 | | | NonTerminal::ExprA [INFO] [stdout] ... | [INFO] [stdout] 494 | | _ => false, [INFO] [stdout] 495 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/syn/tree.rs:475:30 [INFO] [stdout] | [INFO] [stdout] 475 | if let NodeKind::Non(kd) = self.get_kind() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 476 | match kd { [INFO] [stdout] 477 | / NonTerminal::ExprL [INFO] [stdout] 478 | | | NonTerminal::ExprLast [INFO] [stdout] 479 | | | NonTerminal::ExprA [INFO] [stdout] 480 | | | NonTerminal::Expr9 [INFO] [stdout] ... | [INFO] [stdout] 492 | | | NonTerminal::Unary0 [INFO] [stdout] 493 | | | NonTerminal::Unary1 => true, [INFO] [stdout] | |_____________________________________^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:476:13 [INFO] [stdout] | [INFO] [stdout] 476 | / match kd { [INFO] [stdout] 477 | | NonTerminal::ExprL [INFO] [stdout] 478 | | | NonTerminal::ExprLast [INFO] [stdout] 479 | | | NonTerminal::ExprA [INFO] [stdout] ... | [INFO] [stdout] 494 | | _ => false, [INFO] [stdout] 495 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 476 ~ matches!(kd, NonTerminal::ExprL [INFO] [stdout] 477 + | NonTerminal::ExprLast [INFO] [stdout] 478 + | NonTerminal::ExprA [INFO] [stdout] 479 + | NonTerminal::Expr9 [INFO] [stdout] 480 + | NonTerminal::Expr8 [INFO] [stdout] 481 + | NonTerminal::Expr7 [INFO] [stdout] 482 + | NonTerminal::Expr6 [INFO] [stdout] 483 + | NonTerminal::Expr5 [INFO] [stdout] 484 + | NonTerminal::Expr4 [INFO] [stdout] 485 + | NonTerminal::Expr3 [INFO] [stdout] 486 + | NonTerminal::Expr2 [INFO] [stdout] 487 + | NonTerminal::Expr1 [INFO] [stdout] 488 + | NonTerminal::Expr0 [INFO] [stdout] 489 + | NonTerminal::ExprZ [INFO] [stdout] 490 + | NonTerminal::ExprP [INFO] [stdout] 491 + | NonTerminal::Unary0 [INFO] [stdout] 492 + | NonTerminal::Unary1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/syn/tree.rs:502:13 [INFO] [stdout] | [INFO] [stdout] 502 | / match kd { [INFO] [stdout] 503 | | Virtual::GenericExpression => true, [INFO] [stdout] 504 | | #[allow(unreachable_patterns)] [INFO] [stdout] 505 | | _ => false, [INFO] [stdout] 506 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/syn/tree.rs:501:31 [INFO] [stdout] | [INFO] [stdout] 501 | if let NodeKind::Virt(kd) = self.get_kind() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 502 | match kd { [INFO] [stdout] 503 | Virtual::GenericExpression => true, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:502:13 [INFO] [stdout] | [INFO] [stdout] 502 | / match kd { [INFO] [stdout] 503 | | Virtual::GenericExpression => true, [INFO] [stdout] 504 | | #[allow(unreachable_patterns)] [INFO] [stdout] 505 | | _ => false, [INFO] [stdout] 506 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 502 - match kd { [INFO] [stdout] 503 - Virtual::GenericExpression => true, [INFO] [stdout] 504 - #[allow(unreachable_patterns)] [INFO] [stdout] 505 - _ => false, [INFO] [stdout] 506 - } [INFO] [stdout] 502 + matches!(kd, Virtual::GenericExpression) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/syn/tree.rs:516:9 [INFO] [stdout] | [INFO] [stdout] 516 | / match self.get_kind().to_owned().some_virt() { [INFO] [stdout] 517 | | Some(Virtual::LetBinding { [INFO] [stdout] 518 | | ident, [INFO] [stdout] 519 | | defined, [INFO] [stdout] ... | [INFO] [stdout] 529 | | _ => false, [INFO] [stdout] 530 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 516 ~ matches!(self.get_kind().to_owned().some_virt(), Some(Virtual::LetBinding { [INFO] [stdout] 517 + ident, [INFO] [stdout] 518 + defined, [INFO] [stdout] 519 + typed, [INFO] [stdout] 520 + generation, [INFO] [stdout] 521 + }) | Some(Virtual::ConstBinding { [INFO] [stdout] 522 + ident, [INFO] [stdout] 523 + defined, [INFO] [stdout] 524 + typed, [INFO] [stdout] 525 + generation, [INFO] [stdout] 526 + })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/syn/tree.rs:534:21 [INFO] [stdout] | [INFO] [stdout] 534 | operations: &[(usize, &dyn Fn(Box) -> Box)], [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: unneeded unit return type [INFO] [stdout] --> src/syn/tree.rs:535:6 [INFO] [stdout] | [INFO] [stdout] 535 | ) -> () { [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if !args.get(1).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.get(1).is_some()` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 91 | let res = tyck.assure_ints(res)?; [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 92 | res [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] 91 ~ [INFO] [stdout] 92 ~ tyck.assure_ints(res)? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/main.rs:107:10 [INFO] [stdout] | [INFO] [stdout] 107 | .fold(true, |left, right| left && right.scope == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `all(|right| right.scope == 0)` [INFO] [stdout] | [INFO] [stdout] = note: the `all` method is short circuiting and may change the program semantics if the iterator has side effects [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/main.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | if global_only == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `!global_only` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:110:27 [INFO] [stdout] | [INFO] [stdout] 110 | Err(SemanticError(format!( [INFO] [stdout] | ___________________________^ [INFO] [stdout] 111 | | "error: compiler only support globals." [INFO] [stdout] 112 | | )))?; [INFO] [stdout] | |_________^ help: consider using `.to_string()`: `"error: compiler only support globals.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.17s [INFO] running `Command { std: "docker" "inspect" "0b97e7a6b4f188efa1d1276b3bf6bf9aad62e95f93b458fa6509814e29e1046f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0b97e7a6b4f188efa1d1276b3bf6bf9aad62e95f93b458fa6509814e29e1046f", kill_on_drop: false }` [INFO] [stdout] 0b97e7a6b4f188efa1d1276b3bf6bf9aad62e95f93b458fa6509814e29e1046f