[INFO] cloning repository https://github.com/ZerQAQ/software_security_homework [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ZerQAQ/software_security_homework" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZerQAQ%2Fsoftware_security_homework", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZerQAQ%2Fsoftware_security_homework'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 79379510d4c46bef9028d76b352df3320a15b685 [INFO] checking ZerQAQ/software_security_homework against master#d62d3f7fa9a91d933213cc10e20e740608983f64 for pr-77015 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZerQAQ%2Fsoftware_security_homework" "/workspace/builds/worker-6/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/ZerQAQ/software_security_homework on toolchain d62d3f7fa9a91d933213cc10e20e740608983f64 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+d62d3f7fa9a91d933213cc10e20e740608983f64" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/ZerQAQ/software_security_homework [INFO] finished tweaking git repo https://github.com/ZerQAQ/software_security_homework [INFO] tweaked toml for git repo https://github.com/ZerQAQ/software_security_homework written to /workspace/builds/worker-6/source/Cargo.toml [INFO] crate git repo https://github.com/ZerQAQ/software_security_homework already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+d62d3f7fa9a91d933213cc10e20e740608983f64" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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:d92eaeed33fa75130ca1ee6c8a01d1ffb62bac859dfdfb3450e3e5d1c0146529" "/opt/rustwide/cargo-home/bin/cargo" "+d62d3f7fa9a91d933213cc10e20e740608983f64" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f75dae700d3b1281de8fda949bb29da28197b200e48e86ce04386edfe1a79dd1 [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" "f75dae700d3b1281de8fda949bb29da28197b200e48e86ce04386edfe1a79dd1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f75dae700d3b1281de8fda949bb29da28197b200e48e86ce04386edfe1a79dd1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f75dae700d3b1281de8fda949bb29da28197b200e48e86ce04386edfe1a79dd1", kill_on_drop: false }` [INFO] [stdout] f75dae700d3b1281de8fda949bb29da28197b200e48e86ce04386edfe1a79dd1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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:d92eaeed33fa75130ca1ee6c8a01d1ffb62bac859dfdfb3450e3e5d1c0146529" "/opt/rustwide/cargo-home/bin/cargo" "+d62d3f7fa9a91d933213cc10e20e740608983f64" "check" "--frozen" "--all" "--all-targets" "--message-format=json", 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] 82ab342aa9027aace654fe4b7e4e3db2e2ad55570bb8377ff73646e4f3816d82 [INFO] running `Command { std: "docker" "start" "-a" "82ab342aa9027aace654fe4b7e4e3db2e2ad55570bb8377ff73646e4f3816d82", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.76 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Checking unicode-width v0.1.8 [INFO] [stderr] Checking strsim v0.8.0 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Checking vec_map v0.8.2 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Checking rand v0.3.23 [INFO] [stderr] Checking rust-crypto v0.2.36 [INFO] [stderr] Checking code_analys v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/lexer.rs:288:14 [INFO] [stdout] | [INFO] [stdout] 288 | for i in (1..4) { [INFO] [stdout] | ^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition [INFO] [stdout] --> src/unit.rs:64:1 [INFO] [stdout] | [INFO] [stdout] 64 | / macro_rules! hash_token_unit { [INFO] [stdout] 65 | | ($($type:expr, $fmt:expr),*) => { [INFO] [stdout] 66 | | $( Token::$type(code) => sh.input_str(&format!($fmt, code)), )* [INFO] [stdout] 67 | | }; [INFO] [stdout] 68 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `I_token` should have an upper camel case name [INFO] [stdout] --> src/unit.rs:92:10 [INFO] [stdout] | [INFO] [stdout] 92 | pub enum I_token { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `IToken` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::print_token` [INFO] [stdout] --> src/cgf.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use lexer::print_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Lexer` [INFO] [stdout] --> src/cgf.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use lexer::Lexer; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Token` [INFO] [stdout] --> src/cgf.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/cgf.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `node` should have an upper camel case name [INFO] [stdout] --> src/cgf.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct node{ [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Node` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/cgf.rs:52:11 [INFO] [stdout] | [INFO] [stdout] 52 | if(t_ptr + 3 >= t_len) {break;}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/cgf.rs:60:18 [INFO] [stdout] | [INFO] [stdout] 60 | while(num > 0){ //跳过函数参数定义 [INFO] [stdout] | ^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/cgf.rs:68:19 [INFO] [stdout] | [INFO] [stdout] 68 | if(string == "{") {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/cgf.rs:74:18 [INFO] [stdout] | [INFO] [stdout] 74 | while(num > 0){ //跳过函数体 [INFO] [stdout] | ^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::print_token` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use lexer::print_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Lexer` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use lexer::Lexer; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Token` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crypto::digest::Digest` [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crypto::digest::Digest; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crypto::md5::Md5` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crypto::md5::Md5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/main.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/lexer.rs:288:14 [INFO] [stdout] | [INFO] [stdout] 288 | for i in (1..4) { [INFO] [stdout] | ^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition [INFO] [stdout] --> src/unit.rs:64:1 [INFO] [stdout] | [INFO] [stdout] 64 | / macro_rules! hash_token_unit { [INFO] [stdout] 65 | | ($($type:expr, $fmt:expr),*) => { [INFO] [stdout] 66 | | $( Token::$type(code) => sh.input_str(&format!($fmt, code)), )* [INFO] [stdout] 67 | | }; [INFO] [stdout] 68 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `I_token` should have an upper camel case name [INFO] [stdout] --> src/unit.rs:92:10 [INFO] [stdout] | [INFO] [stdout] 92 | pub enum I_token { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `IToken` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::print_token` [INFO] [stdout] --> src/cgf.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use lexer::print_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Lexer` [INFO] [stdout] --> src/cgf.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use lexer::Lexer; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Token` [INFO] [stdout] --> src/cgf.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/cgf.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `node` should have an upper camel case name [INFO] [stdout] --> src/cgf.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct node{ [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Node` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/cgf.rs:52:11 [INFO] [stdout] | [INFO] [stdout] 52 | if(t_ptr + 3 >= t_len) {break;}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/cgf.rs:60:18 [INFO] [stdout] | [INFO] [stdout] 60 | while(num > 0){ //跳过函数参数定义 [INFO] [stdout] | ^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/cgf.rs:68:19 [INFO] [stdout] | [INFO] [stdout] 68 | if(string == "{") {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/cgf.rs:74:18 [INFO] [stdout] | [INFO] [stdout] 74 | while(num > 0){ //跳过函数体 [INFO] [stdout] | ^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::print_token` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use lexer::print_token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Lexer` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use lexer::Lexer; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lexer::Token` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crypto::digest::Digest` [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crypto::digest::Digest; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crypto::md5::Md5` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crypto::md5::Md5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/main.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `code` [INFO] [stdout] --> src/unit.rs:79:35 [INFO] [stdout] | [INFO] [stdout] 79 | Token::Identifier(code) => sh.input_str("ID "), [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_code` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string` [INFO] [stdout] --> src/cgf.rs:37:32 [INFO] [stdout] | [INFO] [stdout] 37 | if let I_token::Identifier(string) = &tokens[1]{} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ret` [INFO] [stdout] --> src/cgf.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let mut ret: Vec; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ret` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let mut lines1 = unit::get_token_lines(file1); [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:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let mut lines2 = unit::get_token_lines(file2); [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/main.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let mut func1 = cgf::scan_function(t1); [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/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let mut func2 = cgf::scan_function(t2); [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/unit.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | let mut ret: Vec = tokens.into_iter().map(|x| token_to_I(x, &l)).collect(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `prt` [INFO] [stdout] --> src/lexer.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn prt(&self) { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_token` [INFO] [stdout] --> src/lexer.rs:268:8 [INFO] [stdout] | [INFO] [stdout] 268 | pub fn print_token(l: &Lexer, t: &Token){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `count_char_size` [INFO] [stdout] --> src/lexer.rs:286:4 [INFO] [stdout] | [INFO] [stdout] 286 | fn count_char_size(c: char) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_token_lines` [INFO] [stdout] --> src/unit.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn print_token_lines(lines: &Vec>, l: &Lexer) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_EOF` should have a snake case name [INFO] [stdout] --> src/lexer.rs:109:12 [INFO] [stdout] | [INFO] [stdout] 109 | pub fn is_EOF(&mut self) -> bool{ [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `is_eof` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `token_to_I` should have a snake case name [INFO] [stdout] --> src/unit.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn token_to_I(token: Token, lexer: &Lexer) -> I_token { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `token_to_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_raw_I_token_lines` should have a snake case name [INFO] [stdout] --> src/unit.rs:116:8 [INFO] [stdout] | [INFO] [stdout] 116 | pub fn get_raw_I_token_lines(file_name: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_raw_i_token_lines` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `LCS` should have a snake case name [INFO] [stdout] --> src/unit.rs:151:8 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn LCS(s1: &Vec, s2: &Vec) -> u32 { [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `lcs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 36 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `code` [INFO] [stdout] --> src/unit.rs:79:35 [INFO] [stdout] | [INFO] [stdout] 79 | Token::Identifier(code) => sh.input_str("ID "), [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_code` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string` [INFO] [stdout] --> src/cgf.rs:37:32 [INFO] [stdout] | [INFO] [stdout] 37 | if let I_token::Identifier(string) = &tokens[1]{} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ret` [INFO] [stdout] --> src/cgf.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let mut ret: Vec; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ret` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let mut lines1 = unit::get_token_lines(file1); [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:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let mut lines2 = unit::get_token_lines(file2); [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/main.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let mut func1 = cgf::scan_function(t1); [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/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let mut func2 = cgf::scan_function(t2); [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/unit.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | let mut ret: Vec = tokens.into_iter().map(|x| token_to_I(x, &l)).collect(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `prt` [INFO] [stdout] --> src/lexer.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn prt(&self) { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_token` [INFO] [stdout] --> src/lexer.rs:268:8 [INFO] [stdout] | [INFO] [stdout] 268 | pub fn print_token(l: &Lexer, t: &Token){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `count_char_size` [INFO] [stdout] --> src/lexer.rs:286:4 [INFO] [stdout] | [INFO] [stdout] 286 | fn count_char_size(c: char) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_token_lines` [INFO] [stdout] --> src/unit.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn print_token_lines(lines: &Vec>, l: &Lexer) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_EOF` should have a snake case name [INFO] [stdout] --> src/lexer.rs:109:12 [INFO] [stdout] | [INFO] [stdout] 109 | pub fn is_EOF(&mut self) -> bool{ [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `is_eof` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `token_to_I` should have a snake case name [INFO] [stdout] --> src/unit.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn token_to_I(token: Token, lexer: &Lexer) -> I_token { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `token_to_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_raw_I_token_lines` should have a snake case name [INFO] [stdout] --> src/unit.rs:116:8 [INFO] [stdout] | [INFO] [stdout] 116 | pub fn get_raw_I_token_lines(file_name: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_raw_i_token_lines` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `LCS` should have a snake case name [INFO] [stdout] --> src/unit.rs:151:8 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn LCS(s1: &Vec, s2: &Vec) -> u32 { [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `lcs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 36 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 12.62s [INFO] running `Command { std: "docker" "inspect" "82ab342aa9027aace654fe4b7e4e3db2e2ad55570bb8377ff73646e4f3816d82", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82ab342aa9027aace654fe4b7e4e3db2e2ad55570bb8377ff73646e4f3816d82", kill_on_drop: false }` [INFO] [stdout] 82ab342aa9027aace654fe4b7e4e3db2e2ad55570bb8377ff73646e4f3816d82