[INFO] cloning repository https://github.com/wangbyby/alg_in_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wangbyby/alg_in_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwangbyby%2Falg_in_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwangbyby%2Falg_in_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5571cda03e03a9549ed259c7a2e56d9b210941cc [INFO] checking wangbyby/alg_in_rust against try#998b6603a58e47f42ccce7a67943234e96b6839e for pr-143170 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwangbyby%2Falg_in_rust" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/wangbyby/alg_in_rust [INFO] finished tweaking git repo https://github.com/wangbyby/alg_in_rust [INFO] tweaked toml for git repo https://github.com/wangbyby/alg_in_rust written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/wangbyby/alg_in_rust on toolchain 998b6603a58e47f42ccce7a67943234e96b6839e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+998b6603a58e47f42ccce7a67943234e96b6839e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/wangbyby/alg_in_rust 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" "+998b6603a58e47f42ccce7a67943234e96b6839e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+998b6603a58e47f42ccce7a67943234e96b6839e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 45348aeef6ac9b62c322d700a7ccc595482b55c6dee7a025f7205ea2a2d5ed54 [INFO] running `Command { std: "docker" "start" "-a" "45348aeef6ac9b62c322d700a7ccc595482b55c6dee7a025f7205ea2a2d5ed54", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "45348aeef6ac9b62c322d700a7ccc595482b55c6dee7a025f7205ea2a2d5ed54", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "45348aeef6ac9b62c322d700a7ccc595482b55c6dee7a025f7205ea2a2d5ed54", kill_on_drop: false }` [INFO] [stdout] 45348aeef6ac9b62c322d700a7ccc595482b55c6dee7a025f7205ea2a2d5ed54 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+998b6603a58e47f42ccce7a67943234e96b6839e" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c2a799056d037fc05986e98a936c7fd7a6dc7ea0ebec1536d7924dd4021c0fdc [INFO] running `Command { std: "docker" "start" "-a" "c2a799056d037fc05986e98a936c7fd7a6dc7ea0ebec1536d7924dd4021c0fdc", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.79 [INFO] [stderr] Compiling libc v0.2.66 [INFO] [stderr] Compiling thiserror v1.0.58 [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Compiling syn v2.0.53 [INFO] [stderr] Checking rand v0.5.6 [INFO] [stderr] Compiling thiserror-impl v1.0.58 [INFO] [stderr] Checking monkey v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/evaluator/test.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::FullError::*` [INFO] [stdout] --> src/parser/parser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::FullError::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::ast::ast` [INFO] [stdout] --> src/parser/test.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::ast::ast; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::mylexer::lexer` [INFO] [stdout] --> src/parser/test.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::mylexer::lexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::token` [INFO] [stdout] --> src/parser/test.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::token::token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/parser/test.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::parser` [INFO] [stdout] --> src/parser/test.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use super::parser; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `io::Write` [INFO] [stdout] --> src/token/token.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, io::Write}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `error` and `io` [INFO] [stdout] --> src/lib.rs:11:11 [INFO] [stdout] | [INFO] [stdout] 11 | use std::{error, io}; [INFO] [stdout] | ^^^^^ ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/evaluator/test.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `mylexer::lexer` [INFO] [stdout] --> src/mylexer/lexer.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 151 | mylexer::lexer, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::FullError::*` [INFO] [stdout] --> src/parser/parser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::FullError::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/parser/parser.rs:519:26 [INFO] [stdout] | [INFO] [stdout] 519 | mylexer::lexer::{self, Lexer}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::token::token` [INFO] [stdout] --> src/parser/test.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::token::token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/parser/test.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `io::Write` [INFO] [stdout] --> src/token/token.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, io::Write}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `error` and `io` [INFO] [stdout] --> src/lib.rs:11:11 [INFO] [stdout] | [INFO] [stdout] 11 | use std::{error, io}; [INFO] [stdout] | ^^^^^ ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/evaluator/evaluator.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | Box::new($b) [INFO] [stdout] | ^^^^^^^^^^^^ unreachable expression [INFO] [stdout] ... [INFO] [stdout] 31 | / match node { [INFO] [stdout] 32 | | //关键的一行代码 [INFO] [stdout] 33 | | Program(ref value) => return eval_program(value, &mut env), [INFO] [stdout] 34 | | ExpressionStatement(ref value) => return eval(&value.expression, &mut env), [INFO] [stdout] ... | [INFO] [stdout] 130 | | _ => return theobject_null!(), [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____- any code following this `match` expression is unreachable, as all arms diverge [INFO] [stdout] 132 | theobject_null!() [INFO] [stdout] | ----------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] = note: this warning originates in the macro `new_box` which comes from the expansion of the macro `theobject_null` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/evaluator/evaluator.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | Box::new($b) [INFO] [stdout] | ^^^^^^^^^^^^ unreachable expression [INFO] [stdout] ... [INFO] [stdout] 31 | / match node { [INFO] [stdout] 32 | | //关键的一行代码 [INFO] [stdout] 33 | | Program(ref value) => return eval_program(value, &mut env), [INFO] [stdout] 34 | | ExpressionStatement(ref value) => return eval(&value.expression, &mut env), [INFO] [stdout] ... | [INFO] [stdout] 130 | | _ => return theobject_null!(), [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____- any code following this `match` expression is unreachable, as all arms diverge [INFO] [stdout] 132 | theobject_null!() [INFO] [stdout] | ----------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] = note: this warning originates in the macro `new_box` which comes from the expansion of the macro `theobject_null` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | token: this.cur_token.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 83 | token: Some(this.cur_token.clone()), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | token: this.cur_token.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 83 | token: Some(this.cur_token.clone()), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 189 | Ok(ast::ASTNode::StringLiteral( [INFO] [stdout] | --------------------------- arguments to this enum variant are incorrect [INFO] [stdout] 190 | this.cur_token.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | StringLiteral(TokenAST, String), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 190 | Some(this.cur_token.clone()), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 196 | Ok(ast::ASTNode::ArrayLiteral( [INFO] [stdout] | -------------------------- arguments to this enum variant are incorrect [INFO] [stdout] 197 | this.cur_token.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ArrayLiteral(TokenAST, Vec>), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 197 | Some(this.cur_token.clone()), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 189 | Ok(ast::ASTNode::StringLiteral( [INFO] [stdout] | --------------------------- arguments to this enum variant are incorrect [INFO] [stdout] 190 | this.cur_token.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | StringLiteral(TokenAST, String), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 190 | Some(this.cur_token.clone()), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 196 | Ok(ast::ASTNode::ArrayLiteral( [INFO] [stdout] | -------------------------- arguments to this enum variant are incorrect [INFO] [stdout] 197 | this.cur_token.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | ArrayLiteral(TokenAST, Vec>), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 197 | Some(this.cur_token.clone()), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 211 | Ok(ast::ASTNode::IndexLiteral( [INFO] [stdout] | -------------------------- arguments to this enum variant are incorrect [INFO] [stdout] 212 | cur_token, [INFO] [stdout] | ^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | IndexLiteral(TokenAST, Box, Box), //token, left, index [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 212 | Some(cur_token), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:246:34 [INFO] [stdout] | [INFO] [stdout] 246 | Ok(ast::ASTNode::HashLiteral(cur_token, hash)) [INFO] [stdout] | ------------------------- ^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | | [INFO] [stdout] | arguments to this enum variant are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | HashLiteral(TokenAST, Vec<(Box, Box)>), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 246 | Ok(ast::ASTNode::HashLiteral(Some(cur_token), hash)) [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 211 | Ok(ast::ASTNode::IndexLiteral( [INFO] [stdout] | -------------------------- arguments to this enum variant are incorrect [INFO] [stdout] 212 | cur_token, [INFO] [stdout] | ^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | IndexLiteral(TokenAST, Box, Box), //token, left, index [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 212 | Some(cur_token), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:246:34 [INFO] [stdout] | [INFO] [stdout] 246 | Ok(ast::ASTNode::HashLiteral(cur_token, hash)) [INFO] [stdout] | ------------------------- ^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | | [INFO] [stdout] | arguments to this enum variant are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] note: tuple variant defined here [INFO] [stdout] --> src/ast/ast.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | HashLiteral(TokenAST, Vec<(Box, Box)>), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 246 | Ok(ast::ASTNode::HashLiteral(Some(cur_token), hash)) [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:251:21 [INFO] [stdout] | [INFO] [stdout] 251 | letstmt.token = this.cur_token.clone(); [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | | [INFO] [stdout] | expected due to the type of this binding [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 251 | letstmt.token = Some(this.cur_token.clone()); [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:251:21 [INFO] [stdout] | [INFO] [stdout] 251 | letstmt.token = this.cur_token.clone(); [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `Option`, found `Token` [INFO] [stdout] | | [INFO] [stdout] | expected due to the type of this binding [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 251 | letstmt.token = Some(this.cur_token.clone()); [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:476:20 [INFO] [stdout] | [INFO] [stdout] 476 | token: id, [INFO] [stdout] | ^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 476 | token: Some(id), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/parser.rs:476:20 [INFO] [stdout] | [INFO] [stdout] 476 | token: id, [INFO] [stdout] | ^^ expected `Option`, found `Token` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found struct `Token` [INFO] [stdout] help: try wrapping the expression in `Some` [INFO] [stdout] | [INFO] [stdout] 476 | token: Some(id), [INFO] [stdout] | +++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/mylexer/lexer.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | let mut tok: Token; [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: variable does not need to be mutable [INFO] [stdout] --> src/repl/repl.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let mut lexer = Lexer::new(&scanned); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `body` [INFO] [stdout] --> src/evaluator/test.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | object::TheObject::Func(ref params, ref body, ref env) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_body` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env` [INFO] [stdout] --> src/evaluator/test.rs:170:59 [INFO] [stdout] | [INFO] [stdout] 170 | object::TheObject::Func(ref params, ref body, ref env) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_env` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `monkey` (lib) due to 7 previous errors; 12 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/mylexer/lexer.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | let mut tok: Token; [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: variable does not need to be mutable [INFO] [stdout] --> src/mylexer/lexer.rs:163:13 [INFO] [stdout] | [INFO] [stdout] 163 | let mut a = Token::new(Let, "let"); [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/mylexer/lexer.rs:166:13 [INFO] [stdout] | [INFO] [stdout] 166 | let mut a = Token::new(IDENT, 'a'); [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/mylexer/lexer.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | let mut a = Token::new(ASSIGN, '='); [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/mylexer/lexer.rs:172:13 [INFO] [stdout] | [INFO] [stdout] 172 | let mut a = Token::new(INT, "10"); [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/mylexer/lexer.rs:183:13 [INFO] [stdout] | [INFO] [stdout] 183 | let mut lexer = Lexer::new(s); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/parser/test.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | for (i, (input, expected)) in tests.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `func` [INFO] [stdout] --> src/parser/test.rs:48:55 [INFO] [stdout] | [INFO] [stdout] 48 | ast::ASTNode::FuncLiteral(ref func) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_func` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/repl/repl.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let mut lexer = Lexer::new(&scanned); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `monkey` (lib test) due to 7 previous errors; 20 warnings emitted [INFO] running `Command { std: "docker" "inspect" "c2a799056d037fc05986e98a936c7fd7a6dc7ea0ebec1536d7924dd4021c0fdc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c2a799056d037fc05986e98a936c7fd7a6dc7ea0ebec1536d7924dd4021c0fdc", kill_on_drop: false }` [INFO] [stdout] c2a799056d037fc05986e98a936c7fd7a6dc7ea0ebec1536d7924dd4021c0fdc