[INFO] cloning repository https://github.com/hanako-eo/peanut [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hanako-eo/peanut" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhanako-eo%2Fpeanut", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhanako-eo%2Fpeanut'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 50aa1d9f3f01f4012bcf34fe997a0896c615bb39 [INFO] checking hanako-eo/peanut against try#998b6603a58e47f42ccce7a67943234e96b6839e for pr-143170 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhanako-eo%2Fpeanut" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/hanako-eo/peanut [INFO] finished tweaking git repo https://github.com/hanako-eo/peanut [INFO] tweaked toml for git repo https://github.com/hanako-eo/peanut written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/hanako-eo/peanut 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/hanako-eo/peanut 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] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] d7e3b3008e8409184133c6a4ad611993cb4725e9eac42ebabe5055a5cb35f130 [INFO] running `Command { std: "docker" "start" "-a" "d7e3b3008e8409184133c6a4ad611993cb4725e9eac42ebabe5055a5cb35f130", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d7e3b3008e8409184133c6a4ad611993cb4725e9eac42ebabe5055a5cb35f130", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d7e3b3008e8409184133c6a4ad611993cb4725e9eac42ebabe5055a5cb35f130", kill_on_drop: false }` [INFO] [stdout] d7e3b3008e8409184133c6a4ad611993cb4725e9eac42ebabe5055a5cb35f130 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 19717b20bb262f8ae3bcbe1349912ffc1b8aacd70bf171fac437a61609cea555 [INFO] running `Command { std: "docker" "start" "-a" "19717b20bb262f8ae3bcbe1349912ffc1b8aacd70bf171fac437a61609cea555", kill_on_drop: false }` [INFO] [stderr] Checking peanut v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0726]: implicit elided lifetime not allowed here [INFO] [stdout] --> src/frontend/ast.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | impl TryFrom for Op { [INFO] [stdout] | ^^^^^ expected lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: indicate the anonymous lifetime [INFO] [stdout] | [INFO] [stdout] 27 | impl TryFrom> for Op { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/frontend/ast.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | type Error = Error; [INFO] [stdout] | ^^^^^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter [INFO] [stdout] | [INFO] [stdout] 28 | type Error<'a> = Error<'a>; [INFO] [stdout] | ++++ ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/frontend/parser.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | tokens: VecDeque, [INFO] [stdout] | ^^^^^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter [INFO] [stdout] | [INFO] [stdout] 15 ~ pub struct Parser<'a> { [INFO] [stdout] 16 ~ tokens: VecDeque>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0726]: implicit elided lifetime not allowed here [INFO] [stdout] --> src/frontend/ast.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | impl TryFrom for Op { [INFO] [stdout] | ^^^^^ expected lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: indicate the anonymous lifetime [INFO] [stdout] | [INFO] [stdout] 27 | impl TryFrom> for Op { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/frontend/ast.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | type Error = Error; [INFO] [stdout] | ^^^^^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter [INFO] [stdout] | [INFO] [stdout] 28 | type Error<'a> = Error<'a>; [INFO] [stdout] | ++++ ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/runtime/environment.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | ) -> Result { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values [INFO] [stdout] | [INFO] [stdout] 78 | ) -> Result<'static, RuntimeValue> { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/runtime/environment.rs:86:76 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn lookup_var(env: Rc>, varname: String) -> Result { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values [INFO] [stdout] | [INFO] [stdout] 86 | pub fn lookup_var(env: Rc>, varname: String) -> Result<'static, RuntimeValue> { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/runtime/environment.rs:112:12 [INFO] [stdout] | [INFO] [stdout] 112 | ) -> Result>> { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values [INFO] [stdout] | [INFO] [stdout] 112 | ) -> Result<'static, Rc>> { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/frontend/parser.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | tokens: VecDeque, [INFO] [stdout] | ^^^^^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter [INFO] [stdout] | [INFO] [stdout] 15 ~ pub struct Parser<'a> { [INFO] [stdout] 16 ~ tokens: VecDeque>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ErrorKind`, `Error`, `Expr`, `Op`, `Stmt`, and `UnaryOp` [INFO] [stdout] --> src/frontend/parser.rs:402:18 [INFO] [stdout] | [INFO] [stdout] 402 | errors::{Error, ErrorKind}, [INFO] [stdout] | ^^^^^ ^^^^^^^^^ [INFO] [stdout] 403 | frontend::ast::{Expr, Op, Stmt, UnaryOp}, [INFO] [stdout] | ^^^^ ^^ ^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::Parser` [INFO] [stdout] --> src/frontend/parser.rs:406:9 [INFO] [stdout] | [INFO] [stdout] 406 | use super::Parser; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/runtime/environment.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | ) -> Result { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values [INFO] [stdout] | [INFO] [stdout] 78 | ) -> Result<'static, RuntimeValue> { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/runtime/environment.rs:86:76 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn lookup_var(env: Rc>, varname: String) -> Result { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values [INFO] [stdout] | [INFO] [stdout] 86 | pub fn lookup_var(env: Rc>, varname: String) -> Result<'static, RuntimeValue> { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/runtime/environment.rs:112:12 [INFO] [stdout] | [INFO] [stdout] 112 | ) -> Result>> { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values [INFO] [stdout] | [INFO] [stdout] 112 | ) -> Result<'static, Rc>> { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ErrorKind` and `Error` [INFO] [stdout] --> src/frontend/parser.rs:402:18 [INFO] [stdout] | [INFO] [stdout] 402 | errors::{Error, ErrorKind}, [INFO] [stdout] | ^^^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default [INFO] [stdout] --> src/memory/ptr.rs:11:26 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct GarbageBox { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default [INFO] [stdout] --> src/memory/ptr.rs:110:23 [INFO] [stdout] | [INFO] [stdout] 110 | pub struct WeakRef { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default [INFO] [stdout] --> src/memory/ptr.rs:11:26 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct GarbageBox { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default [INFO] [stdout] --> src/memory/ptr.rs:110:23 [INFO] [stdout] | [INFO] [stdout] 110 | pub struct WeakRef { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `tokenize` found for struct `Lexer` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:21:29 [INFO] [stdout] | [INFO] [stdout] 21 | let tokens = Lexer::tokenize(source)?; [INFO] [stdout] | ^^^^^^^^ function or associated item not found in `Lexer<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/lexer.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Lexer<'i> { [INFO] [stdout] | -------------------- function or associated item `tokenize` not found for this struct [INFO] [stdout] | [INFO] [stdout] note: if you're trying to build a new `Lexer<'_>`, consider using `Lexer::<'i>::new` which returns `Lexer<'_>` [INFO] [stdout] --> src/frontend/lexer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn new(source: &'i str) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:60:62 [INFO] [stdout] | [INFO] [stdout] 60 | Some(token) if matches!(token.kind(), TokenKind::ID(_)) => Ok(self.eat().unwrap()), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 60 - Some(token) if matches!(token.kind(), TokenKind::ID(_)) => Ok(self.eat().unwrap()), [INFO] [stdout] 60 + Some(token) if matches!(token.kind(), TokenKind::If(_)) => Ok(self.eat().unwrap()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:61:71 [INFO] [stdout] | [INFO] [stdout] 61 | Some(token) => self.generate_unexpected(token, TokenKind::ID(String::new())), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 61 - Some(token) => self.generate_unexpected(token, TokenKind::ID(String::new())), [INFO] [stdout] 61 + Some(token) => self.generate_unexpected(token, TokenKind::If), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:62:55 [INFO] [stdout] | [INFO] [stdout] 62 | None => self.generate_expected(TokenKind::ID(String::new())), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 62 - None => self.generate_expected(TokenKind::ID(String::new())), [INFO] [stdout] 62 + None => self.generate_expected(TokenKind::If), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:69:24 [INFO] [stdout] | [INFO] [stdout] 69 | TokenKind::ID(val) => Ok(val.clone()), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 69 - TokenKind::ID(val) => Ok(val.clone()), [INFO] [stdout] 69 + TokenKind::If(val) => Ok(val.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `And` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:258:24 [INFO] [stdout] | [INFO] [stdout] 258 | TokenKind::And, [INFO] [stdout] | ^^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `And` not found for this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Or` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:259:24 [INFO] [stdout] | [INFO] [stdout] 259 | TokenKind::Or, [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `Or` not found for this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `NotEqual` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:266:24 [INFO] [stdout] | [INFO] [stdout] 266 | TokenKind::NotEqual, [INFO] [stdout] | ^^^^^^^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `NotEqual` not found for this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `tokenize` found for struct `Lexer` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:21:29 [INFO] [stdout] | [INFO] [stdout] 21 | let tokens = Lexer::tokenize(source)?; [INFO] [stdout] | ^^^^^^^^ function or associated item not found in `Lexer<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/lexer.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Lexer<'i> { [INFO] [stdout] | -------------------- function or associated item `tokenize` not found for this struct [INFO] [stdout] | [INFO] [stdout] note: if you're trying to build a new `Lexer<'_>`, consider using `Lexer::<'i>::new` which returns `Lexer<'_>` [INFO] [stdout] --> src/frontend/lexer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn new(source: &'i str) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Not` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:335:25 [INFO] [stdout] | [INFO] [stdout] 335 | &TokenKind::Not => Some(UnaryOp::Not), [INFO] [stdout] | ^^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `Not` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 335 - &TokenKind::Not => Some(UnaryOp::Not), [INFO] [stdout] 335 + &TokenKind::Dot => Some(UnaryOp::Not), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:351:24 [INFO] [stdout] | [INFO] [stdout] 351 | TokenKind::ID(symbol) => Expr::Identifier(symbol.clone()), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 351 - TokenKind::ID(symbol) => Expr::Identifier(symbol.clone()), [INFO] [stdout] 351 + TokenKind::If(symbol) => Expr::Identifier(symbol.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:60:62 [INFO] [stdout] | [INFO] [stdout] 60 | Some(token) if matches!(token.kind(), TokenKind::ID(_)) => Ok(self.eat().unwrap()), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 60 - Some(token) if matches!(token.kind(), TokenKind::ID(_)) => Ok(self.eat().unwrap()), [INFO] [stdout] 60 + Some(token) if matches!(token.kind(), TokenKind::If(_)) => Ok(self.eat().unwrap()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:61:71 [INFO] [stdout] | [INFO] [stdout] 61 | Some(token) => self.generate_unexpected(token, TokenKind::ID(String::new())), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 61 - Some(token) => self.generate_unexpected(token, TokenKind::ID(String::new())), [INFO] [stdout] 61 + Some(token) => self.generate_unexpected(token, TokenKind::If), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:62:55 [INFO] [stdout] | [INFO] [stdout] 62 | None => self.generate_expected(TokenKind::ID(String::new())), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 62 - None => self.generate_expected(TokenKind::ID(String::new())), [INFO] [stdout] 62 + None => self.generate_expected(TokenKind::If), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:69:24 [INFO] [stdout] | [INFO] [stdout] 69 | TokenKind::ID(val) => Ok(val.clone()), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 69 - TokenKind::ID(val) => Ok(val.clone()), [INFO] [stdout] 69 + TokenKind::If(val) => Ok(val.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `And` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:258:24 [INFO] [stdout] | [INFO] [stdout] 258 | TokenKind::And, [INFO] [stdout] | ^^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `And` not found for this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Or` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:259:24 [INFO] [stdout] | [INFO] [stdout] 259 | TokenKind::Or, [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `Or` not found for this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `NotEqual` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:266:24 [INFO] [stdout] | [INFO] [stdout] 266 | TokenKind::NotEqual, [INFO] [stdout] | ^^^^^^^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `NotEqual` not found for this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Not` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:335:25 [INFO] [stdout] | [INFO] [stdout] 335 | &TokenKind::Not => Some(UnaryOp::Not), [INFO] [stdout] | ^^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `Not` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 335 - &TokenKind::Not => Some(UnaryOp::Not), [INFO] [stdout] 335 + &TokenKind::Dot => Some(UnaryOp::Not), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `ID` found for enum `TokenKind` in the current scope [INFO] [stdout] --> src/frontend/parser.rs:351:24 [INFO] [stdout] | [INFO] [stdout] 351 | TokenKind::ID(symbol) => Expr::Identifier(symbol.clone()), [INFO] [stdout] | ^^ variant or associated item not found in `TokenKind<'_>` [INFO] [stdout] | [INFO] [stdout] ::: src/frontend/token.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum TokenKind<'s> { [INFO] [stdout] | ---------------------- variant or associated item `ID` not found for this enum [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 351 - TokenKind::ID(symbol) => Expr::Identifier(symbol.clone()), [INFO] [stdout] 351 + TokenKind::If(symbol) => Expr::Identifier(symbol.clone()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:77:29 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 76 | let mut statements = Vec::new(); [INFO] [stdout] 77 | while let Some(_) = self.at(0) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:78:29 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ^^^^------------------- [INFO] [stdout] | | [INFO] [stdout] | `*self` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 79 | if self.check(TokenKind::Semicolon) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 79 | if self.check(TokenKind::Semicolon) { [INFO] [stdout] 80 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 107 | fn parse_var_declaration(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 110 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 111 | [INFO] [stdout] 112 | self.expect(TokenKind::Equal)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 107 | fn parse_var_declaration(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 110 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 114 | let expr = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 130 | let args = self.parse_args_definition()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 132 | let return_type = self.get_ident_value().ok(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:133:28 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 133 | let is_sort_func = self.expect(TokenKind::BigArrow).is_ok(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:137:60 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 137 | body.push(Stmt::ExprStmt(Expr::Return(Box::new(self.parse_expr()?)))); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 139 | self.expect(TokenKind::OpenBrace)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 141 | if self.check(TokenKind::CloseBrace) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:145:27 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 145 | body.push(self.parse_statement()?); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:147:20 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 147 | if self.check(TokenKind::Semicolon) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 148 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 151 | self.expect(TokenKind::CloseBrace)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 169 | loop { [INFO] [stdout] 170 | if self.check(TokenKind::CloseParen) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:174:17 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 174 | self.expect(TokenKind::Comma)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:177:32 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 177 | args.push(callback(self)?); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 179 | if !self.check(TokenKind::Comma) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 183 | self.expect(TokenKind::CloseParen)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*parser` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:190:26 [INFO] [stdout] | [INFO] [stdout] 188 | self.parse_tuple_of(|parser| { [INFO] [stdout] | ------ has type `&'1 mut Parser` [INFO] [stdout] 189 | let arg = parser.get_ident_value()?; [INFO] [stdout] | ------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*parser` is borrowed for `'1` [INFO] [stdout] 190 | let r#type = parser.get_ident_value()?; [INFO] [stdout] | ^^^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:200:27 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 200 | match (first, self.check(TokenKind::Else)) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:204:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 204 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:208:43 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 208 | let condition = match (first, self.check(TokenKind::If)) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:209:35 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 209 | (true, _) => Some(self.parse_expr()?), [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 212 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ^^^^------------------------------ [INFO] [stdout] | | [INFO] [stdout] | `*self` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:214:32 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 214 | let expr = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:215:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 214 | let expr = self.parse_expr()?; [INFO] [stdout] 215 | self.expect(TokenKind::CloseParen)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:220:33 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 220 | let body = Box::new(self.parse_expr()?); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:236:25 [INFO] [stdout] | [INFO] [stdout] 234 | fn parse_while_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 235 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 236 | let condition = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:237:9 [INFO] [stdout] | [INFO] [stdout] 234 | fn parse_while_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 235 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 236 | let condition = self.parse_expr()?; [INFO] [stdout] 237 | self.expect(TokenKind::CloseParen)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:238:20 [INFO] [stdout] | [INFO] [stdout] 234 | fn parse_while_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 235 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 238 | let body = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:311:12 [INFO] [stdout] | [INFO] [stdout] 308 | fn parse_call_member_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 309 | let member = self.parse_primary_expr()?; [INFO] [stdout] | -------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 310 | [INFO] [stdout] 311 | if self.check(TokenKind::OpenParen) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:312:13 [INFO] [stdout] | [INFO] [stdout] 308 | fn parse_call_member_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 309 | let member = self.parse_primary_expr()?; [INFO] [stdout] | -------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 312 | self.parse_call_expr(member) [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:324:12 [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_call_expr(&mut self, caller: Expr) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 321 | self.parse_tuple_of(|parser| parser.parse_expr())?, [INFO] [stdout] | -------------------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 324 | if self.check(TokenKind::OpenParen) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:325:13 [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_call_expr(&mut self, caller: Expr) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 321 | self.parse_tuple_of(|parser| parser.parse_expr())?, [INFO] [stdout] | -------------------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 325 | self.parse_call_expr(expr) [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:385:9 [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected(&self, token: &Token, expected: TokenKind) -> Result { [INFO] [stdout] | - ----- has type `&Token<'1>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 385 | / Err(Error::from_kind(ErrorKind::UnexpectedToken { [INFO] [stdout] 386 | | received: token.clone(), [INFO] [stdout] 387 | | expected, [INFO] [stdout] 388 | | })) [INFO] [stdout] | |___________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected<'a, T>(&self, token: &Token<'a>, expected: TokenKind) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:385:9 [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected(&self, token: &Token, expected: TokenKind) -> Result { [INFO] [stdout] | - -------- has type `TokenKind<'3>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 385 | / Err(Error::from_kind(ErrorKind::UnexpectedToken { [INFO] [stdout] 386 | | received: token.clone(), [INFO] [stdout] 387 | | expected, [INFO] [stdout] 388 | | })) [INFO] [stdout] | |___________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'3` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected<'a, T>(&self, token: &Token, expected: TokenKind<'a>) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:392:9 [INFO] [stdout] | [INFO] [stdout] 391 | fn generate_expected(&self, expected: TokenKind) -> Result { [INFO] [stdout] | - -------- has type `TokenKind<'1>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 392 | Err(Error::from_kind(ErrorKind::ExpectedToken(expected))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 391 | fn generate_expected<'a, T>(&self, expected: TokenKind<'a>) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:396:9 [INFO] [stdout] | [INFO] [stdout] 395 | fn generate_unsuspected(&self, unsuspected: Token) -> Result { [INFO] [stdout] | - ----------- has type `Token<'1>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 396 | Err(Error::from_kind(ErrorKind::UnsuspectedToken(unsuspected))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 395 | fn generate_unsuspected<'a, T>(&self, unsuspected: Token<'a>) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/runtime/evaluator.rs:80:29 [INFO] [stdout] | [INFO] [stdout] 75 | fn evaluate_stmt(&mut self, stmt: Stmt, env: Rc>) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 80 | value = self.evaluate_stmt(stmt, env.clone())? [INFO] [stdout] | ^^^^---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | `*self` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/runtime/evaluator.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 286 | &mut self, [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 292 | let lhs = self.evaluate_expr(lhs, env.clone())?; [INFO] [stdout] | ------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 297 | self.evaluate_expr(rhs, env.clone()) [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/runtime/evaluator.rs:302:23 [INFO] [stdout] | [INFO] [stdout] 286 | &mut self, [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 292 | let lhs = self.evaluate_expr(lhs, env.clone())?; [INFO] [stdout] | ------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 302 | let rhs = self.evaluate_expr(rhs, env.clone())?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/runtime/evaluator.rs:313:32 [INFO] [stdout] | [INFO] [stdout] 304 | let left = &*lhs.borrow(); [INFO] [stdout] | ------------ temporary value created here [INFO] [stdout] ... [INFO] [stdout] 313 | Op::QuotDiv => left.try_quot_div(right)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `lhs` [INFO] [stdout] --> src/runtime/evaluator.rs:313:32 [INFO] [stdout] | [INFO] [stdout] 304 | let left = &*lhs.borrow(); [INFO] [stdout] | --- `lhs` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 313 | Op::QuotDiv => left.try_quot_div(right)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0106, E0499, E0502, E0515, E0599, E0726. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0106`. [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:77:29 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 76 | let mut statements = Vec::new(); [INFO] [stdout] 77 | while let Some(_) = self.at(0) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:78:29 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ^^^^------------------- [INFO] [stdout] | | [INFO] [stdout] | `*self` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 79 | if self.check(TokenKind::Semicolon) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_program(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 78 | statements.push(self.parse_statement()?); [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 79 | if self.check(TokenKind::Semicolon) { [INFO] [stdout] 80 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 107 | fn parse_var_declaration(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 110 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 111 | [INFO] [stdout] 112 | self.expect(TokenKind::Equal)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 107 | fn parse_var_declaration(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 110 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 114 | let expr = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 130 | let args = self.parse_args_definition()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `peanut` (bin "peanut") due to 65 previous errors; 2 warnings emitted [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 132 | let return_type = self.get_ident_value().ok(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:133:28 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 133 | let is_sort_func = self.expect(TokenKind::BigArrow).is_ok(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:137:60 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 137 | body.push(Stmt::ExprStmt(Expr::Return(Box::new(self.parse_expr()?)))); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 139 | self.expect(TokenKind::OpenBrace)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 141 | if self.check(TokenKind::CloseBrace) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:145:27 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 145 | body.push(self.parse_statement()?); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:147:20 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 147 | if self.check(TokenKind::Semicolon) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 148 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 123 | fn parse_function(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 129 | let name = self.get_ident_value()?; [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 151 | self.expect(TokenKind::CloseBrace)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 169 | loop { [INFO] [stdout] 170 | if self.check(TokenKind::CloseParen) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:174:17 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 174 | self.expect(TokenKind::Comma)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:177:32 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 177 | args.push(callback(self)?); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 179 | if !self.check(TokenKind::Comma) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 162 | fn parse_tuple_of(&mut self, callback: F) -> Result> [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 168 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 183 | self.expect(TokenKind::CloseParen)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*parser` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:190:26 [INFO] [stdout] | [INFO] [stdout] 188 | self.parse_tuple_of(|parser| { [INFO] [stdout] | ------ has type `&'1 mut Parser` [INFO] [stdout] 189 | let arg = parser.get_ident_value()?; [INFO] [stdout] | ------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*parser` is borrowed for `'1` [INFO] [stdout] 190 | let r#type = parser.get_ident_value()?; [INFO] [stdout] | ^^^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:200:27 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 200 | match (first, self.check(TokenKind::Else)) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:204:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 204 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:208:43 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 208 | let condition = match (first, self.check(TokenKind::If)) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:209:35 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 209 | (true, _) => Some(self.parse_expr()?), [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 212 | self.eat(); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ^^^^------------------------------ [INFO] [stdout] | | [INFO] [stdout] | `*self` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:214:32 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 214 | let expr = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:215:21 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 214 | let expr = self.parse_expr()?; [INFO] [stdout] 215 | self.expect(TokenKind::CloseParen)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:220:33 [INFO] [stdout] | [INFO] [stdout] 195 | fn parse_if_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 213 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 220 | let body = Box::new(self.parse_expr()?); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:236:25 [INFO] [stdout] | [INFO] [stdout] 234 | fn parse_while_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 235 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 236 | let condition = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:237:9 [INFO] [stdout] | [INFO] [stdout] 234 | fn parse_while_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 235 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 236 | let condition = self.parse_expr()?; [INFO] [stdout] 237 | self.expect(TokenKind::CloseParen)?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:238:20 [INFO] [stdout] | [INFO] [stdout] 234 | fn parse_while_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 235 | self.expect(TokenKind::OpenParen)?; [INFO] [stdout] | ---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 238 | let body = self.parse_expr()?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:311:12 [INFO] [stdout] | [INFO] [stdout] 308 | fn parse_call_member_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 309 | let member = self.parse_primary_expr()?; [INFO] [stdout] | -------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] 310 | [INFO] [stdout] 311 | if self.check(TokenKind::OpenParen) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:312:13 [INFO] [stdout] | [INFO] [stdout] 308 | fn parse_call_member_expr(&mut self) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] 309 | let member = self.parse_primary_expr()?; [INFO] [stdout] | -------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 312 | self.parse_call_expr(member) [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/frontend/parser.rs:324:12 [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_call_expr(&mut self, caller: Expr) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 321 | self.parse_tuple_of(|parser| parser.parse_expr())?, [INFO] [stdout] | -------------------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 324 | if self.check(TokenKind::OpenParen) { [INFO] [stdout] | ^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/frontend/parser.rs:325:13 [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_call_expr(&mut self, caller: Expr) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 321 | self.parse_tuple_of(|parser| parser.parse_expr())?, [INFO] [stdout] | -------------------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 325 | self.parse_call_expr(expr) [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:385:9 [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected(&self, token: &Token, expected: TokenKind) -> Result { [INFO] [stdout] | - ----- has type `&Token<'1>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 385 | / Err(Error::from_kind(ErrorKind::UnexpectedToken { [INFO] [stdout] 386 | | received: token.clone(), [INFO] [stdout] 387 | | expected, [INFO] [stdout] 388 | | })) [INFO] [stdout] | |___________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected<'a, T>(&self, token: &Token<'a>, expected: TokenKind) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:385:9 [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected(&self, token: &Token, expected: TokenKind) -> Result { [INFO] [stdout] | - -------- has type `TokenKind<'3>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 385 | / Err(Error::from_kind(ErrorKind::UnexpectedToken { [INFO] [stdout] 386 | | received: token.clone(), [INFO] [stdout] 387 | | expected, [INFO] [stdout] 388 | | })) [INFO] [stdout] | |___________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'3` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 384 | fn generate_unexpected<'a, T>(&self, token: &Token, expected: TokenKind<'a>) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:392:9 [INFO] [stdout] | [INFO] [stdout] 391 | fn generate_expected(&self, expected: TokenKind) -> Result { [INFO] [stdout] | - -------- has type `TokenKind<'1>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 392 | Err(Error::from_kind(ErrorKind::ExpectedToken(expected))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 391 | fn generate_expected<'a, T>(&self, expected: TokenKind<'a>) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/frontend/parser.rs:396:9 [INFO] [stdout] | [INFO] [stdout] 395 | fn generate_unsuspected(&self, unsuspected: Token) -> Result { [INFO] [stdout] | - ----------- has type `Token<'1>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 396 | Err(Error::from_kind(ErrorKind::UnsuspectedToken(unsuspected))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 395 | fn generate_unsuspected<'a, T>(&self, unsuspected: Token<'a>) -> Result<'a, T> { [INFO] [stdout] | +++ ++++ +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/runtime/evaluator.rs:80:29 [INFO] [stdout] | [INFO] [stdout] 75 | fn evaluate_stmt(&mut self, stmt: Stmt, env: Rc>) -> Result { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 80 | value = self.evaluate_stmt(stmt, env.clone())? [INFO] [stdout] | ^^^^---------------------------------- [INFO] [stdout] | | [INFO] [stdout] | `*self` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/runtime/evaluator.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 286 | &mut self, [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 292 | let lhs = self.evaluate_expr(lhs, env.clone())?; [INFO] [stdout] | ------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 297 | self.evaluate_expr(rhs, env.clone()) [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> src/runtime/evaluator.rs:302:23 [INFO] [stdout] | [INFO] [stdout] 286 | &mut self, [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 292 | let lhs = self.evaluate_expr(lhs, env.clone())?; [INFO] [stdout] | ------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | returning this value requires that `*self` is borrowed for `'1` [INFO] [stdout] ... [INFO] [stdout] 302 | let rhs = self.evaluate_expr(rhs, env.clone())?; [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/runtime/evaluator.rs:313:32 [INFO] [stdout] | [INFO] [stdout] 304 | let left = &*lhs.borrow(); [INFO] [stdout] | ------------ temporary value created here [INFO] [stdout] ... [INFO] [stdout] 313 | Op::QuotDiv => left.try_quot_div(right)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `lhs` [INFO] [stdout] --> src/runtime/evaluator.rs:313:32 [INFO] [stdout] | [INFO] [stdout] 304 | let left = &*lhs.borrow(); [INFO] [stdout] | --- `lhs` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 313 | Op::QuotDiv => left.try_quot_div(right)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0106, E0499, E0502, E0515, E0599, E0726. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0106`. [INFO] [stdout] [INFO] [stderr] error: could not compile `peanut` (bin "peanut" test) due to 65 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "19717b20bb262f8ae3bcbe1349912ffc1b8aacd70bf171fac437a61609cea555", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "19717b20bb262f8ae3bcbe1349912ffc1b8aacd70bf171fac437a61609cea555", kill_on_drop: false }` [INFO] [stdout] 19717b20bb262f8ae3bcbe1349912ffc1b8aacd70bf171fac437a61609cea555