[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 beta for pr-78714 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgress2%2Frlox" "/workspace/builds/worker-12/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-12/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/gress2/rlox on toolchain beta [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta" "read-manifest" "--manifest-path" "Cargo.toml", 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-12/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" "+beta" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/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" "rustops/crates-build-env@sha256:6eabd152ff4036248d66efda456a36cb33d24b7291b33f25f75140726c88da35" "/opt/rustwide/cargo-home/bin/cargo" "+beta" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 008ff46e3d5a1a30276a38c131217886e1cdf127163337683c892ddca9204e81 [INFO] running `Command { std: "docker" "start" "-a" "008ff46e3d5a1a30276a38c131217886e1cdf127163337683c892ddca9204e81", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "008ff46e3d5a1a30276a38c131217886e1cdf127163337683c892ddca9204e81", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "008ff46e3d5a1a30276a38c131217886e1cdf127163337683c892ddca9204e81", kill_on_drop: false }` [INFO] [stdout] 008ff46e3d5a1a30276a38c131217886e1cdf127163337683c892ddca9204e81 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/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" "rustops/crates-build-env@sha256:6eabd152ff4036248d66efda456a36cb33d24b7291b33f25f75140726c88da35" "/opt/rustwide/cargo-home/bin/cargo" "+beta" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8c25fb5fd04ea59af3453571f4414ed21d63e140d526d944d89fc8436a135e4e [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" "8c25fb5fd04ea59af3453571f4414ed21d63e140d526d944d89fc8436a135e4e", 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] 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] [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] [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] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "8c25fb5fd04ea59af3453571f4414ed21d63e140d526d944d89fc8436a135e4e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c25fb5fd04ea59af3453571f4414ed21d63e140d526d944d89fc8436a135e4e", kill_on_drop: false }` [INFO] [stdout] 8c25fb5fd04ea59af3453571f4414ed21d63e140d526d944d89fc8436a135e4e