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