[INFO] cloning repository https://github.com/JohnPeng47/source_analyzer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/JohnPeng47/source_analyzer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJohnPeng47%2Fsource_analyzer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJohnPeng47%2Fsource_analyzer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 144a7f73fd98cb440a2d262c3df8526cafb24ad8 [INFO] checking JohnPeng47/source_analyzer against try#8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 for pr-82565 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJohnPeng47%2Fsource_analyzer" "/workspace/builds/worker-3/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/JohnPeng47/source_analyzer on toolchain 8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/JohnPeng47/source_analyzer [INFO] finished tweaking git repo https://github.com/JohnPeng47/source_analyzer [INFO] tweaked toml for git repo https://github.com/JohnPeng47/source_analyzer written to /workspace/builds/worker-3/source/Cargo.toml [INFO] crate git repo https://github.com/JohnPeng47/source_analyzer already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3/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:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8031d1f74ccd44df03c7bfe58d5bcb743b14507ba70a0b43a2b4ecbcf6a40c2c [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" "8031d1f74ccd44df03c7bfe58d5bcb743b14507ba70a0b43a2b4ecbcf6a40c2c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8031d1f74ccd44df03c7bfe58d5bcb743b14507ba70a0b43a2b4ecbcf6a40c2c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8031d1f74ccd44df03c7bfe58d5bcb743b14507ba70a0b43a2b4ecbcf6a40c2c", kill_on_drop: false }` [INFO] [stdout] 8031d1f74ccd44df03c7bfe58d5bcb743b14507ba70a0b43a2b4ecbcf6a40c2c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3/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:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 3b2ce5c2fdb7e271377d883a993f744ee861ced89944bd98d403e514e81f754e [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" "3b2ce5c2fdb7e271377d883a993f744ee861ced89944bd98d403e514e81f754e", kill_on_drop: false }` [INFO] [stderr] Checking source_analyzer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `BufRead`, `BufReader` [INFO] [stdout] --> src/main.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | use std::io::{BufRead, BufReader}; //BufRead implements the lines trait [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BufRead`, `BufReader` [INFO] [stdout] --> src/main.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | use std::io::{BufRead, BufReader}; //BufRead implements the lines trait [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class` [INFO] [stdout] --> src/source_file.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let class = String::from(""); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_class` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function` [INFO] [stdout] --> src/source_file.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | let function = String::from(""); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function_scope` [INFO] [stdout] --> src/source_file.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | let mut function_scope = Vec::::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class_scope` [INFO] [stdout] --> src/source_file.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | let mut class_scope = Vec::::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_class_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function_buf` [INFO] [stdout] --> src/source_file.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | let function_buf = Vec::<&String>::new(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function_buf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | fn path_cb(entry: &DirEntry, mut files: &mut SourceFiles) -> () { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | let mut source_file = SourceFile { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class` [INFO] [stdout] --> src/source_file.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let class = String::from(""); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_class` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function` [INFO] [stdout] --> src/source_file.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | let function = String::from(""); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function_scope` [INFO] [stdout] --> src/source_file.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | let mut function_scope = Vec::::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class_scope` [INFO] [stdout] --> src/source_file.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | let mut class_scope = Vec::::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_class_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function_buf` [INFO] [stdout] --> src/source_file.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | let function_buf = Vec::<&String>::new(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function_buf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | fn path_cb(entry: &DirEntry, mut files: &mut SourceFiles) -> () { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | let mut source_file = SourceFile { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | fn parse_brackets(line: &String, mut stack: &mut Vec) -> bool { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | fn parse_brackets(line: &String, mut stack: &mut Vec) -> bool { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | let mut function_scope = Vec::::new(); [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | let mut class_scope = Vec::::new(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | let mut function_scope = Vec::::new(); [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | let mut class_scope = Vec::::new(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | let mut line_trimmed: Vec = line.split_whitespace().map(String::from).collect(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `content` [INFO] [stdout] --> src/source_file.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | content: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `find_pat` [INFO] [stdout] --> src/source_file.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | fn find_pat<'a>(line: &'a str, pat: &str) -> Option<&'a str> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `parse_brackets` [INFO] [stdout] --> src/source_file.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | fn parse_brackets(line: &String, mut stack: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `function_pats` [INFO] [stdout] --> src/main.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | const function_pats: &'static [&'static str] = &[r"(public|private).+{$"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/source_file.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | let mut line_trimmed: Vec = line.split_whitespace().map(String::from).collect(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `content` [INFO] [stdout] --> src/source_file.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | content: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `find_pat` [INFO] [stdout] --> src/source_file.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | fn find_pat<'a>(line: &'a str, pat: &str) -> Option<&'a str> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `parse_brackets` [INFO] [stdout] --> src/source_file.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | fn parse_brackets(line: &String, mut stack: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `function_pats` [INFO] [stdout] --> src/main.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | const function_pats: &'static [&'static str] = &[r"(public|private).+{$"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `function_pats` should have an upper case name [INFO] [stdout] --> src/main.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const function_pats: &'static [&'static str] = &[r"(public|private).+{$"]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `FUNCTION_PATS` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `function_pats` should have an upper case name [INFO] [stdout] --> src/main.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const function_pats: &'static [&'static str] = &[r"(public|private).+{$"]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `FUNCTION_PATS` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | visit_dirs(path, &path_cb, &mut files); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | visit_dirs(&path, &path_cb, &mut files); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | visit_dirs(path, &path_cb, &mut files); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | visit_dirs(&path, &path_cb, &mut files); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 19 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 19 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.61s [INFO] running `Command { std: "docker" "inspect" "3b2ce5c2fdb7e271377d883a993f744ee861ced89944bd98d403e514e81f754e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3b2ce5c2fdb7e271377d883a993f744ee861ced89944bd98d403e514e81f754e", kill_on_drop: false }` [INFO] [stdout] 3b2ce5c2fdb7e271377d883a993f744ee861ced89944bd98d403e514e81f754e