[INFO] fetching crate whiley_file 0.1.0... [INFO] linting whiley_file-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate whiley_file 0.1.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate whiley_file 0.1.0 [INFO] finished tweaking crates.io crate whiley_file 0.1.0 [INFO] tweaked toml for crates.io crate whiley_file 0.1.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate whiley_file 0.1.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 1 package to latest compatible version [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded syntactic_heap v0.3.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 82b50ef1e3f9560b1d2fe43b20d30ddff9f28109cbbc32a1df10097e3ee42a46 [INFO] running `Command { std: "docker" "start" "-a" "82b50ef1e3f9560b1d2fe43b20d30ddff9f28109cbbc32a1df10097e3ee42a46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "82b50ef1e3f9560b1d2fe43b20d30ddff9f28109cbbc32a1df10097e3ee42a46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82b50ef1e3f9560b1d2fe43b20d30ddff9f28109cbbc32a1df10097e3ee42a46", kill_on_drop: false }` [INFO] [stdout] 82b50ef1e3f9560b1d2fe43b20d30ddff9f28109cbbc32a1df10097e3ee42a46 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] cc70805ab0e348db340b611d047d28c301b11d137ba6a19bfc172cc1c6bc7f6e [INFO] running `Command { std: "docker" "start" "-a" "cc70805ab0e348db340b611d047d28c301b11d137ba6a19bfc172cc1c6bc7f6e", kill_on_drop: false }` [INFO] [stderr] Checking syntactic_heap v0.3.1 [INFO] [stderr] Checking whiley_file v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `ast` [INFO] [stdout] --> src/ast.rs:218:15 [INFO] [stdout] | [INFO] [stdout] 218 | pub fn is(ast: &AbstractSyntaxTree, t: &Node) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ast` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/parser.rs:143:6 [INFO] [stdout] | [INFO] [stdout] 143 | let slice = &self.lexer.input[start.start .. end]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_string` is never used [INFO] [stdout] --> src/ast.rs:328:4 [INFO] [stdout] | [INFO] [stdout] 328 | fn to_string(items : &[T]) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `env` and `mapper` are never read [INFO] [stdout] --> src/parser.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct Parser<'a, F> [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 46 | env: Env, [INFO] [stdout] | ^^^ [INFO] [stdout] 47 | /// Provides mechanism for source maps [INFO] [stdout] 48 | mapper : F [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `matches` is never used [INFO] [stdout] --> src/parser.rs:546:8 [INFO] [stdout] | [INFO] [stdout] 52 | / impl<'a,'b,F> Parser<'a,F> [INFO] [stdout] 53 | | where 'a :'b, F : FnMut(usize,&'a str) { [INFO] [stdout] | |______________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 546 | fn matches(&mut self, kind : TokenType) -> Result> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / match t { [INFO] [stdout] 73 | | Node::FunctionDecl(_) => true, [INFO] [stdout] 74 | | Node::MethodDecl(_) => true, [INFO] [stdout] 75 | | Node::TypeDecl(_) => true, [INFO] [stdout] 76 | | _ => false [INFO] [stdout] 77 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 72 - match t { [INFO] [stdout] 73 - Node::FunctionDecl(_) => true, [INFO] [stdout] 74 - Node::MethodDecl(_) => true, [INFO] [stdout] 75 - Node::TypeDecl(_) => true, [INFO] [stdout] 76 - _ => false [INFO] [stdout] 77 - } [INFO] [stdout] 72 + matches!(t, Node::FunctionDecl(_) | Node::MethodDecl(_) | Node::TypeDecl(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | impl Into for Decl { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 81 ~ impl From for usize { [INFO] [stdout] 82 ~ fn from(val: Decl) -> Self { val.index } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / match t { [INFO] [stdout] 117 | | Node::AssertStmt(_) => true, [INFO] [stdout] 118 | | Node::BlockStmt(_) => true, [INFO] [stdout] 119 | | Node::SkipStmt(_) => true, [INFO] [stdout] 120 | | _ => false [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 116 - match t { [INFO] [stdout] 117 - Node::AssertStmt(_) => true, [INFO] [stdout] 118 - Node::BlockStmt(_) => true, [INFO] [stdout] 119 - Node::SkipStmt(_) => true, [INFO] [stdout] 120 - _ => false [INFO] [stdout] 121 - } [INFO] [stdout] 116 + matches!(t, Node::AssertStmt(_) | Node::BlockStmt(_) | Node::SkipStmt(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:125:1 [INFO] [stdout] | [INFO] [stdout] 125 | impl Into for Stmt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 125 ~ impl From for usize { [INFO] [stdout] 126 ~ fn from(val: Stmt) -> Self { val.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | / match t { [INFO] [stdout] 161 | | Node::BoolExpr(_) => true, [INFO] [stdout] 162 | | Node::EqualsExpr(_) => true, [INFO] [stdout] 163 | | Node::LessThanExpr(_) => true, [INFO] [stdout] ... | [INFO] [stdout] 167 | | _ => false [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 160 - match t { [INFO] [stdout] 161 - Node::BoolExpr(_) => true, [INFO] [stdout] 162 - Node::EqualsExpr(_) => true, [INFO] [stdout] 163 - Node::LessThanExpr(_) => true, [INFO] [stdout] 164 - Node::NotEqualsExpr(_) => true, [INFO] [stdout] 165 - Node::IntExpr(_) => true, [INFO] [stdout] 166 - Node::VarExpr(_) => true, [INFO] [stdout] 167 - _ => false [INFO] [stdout] 168 - } [INFO] [stdout] 160 + matches!(t, Node::BoolExpr(_) | Node::EqualsExpr(_) | Node::LessThanExpr(_) | Node::NotEqualsExpr(_) | Node::IntExpr(_) | Node::VarExpr(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:172:1 [INFO] [stdout] | [INFO] [stdout] 172 | impl Into for Expr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 172 ~ impl From for usize { [INFO] [stdout] 173 ~ fn from(val: Expr) -> Self { val.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:219:9 [INFO] [stdout] | [INFO] [stdout] 219 | / match t { [INFO] [stdout] 220 | | Node::BoolType(_) => true, [INFO] [stdout] 221 | | Node::IntType(_) => true, [INFO] [stdout] 222 | | Node::NullType(_) => true, [INFO] [stdout] ... | [INFO] [stdout] 227 | | _ => false [INFO] [stdout] 228 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 219 - match t { [INFO] [stdout] 220 - Node::BoolType(_) => true, [INFO] [stdout] 221 - Node::IntType(_) => true, [INFO] [stdout] 222 - Node::NullType(_) => true, [INFO] [stdout] 223 - Node::VoidType(_) => true, [INFO] [stdout] 224 - Node::ArrayType(_) => true, [INFO] [stdout] 225 - Node::ReferenceType(_) => true, [INFO] [stdout] 226 - Node::RecordType(_) => true, [INFO] [stdout] 227 - _ => false [INFO] [stdout] 228 - } [INFO] [stdout] 219 + matches!(t, Node::BoolType(_) | Node::IntType(_) | Node::NullType(_) | Node::VoidType(_) | Node::ArrayType(_) | Node::ReferenceType(_) | Node::RecordType(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:232:1 [INFO] [stdout] | [INFO] [stdout] 232 | impl Into for Type { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 232 ~ impl From for usize { [INFO] [stdout] 233 ~ fn from(val: Type) -> Self { val.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | return s; [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] 338 - return s; [INFO] [stdout] 338 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:100:2 [INFO] [stdout] | [INFO] [stdout] 100 | return self.content.parse().unwrap(); [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] 100 - return self.content.parse().unwrap(); [INFO] [stdout] 100 + self.content.parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:105:2 [INFO] [stdout] | [INFO] [stdout] 105 | return self.content.to_string(); [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] 105 - return self.content.to_string(); [INFO] [stdout] 105 + self.content.to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Token` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/lexer.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | / return Self { [INFO] [stdout] 145 | | input, chars, lookahead: None [INFO] [stdout] 146 | | } [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] 144 ~ Self { [INFO] [stdout] 145 + input, chars, lookahead: None [INFO] [stdout] 146 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/lexer.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / pub fn next(&mut self) -> Token<'a> { [INFO] [stdout] 169 | | // Check whether lookahead available [INFO] [stdout] 170 | | match self.lookahead { [INFO] [stdout] 171 | | Some(t) => { [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/lexer.rs:202:19 [INFO] [stdout] | [INFO] [stdout] 202 | } else if ch.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/lexer.rs:228:40 [INFO] [stdout] | [INFO] [stdout] 228 | let end = self.scan_whilst(|c| c.is_digit(10)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lexer.rs:500:17 [INFO] [stdout] | [INFO] [stdout] 500 | / if *c == ch { [INFO] [stdout] 501 | | // Consume character [INFO] [stdout] 502 | | self.chars.next(); [INFO] [stdout] 503 | | true [INFO] [stdout] 504 | | } else { [INFO] [stdout] 505 | | false [INFO] [stdout] 506 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 499 ~ Some((_,c)) [INFO] [stdout] 500 ~ if *c == ch => { [INFO] [stdout] 501 | // Consume character [INFO] [stdout] 502 | self.chars.next(); [INFO] [stdout] 503 | true [INFO] [stdout] 504 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/lexer.rs:526:5 [INFO] [stdout] | [INFO] [stdout] 526 | c.is_digit(10) || is_identifier_start(c) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:98:35 [INFO] [stdout] | [INFO] [stdout] 98 | let body = self.parse_stmt_block(&"")?; [INFO] [stdout] | ^^^ help: change this to: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/parser.rs:209:6 [INFO] [stdout] | [INFO] [stdout] 209 | / match lookahead.kind { [INFO] [stdout] 210 | | _ => self.parse_unit_stmt() [INFO] [stdout] 211 | | } [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.parse_unit_stmt()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/parser.rs:360:10 [INFO] [stdout] | [INFO] [stdout] 360 | n = n + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `n += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:484:24 [INFO] [stdout] | [INFO] [stdout] 484 | Ok(Name::new(self.ast,&tok.content)) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `tok.content` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:535:9 [INFO] [stdout] | [INFO] [stdout] 535 | return lookahead.kind == kind; [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] 535 - return lookahead.kind == kind; [INFO] [stdout] 535 + lookahead.kind == kind [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ast` [INFO] [stdout] --> src/ast.rs:218:15 [INFO] [stdout] | [INFO] [stdout] 218 | pub fn is(ast: &AbstractSyntaxTree, t: &Node) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ast` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/parser.rs:143:6 [INFO] [stdout] | [INFO] [stdout] 143 | let slice = &self.lexer.input[start.start .. end]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_string` is never used [INFO] [stdout] --> src/ast.rs:328:4 [INFO] [stdout] | [INFO] [stdout] 328 | fn to_string(items : &[T]) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `env` and `mapper` are never read [INFO] [stdout] --> src/parser.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct Parser<'a, F> [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 46 | env: Env, [INFO] [stdout] | ^^^ [INFO] [stdout] 47 | /// Provides mechanism for source maps [INFO] [stdout] 48 | mapper : F [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `matches` is never used [INFO] [stdout] --> src/parser.rs:546:8 [INFO] [stdout] | [INFO] [stdout] 52 | / impl<'a,'b,F> Parser<'a,F> [INFO] [stdout] 53 | | where 'a :'b, F : FnMut(usize,&'a str) { [INFO] [stdout] | |______________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 546 | fn matches(&mut self, kind : TokenType) -> Result> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / match t { [INFO] [stdout] 73 | | Node::FunctionDecl(_) => true, [INFO] [stdout] 74 | | Node::MethodDecl(_) => true, [INFO] [stdout] 75 | | Node::TypeDecl(_) => true, [INFO] [stdout] 76 | | _ => false [INFO] [stdout] 77 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 72 - match t { [INFO] [stdout] 73 - Node::FunctionDecl(_) => true, [INFO] [stdout] 74 - Node::MethodDecl(_) => true, [INFO] [stdout] 75 - Node::TypeDecl(_) => true, [INFO] [stdout] 76 - _ => false [INFO] [stdout] 77 - } [INFO] [stdout] 72 + matches!(t, Node::FunctionDecl(_) | Node::MethodDecl(_) | Node::TypeDecl(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | impl Into for Decl { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 81 ~ impl From for usize { [INFO] [stdout] 82 ~ fn from(val: Decl) -> Self { val.index } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / match t { [INFO] [stdout] 117 | | Node::AssertStmt(_) => true, [INFO] [stdout] 118 | | Node::BlockStmt(_) => true, [INFO] [stdout] 119 | | Node::SkipStmt(_) => true, [INFO] [stdout] 120 | | _ => false [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 116 - match t { [INFO] [stdout] 117 - Node::AssertStmt(_) => true, [INFO] [stdout] 118 - Node::BlockStmt(_) => true, [INFO] [stdout] 119 - Node::SkipStmt(_) => true, [INFO] [stdout] 120 - _ => false [INFO] [stdout] 121 - } [INFO] [stdout] 116 + matches!(t, Node::AssertStmt(_) | Node::BlockStmt(_) | Node::SkipStmt(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:125:1 [INFO] [stdout] | [INFO] [stdout] 125 | impl Into for Stmt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 125 ~ impl From for usize { [INFO] [stdout] 126 ~ fn from(val: Stmt) -> Self { val.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | / match t { [INFO] [stdout] 161 | | Node::BoolExpr(_) => true, [INFO] [stdout] 162 | | Node::EqualsExpr(_) => true, [INFO] [stdout] 163 | | Node::LessThanExpr(_) => true, [INFO] [stdout] ... | [INFO] [stdout] 167 | | _ => false [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 160 - match t { [INFO] [stdout] 161 - Node::BoolExpr(_) => true, [INFO] [stdout] 162 - Node::EqualsExpr(_) => true, [INFO] [stdout] 163 - Node::LessThanExpr(_) => true, [INFO] [stdout] 164 - Node::NotEqualsExpr(_) => true, [INFO] [stdout] 165 - Node::IntExpr(_) => true, [INFO] [stdout] 166 - Node::VarExpr(_) => true, [INFO] [stdout] 167 - _ => false [INFO] [stdout] 168 - } [INFO] [stdout] 160 + matches!(t, Node::BoolExpr(_) | Node::EqualsExpr(_) | Node::LessThanExpr(_) | Node::NotEqualsExpr(_) | Node::IntExpr(_) | Node::VarExpr(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:172:1 [INFO] [stdout] | [INFO] [stdout] 172 | impl Into for Expr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 172 ~ impl From for usize { [INFO] [stdout] 173 ~ fn from(val: Expr) -> Self { val.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/ast.rs:219:9 [INFO] [stdout] | [INFO] [stdout] 219 | / match t { [INFO] [stdout] 220 | | Node::BoolType(_) => true, [INFO] [stdout] 221 | | Node::IntType(_) => true, [INFO] [stdout] 222 | | Node::NullType(_) => true, [INFO] [stdout] ... | [INFO] [stdout] 227 | | _ => false [INFO] [stdout] 228 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 219 - match t { [INFO] [stdout] 220 - Node::BoolType(_) => true, [INFO] [stdout] 221 - Node::IntType(_) => true, [INFO] [stdout] 222 - Node::NullType(_) => true, [INFO] [stdout] 223 - Node::VoidType(_) => true, [INFO] [stdout] 224 - Node::ArrayType(_) => true, [INFO] [stdout] 225 - Node::ReferenceType(_) => true, [INFO] [stdout] 226 - Node::RecordType(_) => true, [INFO] [stdout] 227 - _ => false [INFO] [stdout] 228 - } [INFO] [stdout] 219 + matches!(t, Node::BoolType(_) | Node::IntType(_) | Node::NullType(_) | Node::VoidType(_) | Node::ArrayType(_) | Node::ReferenceType(_) | Node::RecordType(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast.rs:232:1 [INFO] [stdout] | [INFO] [stdout] 232 | impl Into for Type { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 232 ~ impl From for usize { [INFO] [stdout] 233 ~ fn from(val: Type) -> Self { val.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | return s; [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] 338 - return s; [INFO] [stdout] 338 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:100:2 [INFO] [stdout] | [INFO] [stdout] 100 | return self.content.parse().unwrap(); [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] 100 - return self.content.parse().unwrap(); [INFO] [stdout] 100 + self.content.parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:105:2 [INFO] [stdout] | [INFO] [stdout] 105 | return self.content.to_string(); [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] 105 - return self.content.to_string(); [INFO] [stdout] 105 + self.content.to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Token` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/lexer.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | / return Self { [INFO] [stdout] 145 | | input, chars, lookahead: None [INFO] [stdout] 146 | | } [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] 144 ~ Self { [INFO] [stdout] 145 + input, chars, lookahead: None [INFO] [stdout] 146 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/lexer.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / pub fn next(&mut self) -> Token<'a> { [INFO] [stdout] 169 | | // Check whether lookahead available [INFO] [stdout] 170 | | match self.lookahead { [INFO] [stdout] 171 | | Some(t) => { [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/lexer.rs:202:19 [INFO] [stdout] | [INFO] [stdout] 202 | } else if ch.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/lexer.rs:228:40 [INFO] [stdout] | [INFO] [stdout] 228 | let end = self.scan_whilst(|c| c.is_digit(10)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lexer.rs:500:17 [INFO] [stdout] | [INFO] [stdout] 500 | / if *c == ch { [INFO] [stdout] 501 | | // Consume character [INFO] [stdout] 502 | | self.chars.next(); [INFO] [stdout] 503 | | true [INFO] [stdout] 504 | | } else { [INFO] [stdout] 505 | | false [INFO] [stdout] 506 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 499 ~ Some((_,c)) [INFO] [stdout] 500 ~ if *c == ch => { [INFO] [stdout] 501 | // Consume character [INFO] [stdout] 502 | self.chars.next(); [INFO] [stdout] 503 | true [INFO] [stdout] 504 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/lexer.rs:526:5 [INFO] [stdout] | [INFO] [stdout] 526 | c.is_digit(10) || is_identifier_start(c) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ast` [INFO] [stdout] --> tests/micro.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | let ast = check_parse("function f()->() :\n skip"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ast` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:98:35 [INFO] [stdout] | [INFO] [stdout] 98 | let body = self.parse_stmt_block(&"")?; [INFO] [stdout] | ^^^ help: change this to: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ast` [INFO] [stdout] --> tests/micro.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | let ast = check_type_error("function f() -> ():\n assert b"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/parser.rs:209:6 [INFO] [stdout] | [INFO] [stdout] 209 | / match lookahead.kind { [INFO] [stdout] 210 | | _ => self.parse_unit_stmt() [INFO] [stdout] 211 | | } [INFO] [stdout] | |_________^ help: consider using the match body instead: `self.parse_unit_stmt()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `type_mapper` is never used [INFO] [stdout] --> tests/micro.rs:364:4 [INFO] [stdout] | [INFO] [stdout] 364 | fn type_mapper<'a>(_: usize, _: Type) { } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/parser.rs:360:10 [INFO] [stdout] | [INFO] [stdout] 360 | n = n + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `n += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:484:24 [INFO] [stdout] | [INFO] [stdout] 484 | Ok(Name::new(self.ast,&tok.content)) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `tok.content` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:535:9 [INFO] [stdout] | [INFO] [stdout] 535 | return lookahead.kind == kind; [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] 535 - return lookahead.kind == kind; [INFO] [stdout] 535 + lookahead.kind == kind [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> tests/micro.rs:336:5 [INFO] [stdout] | [INFO] [stdout] 336 | let ast = check_type_error("function f() -> ():\n assert b"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 336 - let ast = check_type_error("function f() -> ():\n assert b"); [INFO] [stdout] 336 + check_type_error("function f() -> ():\n assert b"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> tests/micro.rs:361:18 [INFO] [stdout] | [INFO] [stdout] 361 | fn source_mapper<'a>(_: usize, _: &'a str) { } [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 361 - fn source_mapper<'a>(_: usize, _: &'a str) { } [INFO] [stdout] 361 + fn source_mapper(_: usize, _: &str) { } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> tests/micro.rs:364:16 [INFO] [stdout] | [INFO] [stdout] 364 | fn type_mapper<'a>(_: usize, _: Type) { } [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> tests/micro.rs:373:13 [INFO] [stdout] | [INFO] [stdout] 373 | assert!(!d.is_err()); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `d.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> tests/micro.rs:397:13 [INFO] [stdout] | [INFO] [stdout] 397 | assert!(!d.is_err()); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `d.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.82s [INFO] running `Command { std: "docker" "inspect" "cc70805ab0e348db340b611d047d28c301b11d137ba6a19bfc172cc1c6bc7f6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cc70805ab0e348db340b611d047d28c301b11d137ba6a19bfc172cc1c6bc7f6e", kill_on_drop: false }` [INFO] [stdout] cc70805ab0e348db340b611d047d28c301b11d137ba6a19bfc172cc1c6bc7f6e