[INFO] cloning repository https://github.com/dnguyen00/pgl-test [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dnguyen00/pgl-test" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdnguyen00%2Fpgl-test", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdnguyen00%2Fpgl-test'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4531ba7dd26a831a7ed5d8dbf9a7367695f46cec [INFO] linting dnguyen00/pgl-test against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdnguyen00%2Fpgl-test" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/dnguyen00/pgl-test [INFO] finished tweaking git repo https://github.com/dnguyen00/pgl-test [INFO] tweaked toml for git repo https://github.com/dnguyen00/pgl-test written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/dnguyen00/pgl-test 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/dnguyen00/pgl-test 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-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ae2951ca5b6875c10bce12102b79bcebffea5884e3acf5511dfa13997c687cad [INFO] running `Command { std: "docker" "start" "-a" "ae2951ca5b6875c10bce12102b79bcebffea5884e3acf5511dfa13997c687cad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ae2951ca5b6875c10bce12102b79bcebffea5884e3acf5511dfa13997c687cad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ae2951ca5b6875c10bce12102b79bcebffea5884e3acf5511dfa13997c687cad", kill_on_drop: false }` [INFO] [stdout] ae2951ca5b6875c10bce12102b79bcebffea5884e3acf5511dfa13997c687cad [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 794887f87bbc66a7903e153955d6fd0b247ccc7a0a82ca65437c7d0f237c558a [INFO] running `Command { std: "docker" "start" "-a" "794887f87bbc66a7903e153955d6fd0b247ccc7a0a82ca65437c7d0f237c558a", kill_on_drop: false }` [INFO] [stderr] Checking pgl-test v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | return Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `to_lex` [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/lexer.rs:76:54 [INFO] [stdout] | [INFO] [stdout] 76 | return Some(Lexemes { token: *k, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:90:82 [INFO] [stdout] | [INFO] [stdout] 90 | ... return Some(Lexemes { token: *pairs.get(1).unwrap(), lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:94:58 [INFO] [stdout] | [INFO] [stdout] 94 | return Some(Lexemes { token: *k, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:99:50 [INFO] [stdout] | [INFO] [stdout] 99 | return Some(Lexemes { token: *k, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:109:64 [INFO] [stdout] | [INFO] [stdout] 109 | ... return Some(Lexemes { token: l_tokens, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:129:72 [INFO] [stdout] | [INFO] [stdout] 129 | ... if is_float { return Some(Lexemes { token: Tokens::FLOATS, lexeme: lexeme, position: [starting_position, self.position as u32... [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:130:60 [INFO] [stdout] | [INFO] [stdout] 130 | return Some(Lexemes { token: Tokens::INTEGERS, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:142:62 [INFO] [stdout] | [INFO] [stdout] 142 | ... return Some(Lexemes { token: Tokens::IDENTIFIER, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:146:85 [INFO] [stdout] | [INFO] [stdout] 146 | ... let current_token: Option = Some(Lexemes { token: Tokens::UNKNOWN, lexeme: lexeme, position: [starting_position, sel... [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/syntax.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | return Syntax { lexer: lexer }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lexer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `lexer::Lexer` and `syntax::Syntax` [INFO] [stdout] --> src/tests.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::{lexer::Lexer, syntax::Syntax}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | return Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `to_lex` [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/lexer.rs:76:54 [INFO] [stdout] | [INFO] [stdout] 76 | return Some(Lexemes { token: *k, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:90:82 [INFO] [stdout] | [INFO] [stdout] 90 | ... return Some(Lexemes { token: *pairs.get(1).unwrap(), lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:94:58 [INFO] [stdout] | [INFO] [stdout] 94 | return Some(Lexemes { token: *k, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:99:50 [INFO] [stdout] | [INFO] [stdout] 99 | return Some(Lexemes { token: *k, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:109:64 [INFO] [stdout] | [INFO] [stdout] 109 | ... return Some(Lexemes { token: l_tokens, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:129:72 [INFO] [stdout] | [INFO] [stdout] 129 | ... if is_float { return Some(Lexemes { token: Tokens::FLOATS, lexeme: lexeme, position: [starting_position, self.position as u32... [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:130:60 [INFO] [stdout] | [INFO] [stdout] 130 | return Some(Lexemes { token: Tokens::INTEGERS, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:142:62 [INFO] [stdout] | [INFO] [stdout] 142 | ... return Some(Lexemes { token: Tokens::IDENTIFIER, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lexer.rs:146:85 [INFO] [stdout] | [INFO] [stdout] 146 | ... let current_token: Option = Some(Lexemes { token: Tokens::UNKNOWN, lexeme: lexeme, position: [starting_position, sel... [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `lexeme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/syntax.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | return Syntax { lexer: lexer }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lexer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | return Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 40 - return Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] 40 + Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return self.to_lex.chars().nth(self.position as usize + 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return self.to_lex.chars().nth(self.position as usize + 1); [INFO] [stdout] 44 + self.to_lex.chars().nth(self.position as usize + 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] 48 + self.to_lex.chars().nth(self.position as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 53 - return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] 53 + self.to_lex.chars().nth(self.position as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:74:20 [INFO] [stdout] | [INFO] [stdout] 74 | if !self.peek_next_char().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peek_next_char().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | return current_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 147 - return current_token; [INFO] [stdout] 147 + current_token [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lexer.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | if current_char == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `current_char.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `pairs.get(0)` [INFO] [stdout] --> src/lexer.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | if pairs.get(0).unwrap() == k { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `pairs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lexer.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / if lexeme.chars().nth(0) == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(0) { [INFO] [stdout] 105 | | if self.peek_next_char() == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(1) { [INFO] [stdout] 106 | | current_char = self.get_next_char(); [INFO] [stdout] 107 | | lexeme.push(current_char.unwrap()); [INFO] [stdout] ... | [INFO] [stdout] 111 | | } [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] 104 ~ if lexeme.chars().nth(0) == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(0) [INFO] [stdout] 105 ~ && self.peek_next_char() == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(1) { [INFO] [stdout] 106 | current_char = self.get_next_char(); [INFO] [stdout] ... [INFO] [stdout] 109 | return Some(Lexemes { token: l_tokens, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] 110 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | return next_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return next_token; [INFO] [stdout] 157 + next_token [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lexer.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 152 | if next_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `next_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `next_token.clone().unwrap().position.get(0)` [INFO] [stdout] --> src/lexer.rs:156:90 [INFO] [stdout] | [INFO] [stdout] 156 | ...() as i64 - *next_token.clone().unwrap().position.get(0).unwrap() as i64 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_token.clone().unwrap().position.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lexer.rs:163:16 [INFO] [stdout] | [INFO] [stdout] 163 | if lexeme == None { break; } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `lexeme.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADD` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | ADD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Add` [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: name `SUB` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | SUB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Sub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MUL` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | MUL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DIV` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | DIV, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Div` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MOD` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | MOD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mod` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADDASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | ADDASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Addassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SUBASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | SUBASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Subassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MULASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | MULASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Mulassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DIVASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | DIVASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Divassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MODASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | MODASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Modassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LPARENTHESIS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | LPARENTHESIS, [INFO] [stdout] | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Lparenthesis` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RPARENTHESIS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | RPARENTHESIS, [INFO] [stdout] | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Rparenthesis` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EQUALS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | EQUALS, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Equals` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LESS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | LESS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Less` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LESSEQ` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | LESSEQ, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Lesseq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GREAT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | GREAT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Great` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GREATEQ` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | GREATEQ, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Greateq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IDENTIFIER` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | IDENTIFIER, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Identifier` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INTEGERS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | INTEGERS, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Integers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FLOATS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | FLOATS, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Floats` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SEMICOLON` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | SEMICOLON, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `COMMA` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | COMMA, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Comma` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LBRACKET` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | LBRACKET, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Lbracket` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RBRACKET` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | RBRACKET, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Rbracket` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EQUALITY` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | EQUALITY, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Equality` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INEQUALITY` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | INEQUALITY, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Inequality` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNKNOWN` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | UNKNOWN [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | return Syntax { lexer: lexer }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 10 - return Syntax { lexer: lexer }; [INFO] [stdout] 10 + Syntax { lexer: lexer } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 34 - return true; [INFO] [stdout] 34 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | return Some(Grammar::STMTLIST); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 62 - return Some(Grammar::STMTLIST); [INFO] [stdout] 62 + Some(Grammar::STMTLIST) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 102 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 102 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 153 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 153 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:129:12 [INFO] [stdout] | [INFO] [stdout] 129 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / if self.parse_stmt() == Some(Grammar::STMT) { [INFO] [stdout] 140 | | if self.lexer.peek_token().is_some() { [INFO] [stdout] 141 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [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] 139 ~ if self.parse_stmt() == Some(Grammar::STMT) [INFO] [stdout] 140 ~ && self.lexer.peek_token().is_some() { [INFO] [stdout] 141 | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] 143 | } [INFO] [stdout] 144 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:140:13 [INFO] [stdout] | [INFO] [stdout] 140 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 141 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [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] 140 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 141 ~ && self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | return Some(Grammar::ASSIGN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 173 - return Some(Grammar::ASSIGN); [INFO] [stdout] 173 + Some(Grammar::ASSIGN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:204:9 [INFO] [stdout] | [INFO] [stdout] 204 | return Some(Grammar::DECLARE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 204 - return Some(Grammar::DECLARE); [INFO] [stdout] 204 + Some(Grammar::DECLARE) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:191:16 [INFO] [stdout] | [INFO] [stdout] 191 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:275:9 [INFO] [stdout] | [INFO] [stdout] 275 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 275 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 275 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:218:12 [INFO] [stdout] | [INFO] [stdout] 218 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:231:12 [INFO] [stdout] | [INFO] [stdout] 231 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | / if self.parse_stmt() == Some(Grammar::STMT) { [INFO] [stdout] 242 | | if self.lexer.peek_token().is_some() { [INFO] [stdout] 243 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] ... | [INFO] [stdout] 247 | | } [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] 241 ~ if self.parse_stmt() == Some(Grammar::STMT) [INFO] [stdout] 242 ~ && self.lexer.peek_token().is_some() { [INFO] [stdout] 243 | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 245 | } [INFO] [stdout] 246 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:242:13 [INFO] [stdout] | [INFO] [stdout] 242 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 243 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 245 | | } [INFO] [stdout] 246 | | } [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] 242 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 243 ~ && self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 245 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:255:9 [INFO] [stdout] | [INFO] [stdout] 255 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 256 | | if self.lexer.peek_token().unwrap().token == Tokens::IDENTIFIER && self.lexer.peek_token().unwrap().lexeme == "else" { [INFO] [stdout] 257 | | self.lexer.next_token(); [INFO] [stdout] 258 | | let original_lexer = self.lexer.clone(); [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [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] 255 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 256 ~ && self.lexer.peek_token().unwrap().token == Tokens::IDENTIFIER && self.lexer.peek_token().unwrap().lexeme == "else" { [INFO] [stdout] 257 | self.lexer.next_token(); [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] 272 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:259:17 [INFO] [stdout] | [INFO] [stdout] 259 | / if self.parse_stmt() == Some(Grammar::STMT) { [INFO] [stdout] 260 | | if self.lexer.peek_token().is_some() { [INFO] [stdout] 261 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] ... | [INFO] [stdout] 265 | | } [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] 259 ~ if self.parse_stmt() == Some(Grammar::STMT) [INFO] [stdout] 260 ~ && self.lexer.peek_token().is_some() { [INFO] [stdout] 261 | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 263 | } [INFO] [stdout] 264 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:260:21 [INFO] [stdout] | [INFO] [stdout] 260 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 261 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 263 | | } [INFO] [stdout] 264 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 261 ~ && self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:299:9 [INFO] [stdout] | [INFO] [stdout] 299 | return Some(Grammar::BLOCK); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 299 - return Some(Grammar::BLOCK); [INFO] [stdout] 299 + Some(Grammar::BLOCK) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:279:12 [INFO] [stdout] | [INFO] [stdout] 279 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:291:12 [INFO] [stdout] | [INFO] [stdout] 291 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | return Some(Grammar::BOOLEXPRESSION); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 339 - return Some(Grammar::BOOLEXPRESSION); [INFO] [stdout] 339 + Some(Grammar::BOOLEXPRESSION) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:307:12 [INFO] [stdout] | [INFO] [stdout] 307 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:313:16 [INFO] [stdout] | [INFO] [stdout] 313 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:379:9 [INFO] [stdout] | [INFO] [stdout] 379 | return Some(Grammar::BTERM); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 379 - return Some(Grammar::BTERM); [INFO] [stdout] 379 + Some(Grammar::BTERM) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:347:12 [INFO] [stdout] | [INFO] [stdout] 347 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:353:16 [INFO] [stdout] | [INFO] [stdout] 353 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:419:9 [INFO] [stdout] | [INFO] [stdout] 419 | return Some(Grammar::BAND); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 419 - return Some(Grammar::BAND); [INFO] [stdout] 419 + Some(Grammar::BAND) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:387:12 [INFO] [stdout] | [INFO] [stdout] 387 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:393:16 [INFO] [stdout] | [INFO] [stdout] 393 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | return Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 40 - return Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] 40 + Lexer { to_lex: to_lex, position: 0, tokens_chars: tokens} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:459:9 [INFO] [stdout] | [INFO] [stdout] 459 | return Some(Grammar::BOR); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 459 - return Some(Grammar::BOR); [INFO] [stdout] 459 + Some(Grammar::BOR) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:427:12 [INFO] [stdout] | [INFO] [stdout] 427 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return self.to_lex.chars().nth(self.position as usize + 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return self.to_lex.chars().nth(self.position as usize + 1); [INFO] [stdout] 44 + self.to_lex.chars().nth(self.position as usize + 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:433:16 [INFO] [stdout] | [INFO] [stdout] 433 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] 48 + self.to_lex.chars().nth(self.position as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 53 - return self.to_lex.chars().nth(self.position as usize); [INFO] [stdout] 53 + self.to_lex.chars().nth(self.position as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:499:9 [INFO] [stdout] | [INFO] [stdout] 499 | return Some(Grammar::EXPRESSION); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 499 - return Some(Grammar::EXPRESSION); [INFO] [stdout] 499 + Some(Grammar::EXPRESSION) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:74:20 [INFO] [stdout] | [INFO] [stdout] 74 | if !self.peek_next_char().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peek_next_char().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:467:12 [INFO] [stdout] | [INFO] [stdout] 467 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | return current_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 147 - return current_token; [INFO] [stdout] 147 + current_token [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:473:16 [INFO] [stdout] | [INFO] [stdout] 473 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lexer.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | if current_char == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `current_char.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:539:9 [INFO] [stdout] | [INFO] [stdout] 539 | return Some(Grammar::TERM); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 539 - return Some(Grammar::TERM); [INFO] [stdout] 539 + Some(Grammar::TERM) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:507:12 [INFO] [stdout] | [INFO] [stdout] 507 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `pairs.get(0)` [INFO] [stdout] --> src/lexer.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | if pairs.get(0).unwrap() == k { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `pairs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:513:16 [INFO] [stdout] | [INFO] [stdout] 513 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:572:9 [INFO] [stdout] | [INFO] [stdout] 572 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 572 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 572 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:543:12 [INFO] [stdout] | [INFO] [stdout] 543 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lexer.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / if lexeme.chars().nth(0) == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(0) { [INFO] [stdout] 105 | | if self.peek_next_char() == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(1) { [INFO] [stdout] 106 | | current_char = self.get_next_char(); [INFO] [stdout] 107 | | lexeme.push(current_char.unwrap()); [INFO] [stdout] ... | [INFO] [stdout] 111 | | } [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] 104 ~ if lexeme.chars().nth(0) == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(0) [INFO] [stdout] 105 ~ && self.peek_next_char() == self.tokens_chars.get(&l_tokens).unwrap().chars().nth(1) { [INFO] [stdout] 106 | current_char = self.get_next_char(); [INFO] [stdout] ... [INFO] [stdout] 109 | return Some(Lexemes { token: l_tokens, lexeme: lexeme, position: [starting_position, self.position as u32 - 1] }); [INFO] [stdout] 110 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STMTLIST` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | STMTLIST, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Stmtlist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STMT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:579:5 [INFO] [stdout] | [INFO] [stdout] 579 | STMT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Stmt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WHILESTATEMENT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:580:5 [INFO] [stdout] | [INFO] [stdout] 580 | WHILESTATEMENT, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Whilestatement` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IFSTATEMENT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:581:5 [INFO] [stdout] | [INFO] [stdout] 581 | IFSTATEMENT, [INFO] [stdout] | ^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Ifstatement` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BLOCK` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:582:5 [INFO] [stdout] | [INFO] [stdout] 582 | BLOCK, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ASSIGN` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:583:5 [INFO] [stdout] | [INFO] [stdout] 583 | ASSIGN, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Assign` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DECLARE` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:584:5 [INFO] [stdout] | [INFO] [stdout] 584 | DECLARE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Declare` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EXPRESSION` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:585:5 [INFO] [stdout] | [INFO] [stdout] 585 | EXPRESSION, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Expression` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TERM` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:586:5 [INFO] [stdout] | [INFO] [stdout] 586 | TERM, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Term` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FACT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:587:5 [INFO] [stdout] | [INFO] [stdout] 587 | FACT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Fact` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BOOLEXPRESSION` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:588:5 [INFO] [stdout] | [INFO] [stdout] 588 | BOOLEXPRESSION, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Boolexpression` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BTERM` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:589:5 [INFO] [stdout] | [INFO] [stdout] 589 | BTERM, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bterm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BAND` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:590:5 [INFO] [stdout] | [INFO] [stdout] 590 | BAND, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Band` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BOR` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:591:5 [INFO] [stdout] | [INFO] [stdout] 591 | BOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNKNOWN` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:592:5 [INFO] [stdout] | [INFO] [stdout] 592 | UNKNOWN, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | return next_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return next_token; [INFO] [stdout] 157 + next_token [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tests.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / mod tests { [INFO] [stdout] 2 | | use crate::{lexer::Lexer, syntax::Syntax}; [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | #[test] [INFO] [stdout] ... | [INFO] [stdout] 98 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lexer.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 152 | if next_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `next_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `next_token.clone().unwrap().position.get(0)` [INFO] [stdout] --> src/lexer.rs:156:90 [INFO] [stdout] | [INFO] [stdout] 156 | ...() as i64 - *next_token.clone().unwrap().position.get(0).unwrap() as i64 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_token.clone().unwrap().position.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lexer.rs:163:16 [INFO] [stdout] | [INFO] [stdout] 163 | if lexeme == None { break; } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `lexeme.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:12:24 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(to_lex: &str) -> Lexer { [INFO] [stdout] | ^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(to_lex: &str) -> Lexer<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADD` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | ADD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Add` [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: name `SUB` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | SUB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Sub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MUL` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | MUL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DIV` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | DIV, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Div` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MOD` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | MOD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mod` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADDASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | ADDASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Addassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SUBASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | SUBASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Subassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MULASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | MULASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Mulassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DIVASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | DIVASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Divassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MODASSIGNMENT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | MODASSIGNMENT, [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Modassignment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LPARENTHESIS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | LPARENTHESIS, [INFO] [stdout] | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Lparenthesis` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RPARENTHESIS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | RPARENTHESIS, [INFO] [stdout] | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Rparenthesis` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EQUALS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | EQUALS, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Equals` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LESS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | LESS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Less` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LESSEQ` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | LESSEQ, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Lesseq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GREAT` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | GREAT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Great` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GREATEQ` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | GREATEQ, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Greateq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IDENTIFIER` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | IDENTIFIER, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Identifier` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INTEGERS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | INTEGERS, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Integers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FLOATS` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | FLOATS, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Floats` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SEMICOLON` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | SEMICOLON, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `COMMA` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | COMMA, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Comma` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LBRACKET` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | LBRACKET, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Lbracket` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RBRACKET` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | RBRACKET, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Rbracket` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EQUALITY` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | EQUALITY, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Equality` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INEQUALITY` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | INEQUALITY, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Inequality` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNKNOWN` contains a capitalized acronym [INFO] [stdout] --> src/tokens.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | UNKNOWN [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | return Syntax { lexer: lexer }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 10 - return Syntax { lexer: lexer }; [INFO] [stdout] 10 + Syntax { lexer: lexer } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 34 - return true; [INFO] [stdout] 34 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | return Some(Grammar::STMTLIST); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 62 - return Some(Grammar::STMTLIST); [INFO] [stdout] 62 + Some(Grammar::STMTLIST) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 102 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 102 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 153 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 153 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:129:12 [INFO] [stdout] | [INFO] [stdout] 129 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / if self.parse_stmt() == Some(Grammar::STMT) { [INFO] [stdout] 140 | | if self.lexer.peek_token().is_some() { [INFO] [stdout] 141 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [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] 139 ~ if self.parse_stmt() == Some(Grammar::STMT) [INFO] [stdout] 140 ~ && self.lexer.peek_token().is_some() { [INFO] [stdout] 141 | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] 143 | } [INFO] [stdout] 144 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:140:13 [INFO] [stdout] | [INFO] [stdout] 140 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 141 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [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] 140 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 141 ~ && self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 142 | return Some(Grammar::WHILESTATEMENT); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | return Some(Grammar::ASSIGN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 173 - return Some(Grammar::ASSIGN); [INFO] [stdout] 173 + Some(Grammar::ASSIGN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:204:9 [INFO] [stdout] | [INFO] [stdout] 204 | return Some(Grammar::DECLARE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 204 - return Some(Grammar::DECLARE); [INFO] [stdout] 204 + Some(Grammar::DECLARE) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:191:16 [INFO] [stdout] | [INFO] [stdout] 191 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:275:9 [INFO] [stdout] | [INFO] [stdout] 275 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 275 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 275 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:218:12 [INFO] [stdout] | [INFO] [stdout] 218 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:231:12 [INFO] [stdout] | [INFO] [stdout] 231 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | / if self.parse_stmt() == Some(Grammar::STMT) { [INFO] [stdout] 242 | | if self.lexer.peek_token().is_some() { [INFO] [stdout] 243 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] ... | [INFO] [stdout] 247 | | } [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] 241 ~ if self.parse_stmt() == Some(Grammar::STMT) [INFO] [stdout] 242 ~ && self.lexer.peek_token().is_some() { [INFO] [stdout] 243 | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 245 | } [INFO] [stdout] 246 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:242:13 [INFO] [stdout] | [INFO] [stdout] 242 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 243 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 245 | | } [INFO] [stdout] 246 | | } [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] 242 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 243 ~ && self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 244 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 245 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:255:9 [INFO] [stdout] | [INFO] [stdout] 255 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 256 | | if self.lexer.peek_token().unwrap().token == Tokens::IDENTIFIER && self.lexer.peek_token().unwrap().lexeme == "else" { [INFO] [stdout] 257 | | self.lexer.next_token(); [INFO] [stdout] 258 | | let original_lexer = self.lexer.clone(); [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [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] 255 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 256 ~ && self.lexer.peek_token().unwrap().token == Tokens::IDENTIFIER && self.lexer.peek_token().unwrap().lexeme == "else" { [INFO] [stdout] 257 | self.lexer.next_token(); [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] 272 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:259:17 [INFO] [stdout] | [INFO] [stdout] 259 | / if self.parse_stmt() == Some(Grammar::STMT) { [INFO] [stdout] 260 | | if self.lexer.peek_token().is_some() { [INFO] [stdout] 261 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] ... | [INFO] [stdout] 265 | | } [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] 259 ~ if self.parse_stmt() == Some(Grammar::STMT) [INFO] [stdout] 260 ~ && self.lexer.peek_token().is_some() { [INFO] [stdout] 261 | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 263 | } [INFO] [stdout] 264 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/syntax.rs:260:21 [INFO] [stdout] | [INFO] [stdout] 260 | / if self.lexer.peek_token().is_some() { [INFO] [stdout] 261 | | if self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 263 | | } [INFO] [stdout] 264 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if self.lexer.peek_token().is_some() [INFO] [stdout] 261 ~ && self.lexer.next_token().unwrap().token == Tokens::SEMICOLON { [INFO] [stdout] 262 | return Some(Grammar::IFSTATEMENT); [INFO] [stdout] 263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:299:9 [INFO] [stdout] | [INFO] [stdout] 299 | return Some(Grammar::BLOCK); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 299 - return Some(Grammar::BLOCK); [INFO] [stdout] 299 + Some(Grammar::BLOCK) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:279:12 [INFO] [stdout] | [INFO] [stdout] 279 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:291:12 [INFO] [stdout] | [INFO] [stdout] 291 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | return Some(Grammar::BOOLEXPRESSION); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 339 - return Some(Grammar::BOOLEXPRESSION); [INFO] [stdout] 339 + Some(Grammar::BOOLEXPRESSION) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:307:12 [INFO] [stdout] | [INFO] [stdout] 307 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:313:16 [INFO] [stdout] | [INFO] [stdout] 313 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:379:9 [INFO] [stdout] | [INFO] [stdout] 379 | return Some(Grammar::BTERM); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 379 - return Some(Grammar::BTERM); [INFO] [stdout] 379 + Some(Grammar::BTERM) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:347:12 [INFO] [stdout] | [INFO] [stdout] 347 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:353:16 [INFO] [stdout] | [INFO] [stdout] 353 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:419:9 [INFO] [stdout] | [INFO] [stdout] 419 | return Some(Grammar::BAND); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 419 - return Some(Grammar::BAND); [INFO] [stdout] 419 + Some(Grammar::BAND) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:387:12 [INFO] [stdout] | [INFO] [stdout] 387 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:393:16 [INFO] [stdout] | [INFO] [stdout] 393 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:459:9 [INFO] [stdout] | [INFO] [stdout] 459 | return Some(Grammar::BOR); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 459 - return Some(Grammar::BOR); [INFO] [stdout] 459 + Some(Grammar::BOR) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:427:12 [INFO] [stdout] | [INFO] [stdout] 427 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:433:16 [INFO] [stdout] | [INFO] [stdout] 433 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:499:9 [INFO] [stdout] | [INFO] [stdout] 499 | return Some(Grammar::EXPRESSION); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 499 - return Some(Grammar::EXPRESSION); [INFO] [stdout] 499 + Some(Grammar::EXPRESSION) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:467:12 [INFO] [stdout] | [INFO] [stdout] 467 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:473:16 [INFO] [stdout] | [INFO] [stdout] 473 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:539:9 [INFO] [stdout] | [INFO] [stdout] 539 | return Some(Grammar::TERM); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 539 - return Some(Grammar::TERM); [INFO] [stdout] 539 + Some(Grammar::TERM) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:507:12 [INFO] [stdout] | [INFO] [stdout] 507 | if self.lexer.peek_token().clone() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().clone().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:513:16 [INFO] [stdout] | [INFO] [stdout] 513 | if peek_token == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `peek_token.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/syntax.rs:572:9 [INFO] [stdout] | [INFO] [stdout] 572 | return Some(Grammar::UNKNOWN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 572 - return Some(Grammar::UNKNOWN); [INFO] [stdout] 572 + Some(Grammar::UNKNOWN) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/syntax.rs:543:12 [INFO] [stdout] | [INFO] [stdout] 543 | if self.lexer.peek_token() == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.lexer.peek_token().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STMTLIST` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | STMTLIST, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Stmtlist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STMT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:579:5 [INFO] [stdout] | [INFO] [stdout] 579 | STMT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Stmt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WHILESTATEMENT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:580:5 [INFO] [stdout] | [INFO] [stdout] 580 | WHILESTATEMENT, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Whilestatement` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IFSTATEMENT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:581:5 [INFO] [stdout] | [INFO] [stdout] 581 | IFSTATEMENT, [INFO] [stdout] | ^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Ifstatement` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BLOCK` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:582:5 [INFO] [stdout] | [INFO] [stdout] 582 | BLOCK, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ASSIGN` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:583:5 [INFO] [stdout] | [INFO] [stdout] 583 | ASSIGN, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Assign` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DECLARE` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:584:5 [INFO] [stdout] | [INFO] [stdout] 584 | DECLARE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Declare` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EXPRESSION` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:585:5 [INFO] [stdout] | [INFO] [stdout] 585 | EXPRESSION, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Expression` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TERM` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:586:5 [INFO] [stdout] | [INFO] [stdout] 586 | TERM, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Term` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FACT` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:587:5 [INFO] [stdout] | [INFO] [stdout] 587 | FACT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Fact` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BOOLEXPRESSION` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:588:5 [INFO] [stdout] | [INFO] [stdout] 588 | BOOLEXPRESSION, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Boolexpression` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BTERM` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:589:5 [INFO] [stdout] | [INFO] [stdout] 589 | BTERM, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bterm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BAND` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:590:5 [INFO] [stdout] | [INFO] [stdout] 590 | BAND, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Band` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BOR` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:591:5 [INFO] [stdout] | [INFO] [stdout] 591 | BOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNKNOWN` contains a capitalized acronym [INFO] [stdout] --> src/syntax.rs:592:5 [INFO] [stdout] | [INFO] [stdout] 592 | UNKNOWN, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tests.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / mod tests { [INFO] [stdout] 2 | | use crate::{lexer::Lexer, syntax::Syntax}; [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | #[test] [INFO] [stdout] ... | [INFO] [stdout] 98 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 9 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 9 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 17 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 17 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 25 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 25 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 33 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 33 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 41 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 41 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 49 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 49 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 72 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 72 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 80 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 80 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 88 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 88 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/tests.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | assert_eq!(syntax.check_validity(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 96 - assert_eq!(syntax.check_validity(), true); [INFO] [stdout] 96 + assert!(syntax.check_validity()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:12:24 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(to_lex: &str) -> Lexer { [INFO] [stdout] | ^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(to_lex: &str) -> Lexer<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.32s [INFO] running `Command { std: "docker" "inspect" "794887f87bbc66a7903e153955d6fd0b247ccc7a0a82ca65437c7d0f237c558a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "794887f87bbc66a7903e153955d6fd0b247ccc7a0a82ca65437c7d0f237c558a", kill_on_drop: false }` [INFO] [stdout] 794887f87bbc66a7903e153955d6fd0b247ccc7a0a82ca65437c7d0f237c558a