[INFO] updating cached repository https://github.com/gress2/rlox [INFO] running `"git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "-c" "remote.origin.fetch=refs/heads/*:refs/heads/*" "fetch" "origin" "--force" "--prune"` [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 8e91c50472d7252645658823a1068b3dad2adb8e [INFO] checking gress2/rlox against try#e4dba30b9b475d8750370c4dfb49b6541990904d for pr-71393 [INFO] running `"git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgress2%2Frlox" "/workspace/builds/worker-8/source"` [INFO] [stderr] Cloning into '/workspace/builds/worker-8/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/gress2/rlox on toolchain e4dba30b9b475d8750370c4dfb49b6541990904d [INFO] running `"/workspace/cargo-home/bin/cargo" "+e4dba30b9b475d8750370c4dfb49b6541990904d" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started tweaking git repo https://github.com/gress2/rlox [INFO] finished tweaking git repo https://github.com/gress2/rlox [INFO] tweaked toml for git repo https://github.com/gress2/rlox written to /workspace/builds/worker-8/source/Cargo.toml [INFO] crate git repo https://github.com/gress2/rlox already has a lockfile, it will not be regenerated [INFO] running `"/workspace/cargo-home/bin/cargo" "+e4dba30b9b475d8750370c4dfb49b6541990904d" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-8/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-8/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" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+e4dba30b9b475d8750370c4dfb49b6541990904d" "check" "--frozen" "--all" "--all-targets"` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 66d3f1e2a01cffa5df3d6634739172d2316c3e77b119b1576709b01bca49ffe8 [INFO] running `"docker" "start" "-a" "66d3f1e2a01cffa5df3d6634739172d2316c3e77b119b1576709b01bca49ffe8"` [INFO] [stderr] Checking rlox v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] warning: unused variable: `line` [INFO] [stderr] --> src/main.rs:9:11 [INFO] [stderr] | [INFO] [stderr] 9 | fn report(line: i8, loc: String, message: String) -> () { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `loc` [INFO] [stderr] --> src/main.rs:9:21 [INFO] [stderr] | [INFO] [stderr] 9 | fn report(line: i8, loc: String, message: String) -> () { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_loc` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `message` [INFO] [stderr] --> src/main.rs:9:34 [INFO] [stderr] | [INFO] [stderr] 9 | fn report(line: i8, loc: String, message: String) -> () { [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `line` [INFO] [stderr] --> src/main.rs:13:10 [INFO] [stderr] | [INFO] [stderr] 13 | fn error(line: i8, message: String) -> () { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `message` [INFO] [stderr] --> src/main.rs:13:20 [INFO] [stderr] | [INFO] [stderr] 13 | fn error(line: i8, message: String) -> () { [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `tokens` [INFO] [stderr] --> src/main.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | let tokens = scanner::scan_tokens(source); [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokens` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `had_error` [INFO] [stderr] --> src/main.rs:17:24 [INFO] [stderr] | [INFO] [stderr] 17 | fn run(source: String, had_error: &bool) -> () { [INFO] [stderr] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_had_error` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `start_iter` [INFO] [stderr] --> src/scanner.rs:8:47 [INFO] [stderr] | [INFO] [stderr] 8 | fn build_token(type_ : TokenType, line : &i8, start_iter : &Peekable, end_iter : &Peekable) -> Token { [INFO] [stderr] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_start_iter` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `end_iter` [INFO] [stderr] --> src/scanner.rs:8:78 [INFO] [stderr] | [INFO] [stderr] 8 | fn build_token(type_ : TokenType, line : &i8, start_iter : &Peekable, end_iter : &Peekable) -> Token { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_end_iter` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src_len` [INFO] [stderr] --> src/scanner.rs:238:9 [INFO] [stderr] | [INFO] [stderr] 238 | let src_len = source.len(); [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_len` [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `*char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:141:11 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 141 | match char_iter.next() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 231 | None => return tokenize(TokenType::Eof) [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:154:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 154 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 157 | return tokenize(TokenType::Bang); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:161:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 161 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 164 | return tokenize(TokenType::Equal); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:168:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 168 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 171 | return tokenize(TokenType::Less); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:175:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 175 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 178 | return tokenize(TokenType::Greater); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:182:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 182 | if next_matches('/', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 186 | return tokenize(TokenType::Slash); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:183:37 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 183 | consume_comment(&mut char_iter, &mut line); [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] 184 | return tokenize(TokenType::Null); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `line` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:183:53 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | ---- first borrow occurs due to use of `line` in closure [INFO] [stderr] ... [INFO] [stderr] 183 | consume_comment(&mut char_iter, &mut line); [INFO] [stderr] | ^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] 184 | return tokenize(TokenType::Null); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0506]: cannot assign to `*line` because it is borrowed [INFO] [stderr] --> src/scanner.rs:193:17 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- borrow of `*line` occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | ---- borrow occurs due to use in closure [INFO] [stderr] ... [INFO] [stderr] 193 | *line += 1; [INFO] [stderr] | ^^^^^^^^^^ assignment to borrowed `*line` occurs here [INFO] [stderr] 194 | return tokenize(TokenType::Null); [INFO] [stderr] | -------- borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:205:56 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 205 | let s : String = get_identifier(c, &mut char_iter); [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 208 | "and" => return tokenize(TokenType::And), [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error: aborting due to 10 previous errors; 10 warnings emitted [INFO] [stderr] [INFO] [stderr] Some errors have detailed explanations: E0502, E0506. [INFO] [stderr] For more information about an error, try `rustc --explain E0502`. [INFO] [stderr] error: could not compile `rlox`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: unused variable: `line` [INFO] [stderr] --> src/main.rs:9:11 [INFO] [stderr] | [INFO] [stderr] 9 | fn report(line: i8, loc: String, message: String) -> () { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `loc` [INFO] [stderr] --> src/main.rs:9:21 [INFO] [stderr] | [INFO] [stderr] 9 | fn report(line: i8, loc: String, message: String) -> () { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_loc` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `message` [INFO] [stderr] --> src/main.rs:9:34 [INFO] [stderr] | [INFO] [stderr] 9 | fn report(line: i8, loc: String, message: String) -> () { [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `line` [INFO] [stderr] --> src/main.rs:13:10 [INFO] [stderr] | [INFO] [stderr] 13 | fn error(line: i8, message: String) -> () { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `message` [INFO] [stderr] --> src/main.rs:13:20 [INFO] [stderr] | [INFO] [stderr] 13 | fn error(line: i8, message: String) -> () { [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `tokens` [INFO] [stderr] --> src/main.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | let tokens = scanner::scan_tokens(source); [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokens` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `had_error` [INFO] [stderr] --> src/main.rs:17:24 [INFO] [stderr] | [INFO] [stderr] 17 | fn run(source: String, had_error: &bool) -> () { [INFO] [stderr] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_had_error` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `start_iter` [INFO] [stderr] --> src/scanner.rs:8:47 [INFO] [stderr] | [INFO] [stderr] 8 | fn build_token(type_ : TokenType, line : &i8, start_iter : &Peekable, end_iter : &Peekable) -> Token { [INFO] [stderr] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_start_iter` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `end_iter` [INFO] [stderr] --> src/scanner.rs:8:78 [INFO] [stderr] | [INFO] [stderr] 8 | fn build_token(type_ : TokenType, line : &i8, start_iter : &Peekable, end_iter : &Peekable) -> Token { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_end_iter` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src_len` [INFO] [stderr] --> src/scanner.rs:238:9 [INFO] [stderr] | [INFO] [stderr] 238 | let src_len = source.len(); [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_len` [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `*char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:141:11 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 141 | match char_iter.next() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 231 | None => return tokenize(TokenType::Eof) [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:154:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 154 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 157 | return tokenize(TokenType::Bang); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:161:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 161 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 164 | return tokenize(TokenType::Equal); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:168:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 168 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 171 | return tokenize(TokenType::Less); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:175:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 175 | if next_matches('=', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 178 | return tokenize(TokenType::Greater); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:182:38 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 182 | if next_matches('/', &mut char_iter) { [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 186 | return tokenize(TokenType::Slash); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:183:37 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 183 | consume_comment(&mut char_iter, &mut line); [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] 184 | return tokenize(TokenType::Null); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `line` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:183:53 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | ---- first borrow occurs due to use of `line` in closure [INFO] [stderr] ... [INFO] [stderr] 183 | consume_comment(&mut char_iter, &mut line); [INFO] [stderr] | ^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] 184 | return tokenize(TokenType::Null); [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0506]: cannot assign to `*line` because it is borrowed [INFO] [stderr] --> src/scanner.rs:193:17 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- borrow of `*line` occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | ---- borrow occurs due to use in closure [INFO] [stderr] ... [INFO] [stderr] 193 | *line += 1; [INFO] [stderr] | ^^^^^^^^^^ assignment to borrowed `*line` occurs here [INFO] [stderr] 194 | return tokenize(TokenType::Null); [INFO] [stderr] | -------- borrow later used here [INFO] [stderr] [INFO] [stderr] error[E0502]: cannot borrow `char_iter` as mutable because it is also borrowed as immutable [INFO] [stderr] --> src/scanner.rs:205:56 [INFO] [stderr] | [INFO] [stderr] 137 | let tokenize = | ty: TokenType | -> Token { [INFO] [stderr] | -------------------------- immutable borrow occurs here [INFO] [stderr] 138 | build_token(ty, &line, &start_iter, &char_iter) [INFO] [stderr] | --------- first borrow occurs due to use of `char_iter` in closure [INFO] [stderr] ... [INFO] [stderr] 205 | let s : String = get_identifier(c, &mut char_iter); [INFO] [stderr] | ^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stderr] ... [INFO] [stderr] 208 | "and" => return tokenize(TokenType::And), [INFO] [stderr] | -------- immutable borrow later used here [INFO] [stderr] [INFO] [stderr] error: aborting due to 10 previous errors; 10 warnings emitted [INFO] [stderr] [INFO] [stderr] Some errors have detailed explanations: E0502, E0506. [INFO] [stderr] For more information about an error, try `rustc --explain E0502`. [INFO] [stderr] error: could not compile `rlox`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "66d3f1e2a01cffa5df3d6634739172d2316c3e77b119b1576709b01bca49ffe8"` [INFO] running `"docker" "rm" "-f" "66d3f1e2a01cffa5df3d6634739172d2316c3e77b119b1576709b01bca49ffe8"` [INFO] [stdout] 66d3f1e2a01cffa5df3d6634739172d2316c3e77b119b1576709b01bca49ffe8