[INFO] cloning repository https://github.com/rock117/r-lox [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/rock117/r-lox" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frock117%2Fr-lox", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frock117%2Fr-lox'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e91781b89a8bbbb098bcb3c1d9cc37fd8490a6a7 [INFO] checking rock117/r-lox against master#22572d0994593197593e2a1b7b18d720a9a349a7 for pr-126452-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frock117%2Fr-lox" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/rock117/r-lox on toolchain 22572d0994593197593e2a1b7b18d720a9a349a7 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+22572d0994593197593e2a1b7b18d720a9a349a7" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/rock117/r-lox [INFO] finished tweaking git repo https://github.com/rock117/r-lox [INFO] tweaked toml for git repo https://github.com/rock117/r-lox written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/rock117/r-lox 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" "+22572d0994593197593e2a1b7b18d720a9a349a7" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded map-macro v0.3.0 [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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+22572d0994593197593e2a1b7b18d720a9a349a7" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f43a96cc72e3b7c9ace669c9197e982a9e73dec89d8ce325c87cdd98d68e883e [INFO] running `Command { std: "docker" "start" "-a" "f43a96cc72e3b7c9ace669c9197e982a9e73dec89d8ce325c87cdd98d68e883e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f43a96cc72e3b7c9ace669c9197e982a9e73dec89d8ce325c87cdd98d68e883e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f43a96cc72e3b7c9ace669c9197e982a9e73dec89d8ce325c87cdd98d68e883e", kill_on_drop: false }` [INFO] [stdout] f43a96cc72e3b7c9ace669c9197e982a9e73dec89d8ce325c87cdd98d68e883e [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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+22572d0994593197593e2a1b7b18d720a9a349a7" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 018031e1d3aa142f2933d664681324080d6ad01a790a28de3902cba1e9fbad65 [INFO] running `Command { std: "docker" "start" "-a" "018031e1d3aa142f2933d664681324080d6ad01a790a28de3902cba1e9fbad65", kill_on_drop: false }` [INFO] [stderr] Compiling anyhow v1.0.86 [INFO] [stderr] Checking map-macro v0.3.0 [INFO] [stderr] Checking r-lox v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::token_type::TokenType` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::token::token_type::TokenType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::Token` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::token::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/class.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::variable::Variable` [INFO] [stdout] --> src/class.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::variable::Variable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/environment.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/environment.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 53 - if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] 53 + if self.values.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/expr/mod.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::error::ParseError` [INFO] [stdout] --> src/expr/ast_printer.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::ParseError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::binary::Binary` [INFO] [stdout] --> src/expr/ast_printer.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::binary::Binary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::grouping::Grouping` [INFO] [stdout] --> src/expr/ast_printer.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::grouping::Grouping; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::literal::Literal` [INFO] [stdout] --> src/expr/ast_printer.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::expr::literal::Literal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::unary::Unary` [INFO] [stdout] --> src/expr/ast_printer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::expr::unary::Unary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Expr` and `Visitor` [INFO] [stdout] --> src/expr/ast_printer.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/expr/ast_printer.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/expr/ast_printer.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Visitor` [INFO] [stdout] --> src/expr/grouping.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/function/native_function.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/native_function.rs:2:30 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/mod.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::function::LoxCallable` [INFO] [stdout] --> src/instance.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::function::LoxCallable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/interpreter.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem::discriminant` [INFO] [stdout] --> src/interpreter.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::mem::discriminant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/interpreter.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::error::{LoxError, ParseError, Return}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::instance::LoxInstance` [INFO] [stdout] --> src/interpreter.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::instance::LoxInstance; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/interpreter.rs:318:12 [INFO] [stdout] | [INFO] [stdout] 318 | if (arguments.len() != function.arity()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 318 - if (arguments.len() != function.arity()) { [INFO] [stdout] 318 + if arguments.len() != function.arity() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `once_cell::sync::Lazy` [INFO] [stdout] --> src/lox.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use once_cell::sync::Lazy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/lox.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/lox.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/parser.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::set::Set` [INFO] [stdout] --> src/parser.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::set::Set; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::Expr::Logical` [INFO] [stdout] --> src/parser.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::Expr::Logical; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:182:20 [INFO] [stdout] | [INFO] [stdout] 182 | if (parameters.len() >= 255) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 182 - if (parameters.len() >= 255) { [INFO] [stdout] 182 + if parameters.len() >= 255 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:353:23 [INFO] [stdout] | [INFO] [stdout] 353 | } else if (self.match_(&[DOT])) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 353 - } else if (self.match_(&[DOT])) { [INFO] [stdout] 353 + } else if self.match_(&[DOT]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `function` [INFO] [stdout] --> src/resolver.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::{expr, function, stmt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::Map` [INFO] [stdout] --> src/resolver.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use std::iter::Map; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 80 - if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] 80 + if scope.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:171:12 [INFO] [stdout] | [INFO] [stdout] 171 | if (self.current_function == NONE) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 171 - if (self.current_function == NONE) { [INFO] [stdout] 171 + if self.current_function == NONE { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/scanner.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | /// The closing ". [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 193 | self.advance(); [INFO] [stdout] | -------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/stmt/mod.rs:11:30 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | LEFT_PAREN, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftParen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RIGHT_PAREN, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightParen` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | LEFT_BRACE, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RIGHT_BRACE, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BANG_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | BANG_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `BangEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EQUAL_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | EQUAL_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `EqualEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `GREATER_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | GREATER_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GreaterEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LESS_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | LESS_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LessEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::token_type::TokenType` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::token::token_type::TokenType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::Token` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::token::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/class.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::variable::Variable` [INFO] [stdout] --> src/class.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::variable::Variable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/environment.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/environment.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 53 - if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] 53 + if self.values.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/expr/mod.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::error::ParseError` [INFO] [stdout] --> src/expr/ast_printer.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::ParseError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::binary::Binary` [INFO] [stdout] --> src/expr/ast_printer.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::binary::Binary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::grouping::Grouping` [INFO] [stdout] --> src/expr/ast_printer.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::grouping::Grouping; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::literal::Literal` [INFO] [stdout] --> src/expr/ast_printer.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::expr::literal::Literal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::unary::Unary` [INFO] [stdout] --> src/expr/ast_printer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::expr::unary::Unary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Expr` and `Visitor` [INFO] [stdout] --> src/expr/ast_printer.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/expr/ast_printer.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/expr/ast_printer.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Visitor` [INFO] [stdout] --> src/expr/grouping.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/function/native_function.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/native_function.rs:2:30 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/mod.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::function::LoxCallable` [INFO] [stdout] --> src/instance.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::function::LoxCallable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/interpreter.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem::discriminant` [INFO] [stdout] --> src/interpreter.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::mem::discriminant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/interpreter.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::error::{LoxError, ParseError, Return}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::instance::LoxInstance` [INFO] [stdout] --> src/interpreter.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::instance::LoxInstance; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/interpreter.rs:318:12 [INFO] [stdout] | [INFO] [stdout] 318 | if (arguments.len() != function.arity()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 318 - if (arguments.len() != function.arity()) { [INFO] [stdout] 318 + if arguments.len() != function.arity() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::interpreter::Interpreter` [INFO] [stdout] --> src/interpreter.rs:526:9 [INFO] [stdout] | [INFO] [stdout] 526 | use crate::interpreter::Interpreter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::Parser` [INFO] [stdout] --> src/interpreter.rs:527:9 [INFO] [stdout] | [INFO] [stdout] 527 | use crate::parser::Parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scanner::Scanner` [INFO] [stdout] --> src/interpreter.rs:528:9 [INFO] [stdout] | [INFO] [stdout] 528 | use crate::scanner::Scanner; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `once_cell::sync::Lazy` [INFO] [stdout] --> src/lox.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use once_cell::sync::Lazy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/lox.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/lox.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/parser.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::set::Set` [INFO] [stdout] --> src/parser.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::set::Set; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::Expr::Logical` [INFO] [stdout] --> src/parser.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::Expr::Logical; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:182:20 [INFO] [stdout] | [INFO] [stdout] 182 | if (parameters.len() >= 255) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 182 - if (parameters.len() >= 255) { [INFO] [stdout] 182 + if parameters.len() >= 255 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:353:23 [INFO] [stdout] | [INFO] [stdout] 353 | } else if (self.match_(&[DOT])) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 353 - } else if (self.match_(&[DOT])) { [INFO] [stdout] 353 + } else if self.match_(&[DOT]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `function` [INFO] [stdout] --> src/resolver.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::{expr, function, stmt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::Map` [INFO] [stdout] --> src/resolver.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use std::iter::Map; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 80 - if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] 80 + if scope.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:171:12 [INFO] [stdout] | [INFO] [stdout] 171 | if (self.current_function == NONE) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 171 - if (self.current_function == NONE) { [INFO] [stdout] 171 + if self.current_function == NONE { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/scanner.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | /// The closing ". [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 193 | self.advance(); [INFO] [stdout] | -------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/stmt/mod.rs:11:30 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | LEFT_PAREN, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftParen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RIGHT_PAREN, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightParen` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | LEFT_BRACE, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RIGHT_BRACE, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BANG_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | BANG_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `BangEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EQUAL_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | EQUAL_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `EqualEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `GREATER_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | GREATER_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GreaterEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LESS_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | LESS_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LessEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/token/mod.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::{Display, Formatter, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/environment.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..distance { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interpreter` [INFO] [stdout] --> src/function/native_function.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | interpreter: &mut Interpreter, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_interpreter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arguments` [INFO] [stdout] --> src/function/native_function.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | arguments: Vec>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_arguments` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/token/mod.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::{Display, Formatter, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/function/mod.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | fn eq(&self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/interpreter.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let mut globals = Rc::new(RefCell::new(Environment::new())); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `left` [INFO] [stdout] --> src/interpreter.rs:174:52 [INFO] [stdout] | [INFO] [stdout] 174 | (TokenType::SLASH, Some(Object::Number(left)), Some(Object::Number(0f64))) => Err( [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/environment.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..distance { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/lox.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | Ok(n) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/lox.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | Err(e) => return, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stmt` [INFO] [stdout] --> src/lox.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | for stmt in &stmts { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stmt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | fn run(mut interpreter: Interpreter, source: String) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | let mut scanner = Scanner::new(source); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interpreter` [INFO] [stdout] --> src/function/native_function.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | interpreter: &mut Interpreter, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_interpreter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arguments` [INFO] [stdout] --> src/function/native_function.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | arguments: Vec>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_arguments` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/function/mod.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | fn eq(&self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/interpreter.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let mut globals = Rc::new(RefCell::new(Environment::new())); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `left` [INFO] [stdout] --> src/interpreter.rs:174:52 [INFO] [stdout] | [INFO] [stdout] 174 | (TokenType::SLASH, Some(Object::Number(left)), Some(Object::Number(0f64))) => Err( [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/lox.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | Ok(n) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/lox.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | Err(e) => return, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stmt` [INFO] [stdout] --> src/lox.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | for stmt in &stmts { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stmt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | fn run(mut interpreter: Interpreter, source: String) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | let mut scanner = Scanner::new(source); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expr` [INFO] [stdout] --> src/resolver.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | fn visit_literal_expr(&self, expr: Literal) -> Result, LoxError> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/resolver.rs:290:35 [INFO] [stdout] | [INFO] [stdout] 290 | fn visit_this_expr(&mut self, mut expr: This) -> Result, LoxError> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expr` [INFO] [stdout] --> src/resolver.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | fn visit_literal_expr(&self, expr: Literal) -> Result, LoxError> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Clock` is more private than the item `NativeFunction::Clock::0` [INFO] [stdout] --> src/function/native_function.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | Clock(Clock), [INFO] [stdout] | ^^^^^ field `NativeFunction::Clock::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `Clock` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/function/native_function.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | struct Clock; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/resolver.rs:290:35 [INFO] [stdout] | [INFO] [stdout] 290 | fn visit_this_expr(&mut self, mut expr: This) -> Result, LoxError> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `CLASS` is never constructed [INFO] [stdout] --> src/class.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) enum ClassType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 19 | NONE, [INFO] [stdout] 20 | CLASS, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ClassType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/class.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl LoxClass { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 25 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/error.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ParseError { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 30 | pub fn new(token: Token, message: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AstPrinter` is never constructed [INFO] [stdout] --> src/expr/ast_printer.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) struct AstPrinter; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LoxClass` is never constructed [INFO] [stdout] --> src/function/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum LoxCallable { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | LoxClass(LoxClass), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LoxCallable` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `METHOD` is never constructed [INFO] [stdout] --> src/function/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum FunctionType { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | METHOD, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `run_prompt` is never used [INFO] [stdout] --> src/lox.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 18 | impl Lox { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub(crate) fn run_prompt() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Class` is never constructed [INFO] [stdout] --> src/object.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) enum Object { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 15 | Class(LoxClass), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Object` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `boolean` is never used [INFO] [stdout] --> src/object.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Object { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn boolean(b: bool) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `arguments` is never used [INFO] [stdout] --> src/parser.rs:382:8 [INFO] [stdout] | [INFO] [stdout] 19 | impl Parser { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 382 | fn arguments(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/stmt/mod.rs:31:11 [INFO] [stdout] | [INFO] [stdout] 31 | Class(class::Class), [INFO] [stdout] | ----- ^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 31 | Class(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit_class_stmt` is never used [INFO] [stdout] --> src/stmt/mod.rs:136:8 [INFO] [stdout] | [INFO] [stdout] 112 | pub(crate) trait Visitor { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 136 | fn visit_class_stmt(&mut self, stmt: class::Class) -> Result<(), LoxError>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `superclass`, and `methods` are never read [INFO] [stdout] --> src/stmt/class.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct Class { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 7 | pub name: Token, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | pub superclass: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub methods: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Class` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `returnValue` should have a snake case name [INFO] [stdout] --> src/function/lox_function.rs:50:39 [INFO] [stdout] | [INFO] [stdout] 50 | Err(LoxError::ReturnError(returnValue)) => { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `return_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/interpreter.rs:432:21 [INFO] [stdout] | [INFO] [stdout] 432 | if let Some(elseBranch) = stmt.else_branch { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `thenBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:34 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `then_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:52 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 84 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Clock` is more private than the item `NativeFunction::Clock::0` [INFO] [stdout] --> src/function/native_function.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | Clock(Clock), [INFO] [stdout] | ^^^^^ field `NativeFunction::Clock::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `Clock` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/function/native_function.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | struct Clock; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `CLASS` is never constructed [INFO] [stdout] --> src/class.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) enum ClassType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 19 | NONE, [INFO] [stdout] 20 | CLASS, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ClassType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/class.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl LoxClass { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 25 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/error.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ParseError { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 30 | pub fn new(token: Token, message: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AstPrinter` is never constructed [INFO] [stdout] --> src/expr/ast_printer.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) struct AstPrinter; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LoxClass` is never constructed [INFO] [stdout] --> src/function/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum LoxCallable { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | LoxClass(LoxClass), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LoxCallable` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `METHOD` is never constructed [INFO] [stdout] --> src/function/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum FunctionType { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | METHOD, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `run_prompt` is never used [INFO] [stdout] --> src/lox.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 18 | impl Lox { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub(crate) fn run_prompt() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Class` is never constructed [INFO] [stdout] --> src/object.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) enum Object { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 15 | Class(LoxClass), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Object` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `boolean` is never used [INFO] [stdout] --> src/object.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Object { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn boolean(b: bool) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `arguments` is never used [INFO] [stdout] --> src/parser.rs:382:8 [INFO] [stdout] | [INFO] [stdout] 19 | impl Parser { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 382 | fn arguments(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/stmt/mod.rs:31:11 [INFO] [stdout] | [INFO] [stdout] 31 | Class(class::Class), [INFO] [stdout] | ----- ^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 31 | Class(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit_class_stmt` is never used [INFO] [stdout] --> src/stmt/mod.rs:136:8 [INFO] [stdout] | [INFO] [stdout] 112 | pub(crate) trait Visitor { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 136 | fn visit_class_stmt(&mut self, stmt: class::Class) -> Result<(), LoxError>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `superclass`, and `methods` are never read [INFO] [stdout] --> src/stmt/class.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct Class { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 7 | pub name: Token, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | pub superclass: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub methods: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Class` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `returnValue` should have a snake case name [INFO] [stdout] --> src/function/lox_function.rs:50:39 [INFO] [stdout] | [INFO] [stdout] 50 | Err(LoxError::ReturnError(returnValue)) => { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `return_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/interpreter.rs:432:21 [INFO] [stdout] | [INFO] [stdout] 432 | if let Some(elseBranch) = stmt.else_branch { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `thenBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:34 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `then_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:52 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 87 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.75s [INFO] running `Command { std: "docker" "inspect" "018031e1d3aa142f2933d664681324080d6ad01a790a28de3902cba1e9fbad65", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "018031e1d3aa142f2933d664681324080d6ad01a790a28de3902cba1e9fbad65", kill_on_drop: false }` [INFO] [stdout] 018031e1d3aa142f2933d664681324080d6ad01a790a28de3902cba1e9fbad65 [INFO] checking rock117/r-lox against try#6289438dbad80b1a0029c66dd3f6abf57c2c51be for pr-126452-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frock117%2Fr-lox" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/rock117/r-lox on toolchain 6289438dbad80b1a0029c66dd3f6abf57c2c51be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+6289438dbad80b1a0029c66dd3f6abf57c2c51be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/rock117/r-lox [INFO] finished tweaking git repo https://github.com/rock117/r-lox [INFO] tweaked toml for git repo https://github.com/rock117/r-lox written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/rock117/r-lox 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" "+6289438dbad80b1a0029c66dd3f6abf57c2c51be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+6289438dbad80b1a0029c66dd3f6abf57c2c51be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b55dac5858a687da3124ee02b4408ee8c72e8f719a3ba636a633c95c36ed19d4 [INFO] running `Command { std: "docker" "start" "-a" "b55dac5858a687da3124ee02b4408ee8c72e8f719a3ba636a633c95c36ed19d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b55dac5858a687da3124ee02b4408ee8c72e8f719a3ba636a633c95c36ed19d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b55dac5858a687da3124ee02b4408ee8c72e8f719a3ba636a633c95c36ed19d4", kill_on_drop: false }` [INFO] [stdout] b55dac5858a687da3124ee02b4408ee8c72e8f719a3ba636a633c95c36ed19d4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+6289438dbad80b1a0029c66dd3f6abf57c2c51be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f2772e8dea4edefe08b92d987c8e041c982e9a1127c1bf83781c6821bc7d6add [INFO] running `Command { std: "docker" "start" "-a" "f2772e8dea4edefe08b92d987c8e041c982e9a1127c1bf83781c6821bc7d6add", kill_on_drop: false }` [INFO] [stderr] Compiling anyhow v1.0.86 [INFO] [stderr] Checking map-macro v0.3.0 [INFO] [stderr] Checking r-lox v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::token_type::TokenType` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::token::token_type::TokenType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::Token` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::token::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/class.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::token_type::TokenType` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::token::token_type::TokenType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::Token` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::token::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/class.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::variable::Variable` [INFO] [stdout] --> src/class.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::variable::Variable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/environment.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/environment.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 53 - if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] 53 + if self.values.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/expr/mod.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::error::ParseError` [INFO] [stdout] --> src/expr/ast_printer.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::ParseError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::binary::Binary` [INFO] [stdout] --> src/expr/ast_printer.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::binary::Binary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::grouping::Grouping` [INFO] [stdout] --> src/expr/ast_printer.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::grouping::Grouping; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::literal::Literal` [INFO] [stdout] --> src/expr/ast_printer.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::expr::literal::Literal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::unary::Unary` [INFO] [stdout] --> src/expr/ast_printer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::expr::unary::Unary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Expr` and `Visitor` [INFO] [stdout] --> src/expr/ast_printer.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/expr/ast_printer.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/expr/ast_printer.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Visitor` [INFO] [stdout] --> src/expr/grouping.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/function/native_function.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/native_function.rs:2:30 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/mod.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::function::LoxCallable` [INFO] [stdout] --> src/instance.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::function::LoxCallable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/interpreter.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem::discriminant` [INFO] [stdout] --> src/interpreter.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::mem::discriminant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/interpreter.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::error::{LoxError, ParseError, Return}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::instance::LoxInstance` [INFO] [stdout] --> src/interpreter.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::instance::LoxInstance; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/interpreter.rs:318:12 [INFO] [stdout] | [INFO] [stdout] 318 | if (arguments.len() != function.arity()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 318 - if (arguments.len() != function.arity()) { [INFO] [stdout] 318 + if arguments.len() != function.arity() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `once_cell::sync::Lazy` [INFO] [stdout] --> src/lox.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use once_cell::sync::Lazy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/lox.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/lox.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/parser.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::set::Set` [INFO] [stdout] --> src/parser.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::set::Set; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::Expr::Logical` [INFO] [stdout] --> src/parser.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::Expr::Logical; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:182:20 [INFO] [stdout] | [INFO] [stdout] 182 | if (parameters.len() >= 255) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 182 - if (parameters.len() >= 255) { [INFO] [stdout] 182 + if parameters.len() >= 255 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:353:23 [INFO] [stdout] | [INFO] [stdout] 353 | } else if (self.match_(&[DOT])) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 353 - } else if (self.match_(&[DOT])) { [INFO] [stdout] 353 + } else if self.match_(&[DOT]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `function` [INFO] [stdout] --> src/resolver.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::{expr, function, stmt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::Map` [INFO] [stdout] --> src/resolver.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use std::iter::Map; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 80 - if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] 80 + if scope.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:171:12 [INFO] [stdout] | [INFO] [stdout] 171 | if (self.current_function == NONE) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 171 - if (self.current_function == NONE) { [INFO] [stdout] 171 + if self.current_function == NONE { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/scanner.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | /// The closing ". [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 193 | self.advance(); [INFO] [stdout] | -------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/stmt/mod.rs:11:30 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | LEFT_PAREN, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftParen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RIGHT_PAREN, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightParen` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | LEFT_BRACE, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RIGHT_BRACE, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BANG_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | BANG_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `BangEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EQUAL_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | EQUAL_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `EqualEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `GREATER_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | GREATER_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GreaterEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LESS_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | LESS_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LessEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::variable::Variable` [INFO] [stdout] --> src/class.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::variable::Variable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/environment.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/environment.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 53 - if (self.values.contains_key(&name.lexeme)) { [INFO] [stdout] 53 + if self.values.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/expr/mod.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::error::ParseError` [INFO] [stdout] --> src/expr/ast_printer.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::ParseError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::binary::Binary` [INFO] [stdout] --> src/expr/ast_printer.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::binary::Binary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::grouping::Grouping` [INFO] [stdout] --> src/expr/ast_printer.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::grouping::Grouping; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::literal::Literal` [INFO] [stdout] --> src/expr/ast_printer.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::expr::literal::Literal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::unary::Unary` [INFO] [stdout] --> src/expr/ast_printer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::expr::unary::Unary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Expr` and `Visitor` [INFO] [stdout] --> src/expr/ast_printer.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::object::Object` [INFO] [stdout] --> src/expr/ast_printer.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::object::Object; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/expr/ast_printer.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Visitor` [INFO] [stdout] --> src/expr/grouping.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::expr::{Expr, Visitor}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::environment::Environment` [INFO] [stdout] --> src/function/native_function.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::environment::Environment; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/native_function.rs:2:30 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/function/mod.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::function::LoxCallable` [INFO] [stdout] --> src/instance.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::function::LoxCallable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/interpreter.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem::discriminant` [INFO] [stdout] --> src/interpreter.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::mem::discriminant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/interpreter.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::error::{LoxError, ParseError, Return}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::instance::LoxInstance` [INFO] [stdout] --> src/interpreter.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::instance::LoxInstance; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/interpreter.rs:318:12 [INFO] [stdout] | [INFO] [stdout] 318 | if (arguments.len() != function.arity()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 318 - if (arguments.len() != function.arity()) { [INFO] [stdout] 318 + if arguments.len() != function.arity() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::interpreter::Interpreter` [INFO] [stdout] --> src/interpreter.rs:526:9 [INFO] [stdout] | [INFO] [stdout] 526 | use crate::interpreter::Interpreter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::Parser` [INFO] [stdout] --> src/interpreter.rs:527:9 [INFO] [stdout] | [INFO] [stdout] 527 | use crate::parser::Parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scanner::Scanner` [INFO] [stdout] --> src/interpreter.rs:528:9 [INFO] [stdout] | [INFO] [stdout] 528 | use crate::scanner::Scanner; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `once_cell::sync::Lazy` [INFO] [stdout] --> src/lox.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use once_cell::sync::Lazy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/lox.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/lox.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/parser.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::set::Set` [INFO] [stdout] --> src/parser.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::expr::set::Set; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::expr::Expr::Logical` [INFO] [stdout] --> src/parser.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::expr::Expr::Logical; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:182:20 [INFO] [stdout] | [INFO] [stdout] 182 | if (parameters.len() >= 255) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 182 - if (parameters.len() >= 255) { [INFO] [stdout] 182 + if parameters.len() >= 255 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/parser.rs:353:23 [INFO] [stdout] | [INFO] [stdout] 353 | } else if (self.match_(&[DOT])) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 353 - } else if (self.match_(&[DOT])) { [INFO] [stdout] 353 + } else if self.match_(&[DOT]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `function` [INFO] [stdout] --> src/resolver.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::{expr, function, stmt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::Map` [INFO] [stdout] --> src/resolver.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use std::iter::Map; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 80 - if (scope.contains_key(&name.lexeme)) { [INFO] [stdout] 80 + if scope.contains_key(&name.lexeme) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/resolver.rs:171:12 [INFO] [stdout] | [INFO] [stdout] 171 | if (self.current_function == NONE) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 171 - if (self.current_function == NONE) { [INFO] [stdout] 171 + if self.current_function == NONE { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/scanner.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | /// The closing ". [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 193 | self.advance(); [INFO] [stdout] | -------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParseError` [INFO] [stdout] --> src/stmt/mod.rs:11:30 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::error::{LoxError, ParseError}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | LEFT_PAREN, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftParen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RIGHT_PAREN, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightParen` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | LEFT_BRACE, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RIGHT_BRACE, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BANG_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | BANG_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `BangEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EQUAL_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | EQUAL_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `EqualEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `GREATER_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | GREATER_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GreaterEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LESS_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/token/token_type.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | LESS_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LessEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/token/mod.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::{Display, Formatter, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/environment.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..distance { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interpreter` [INFO] [stdout] --> src/function/native_function.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | interpreter: &mut Interpreter, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_interpreter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arguments` [INFO] [stdout] --> src/function/native_function.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | arguments: Vec>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_arguments` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/function/mod.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | fn eq(&self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/interpreter.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let mut globals = Rc::new(RefCell::new(Environment::new())); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `left` [INFO] [stdout] --> src/interpreter.rs:174:52 [INFO] [stdout] | [INFO] [stdout] 174 | (TokenType::SLASH, Some(Object::Number(left)), Some(Object::Number(0f64))) => Err( [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/lox.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | Ok(n) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/lox.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | Err(e) => return, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stmt` [INFO] [stdout] --> src/lox.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | for stmt in &stmts { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stmt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | fn run(mut interpreter: Interpreter, source: String) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | let mut scanner = Scanner::new(source); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/token/mod.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::{Display, Formatter, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/environment.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..distance { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interpreter` [INFO] [stdout] --> src/function/native_function.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | interpreter: &mut Interpreter, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_interpreter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arguments` [INFO] [stdout] --> src/function/native_function.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | arguments: Vec>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_arguments` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expr` [INFO] [stdout] --> src/resolver.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | fn visit_literal_expr(&self, expr: Literal) -> Result, LoxError> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/resolver.rs:290:35 [INFO] [stdout] | [INFO] [stdout] 290 | fn visit_this_expr(&mut self, mut expr: This) -> Result, LoxError> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/function/mod.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | fn eq(&self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/interpreter.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let mut globals = Rc::new(RefCell::new(Environment::new())); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `left` [INFO] [stdout] --> src/interpreter.rs:174:52 [INFO] [stdout] | [INFO] [stdout] 174 | (TokenType::SLASH, Some(Object::Number(left)), Some(Object::Number(0f64))) => Err( [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/lox.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | Ok(n) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/lox.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | Err(e) => return, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stmt` [INFO] [stdout] --> src/lox.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | for stmt in &stmts { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stmt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Clock` is more private than the item `NativeFunction::Clock::0` [INFO] [stdout] --> src/function/native_function.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | Clock(Clock), [INFO] [stdout] | ^^^^^ field `NativeFunction::Clock::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `Clock` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/function/native_function.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | struct Clock; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | fn run(mut interpreter: Interpreter, source: String) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lox.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | let mut scanner = Scanner::new(source); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `CLASS` is never constructed [INFO] [stdout] --> src/class.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) enum ClassType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 19 | NONE, [INFO] [stdout] 20 | CLASS, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ClassType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/class.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl LoxClass { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 25 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/error.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ParseError { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 30 | pub fn new(token: Token, message: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AstPrinter` is never constructed [INFO] [stdout] --> src/expr/ast_printer.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) struct AstPrinter; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LoxClass` is never constructed [INFO] [stdout] --> src/function/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum LoxCallable { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | LoxClass(LoxClass), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LoxCallable` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `METHOD` is never constructed [INFO] [stdout] --> src/function/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum FunctionType { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | METHOD, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `run_prompt` is never used [INFO] [stdout] --> src/lox.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 18 | impl Lox { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub(crate) fn run_prompt() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Class` is never constructed [INFO] [stdout] --> src/object.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) enum Object { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 15 | Class(LoxClass), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Object` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `boolean` is never used [INFO] [stdout] --> src/object.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Object { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn boolean(b: bool) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `arguments` is never used [INFO] [stdout] --> src/parser.rs:382:8 [INFO] [stdout] | [INFO] [stdout] 19 | impl Parser { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 382 | fn arguments(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/stmt/mod.rs:31:11 [INFO] [stdout] | [INFO] [stdout] 31 | Class(class::Class), [INFO] [stdout] | ----- ^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 31 | Class(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit_class_stmt` is never used [INFO] [stdout] --> src/stmt/mod.rs:136:8 [INFO] [stdout] | [INFO] [stdout] 112 | pub(crate) trait Visitor { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 136 | fn visit_class_stmt(&mut self, stmt: class::Class) -> Result<(), LoxError>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `superclass`, and `methods` are never read [INFO] [stdout] --> src/stmt/class.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct Class { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 7 | pub name: Token, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | pub superclass: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub methods: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Class` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `returnValue` should have a snake case name [INFO] [stdout] --> src/function/lox_function.rs:50:39 [INFO] [stdout] | [INFO] [stdout] 50 | Err(LoxError::ReturnError(returnValue)) => { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `return_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/interpreter.rs:432:21 [INFO] [stdout] | [INFO] [stdout] 432 | if let Some(elseBranch) = stmt.else_branch { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `thenBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:34 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `then_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:52 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 84 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expr` [INFO] [stdout] --> src/resolver.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | fn visit_literal_expr(&self, expr: Literal) -> Result, LoxError> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/resolver.rs:290:35 [INFO] [stdout] | [INFO] [stdout] 290 | fn visit_this_expr(&mut self, mut expr: This) -> Result, LoxError> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Clock` is more private than the item `NativeFunction::Clock::0` [INFO] [stdout] --> src/function/native_function.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | Clock(Clock), [INFO] [stdout] | ^^^^^ field `NativeFunction::Clock::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `Clock` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/function/native_function.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | struct Clock; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `CLASS` is never constructed [INFO] [stdout] --> src/class.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) enum ClassType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 19 | NONE, [INFO] [stdout] 20 | CLASS, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ClassType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/class.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl LoxClass { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 25 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/error.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ParseError { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 30 | pub fn new(token: Token, message: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AstPrinter` is never constructed [INFO] [stdout] --> src/expr/ast_printer.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) struct AstPrinter; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LoxClass` is never constructed [INFO] [stdout] --> src/function/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum LoxCallable { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | LoxClass(LoxClass), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LoxCallable` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `METHOD` is never constructed [INFO] [stdout] --> src/function/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum FunctionType { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | METHOD, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `run_prompt` is never used [INFO] [stdout] --> src/lox.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 18 | impl Lox { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub(crate) fn run_prompt() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Class` is never constructed [INFO] [stdout] --> src/object.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) enum Object { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 15 | Class(LoxClass), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Object` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `boolean` is never used [INFO] [stdout] --> src/object.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Object { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn boolean(b: bool) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `arguments` is never used [INFO] [stdout] --> src/parser.rs:382:8 [INFO] [stdout] | [INFO] [stdout] 19 | impl Parser { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 382 | fn arguments(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/stmt/mod.rs:31:11 [INFO] [stdout] | [INFO] [stdout] 31 | Class(class::Class), [INFO] [stdout] | ----- ^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 31 | Class(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit_class_stmt` is never used [INFO] [stdout] --> src/stmt/mod.rs:136:8 [INFO] [stdout] | [INFO] [stdout] 112 | pub(crate) trait Visitor { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 136 | fn visit_class_stmt(&mut self, stmt: class::Class) -> Result<(), LoxError>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `superclass`, and `methods` are never read [INFO] [stdout] --> src/stmt/class.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct Class { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 7 | pub name: Token, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | pub superclass: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub methods: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Class` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = Lox::run_file(r#"C:\rock\coding\code\my\rust\r-lox\tmp\a.lox"#); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `returnValue` should have a snake case name [INFO] [stdout] --> src/function/lox_function.rs:50:39 [INFO] [stdout] | [INFO] [stdout] 50 | Err(LoxError::ReturnError(returnValue)) => { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `return_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/interpreter.rs:432:21 [INFO] [stdout] | [INFO] [stdout] 432 | if let Some(elseBranch) = stmt.else_branch { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `thenBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:34 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `then_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `elseBranch` should have a snake case name [INFO] [stdout] --> src/stmt/mod.rs:81:52 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn r#if(condition: Expr, thenBranch: Stmt, elseBranch: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `else_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 87 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.87s [INFO] running `Command { std: "docker" "inspect" "f2772e8dea4edefe08b92d987c8e041c982e9a1127c1bf83781c6821bc7d6add", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f2772e8dea4edefe08b92d987c8e041c982e9a1127c1bf83781c6821bc7d6add", kill_on_drop: false }` [INFO] [stdout] f2772e8dea4edefe08b92d987c8e041c982e9a1127c1bf83781c6821bc7d6add