[INFO] cloning repository https://github.com/kyssion/rust-study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kyssion/rust-study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyssion%2Frust-study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyssion%2Frust-study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7f4f06e2f73765d9a406c61508e1ee8a193a581f [INFO] checking kyssion/rust-study against try#8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 for pr-82565 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyssion%2Frust-study" "/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/kyssion/rust-study 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/kyssion/rust-study [INFO] finished tweaking git repo https://github.com/kyssion/rust-study [INFO] tweaked toml for git repo https://github.com/kyssion/rust-study written to /workspace/builds/worker-3/source/Cargo.toml [INFO] crate git repo https://github.com/kyssion/rust-study 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] [stderr] Blocking waiting for file lock on package cache [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] 660be99c9eef3c8e67dc7aa6beb4b333ce397f16d71e7fe3eb870dd82e1117b6 [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" "660be99c9eef3c8e67dc7aa6beb4b333ce397f16d71e7fe3eb870dd82e1117b6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "660be99c9eef3c8e67dc7aa6beb4b333ce397f16d71e7fe3eb870dd82e1117b6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "660be99c9eef3c8e67dc7aa6beb4b333ce397f16d71e7fe3eb870dd82e1117b6", kill_on_drop: false }` [INFO] [stdout] 660be99c9eef3c8e67dc7aa6beb4b333ce397f16d71e7fe3eb870dd82e1117b6 [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] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 997aee351a7b83e5cc0f9ca4cc4cfccfd0df85dea852baa589393f6e89869171 [INFO] running `Command { std: "docker" "start" "-a" "997aee351a7b83e5cc0f9ca4cc4cfccfd0df85dea852baa589393f6e89869171", kill_on_drop: false }` [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking rand v0.5.6 [INFO] [stderr] Checking rust_test v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | /// b 获取了 新的所有权范围,所以可以使用了 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | /// [INFO] [stdout] | ^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | /// 这之间不能存在修改原始数据的逻辑,和 元数据的&mut 引用 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | /// [INFO] [stdout] | ^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | /// [INFO] [stdout] | ^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | /// 以第二次为准 , 使用第一次出现问题 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | /// a 变量所有权下移,但前失去了a的所有权 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 36 | let b = add_str_no_clone(a); [INFO] [stdout] | ---------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / /// 错误 ,这个时候所有权已经转移到了b中了 [INFO] [stdout] 59 | | ///a.push_str("test"); [INFO] [stdout] | |__________________________^ [INFO] [stdout] 60 | [INFO] [stdout] 61 | c.push_str("test"); [INFO] [stdout] | ------------------ rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | /// 之后就可以进行处理了 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 82 | a.push_str("test"); [INFO] [stdout] | ------------------ rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | /// a 的第一次借阅 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 85 | let item = &mut a; [INFO] [stdout] | ------------------ rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | /// 这个函数也用了借阅 所以是第二次 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 87 | a.push_str("test"); [INFO] [stdout] | ------------------ rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `test` should have an upper camel case name [INFO] [stdout] --> src/test4.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | struct test{ [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/main.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | return loop { [INFO] [stdout] | ______^______- [INFO] [stdout] | | _____| [INFO] [stdout] | || [INFO] [stdout] 89 | || let b = if 123>111 { [INFO] [stdout] 90 | || 123 [INFO] [stdout] 91 | || }else{ [INFO] [stdout] 92 | || 444 [INFO] [stdout] 93 | || }; [INFO] [stdout] 94 | || } [INFO] [stdout] | || ^ [INFO] [stdout] | ||_____| [INFO] [stdout] | |______unreachable expression [INFO] [stdout] | any code following this expression is unreachable [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/test4.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 129 | panic!("sdfsdf"); [INFO] [stdout] | ----------------- any code following this expression is unreachable [INFO] [stdout] 130 | [INFO] [stdout] 131 | / let f = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] 132 | | if error.kind() == ErrorKind::NotFound { [INFO] [stdout] 133 | | File::create("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] 134 | | panic!("Problem creating the file: {:?}", error); [INFO] [stdout] ... | [INFO] [stdout] 138 | | } [INFO] [stdout] 139 | | }); [INFO] [stdout] | |_______^ unreachable statement [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr` [INFO] [stdout] --> src/main.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let arr = [1,2,3,4,5]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_arr` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/main.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let months = ["January", "February", "March", "April", "May", "June", "July", [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | let mut item = [1;100]; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let a = rust_return_test(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/main.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | let b = if 123>111 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ans` [INFO] [stdout] --> src/main.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | let ans = if is_can_returen { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ans` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `b` is assigned to, but never used [INFO] [stdout] --> src/main.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | let mut b = 123; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_b` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `b` is never read [INFO] [stdout] --> src/main.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | b+=1; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/main.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | let item = while ans<1000 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ans` [INFO] [stdout] --> src/main.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | let ans = for number in 1..4 { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ans` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/main.rs:119:19 [INFO] [stdout] | [INFO] [stdout] 119 | let ans = for number in 1..4 { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `two` [INFO] [stdout] --> src/test.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let two = one; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_two` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/test.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let one = &mut str; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let b = "222"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let b = a; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let b = a.clone(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/test3.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let item = &mut a; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let mut b = add_str_ls(&mut a); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ccc` [INFO] [stdout] --> src/test3.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | let ccc = 123; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ccc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/test4.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let a = Message::Quit; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/test4.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | let a = if let 1 = some_u8_value { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/test4.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | let p = &item[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/test4.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | let p = item[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item3` [INFO] [stdout] --> src/test4.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let item3 = item+&item2; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/test4.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let f = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | /// b 获取了 新的所有权范围,所以可以使用了 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | /// [INFO] [stdout] | ^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | /// 这之间不能存在修改原始数据的逻辑,和 元数据的&mut 引用 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | /// [INFO] [stdout] | ^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | /// [INFO] [stdout] | ^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | /// 以第二次为准 , 使用第一次出现问题 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | /// a 变量所有权下移,但前失去了a的所有权 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 36 | let b = add_str_no_clone(a); [INFO] [stdout] | ---------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / /// 错误 ,这个时候所有权已经转移到了b中了 [INFO] [stdout] 59 | | ///a.push_str("test"); [INFO] [stdout] | |__________________________^ [INFO] [stdout] 60 | [INFO] [stdout] 61 | c.push_str("test"); [INFO] [stdout] | ------------------ rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | /// 之后就可以进行处理了 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 82 | a.push_str("test"); [INFO] [stdout] | ------------------ rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | /// a 的第一次借阅 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 85 | let item = &mut a; [INFO] [stdout] | ------------------ rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/test3.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | /// 这个函数也用了借阅 所以是第二次 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 87 | a.push_str("test"); [INFO] [stdout] | ------------------ rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `test` should have an upper camel case name [INFO] [stdout] --> src/test4.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | struct test{ [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | let mut item = [1;100]; [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:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let mut is_can_returen = i; [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/test.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let mut one = String::from("test"); [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/test.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let mut a = "sdfsdf"; [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/test.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | let mut s = String::from("sdf"); [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/test3.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut c = &mut b; [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/test3.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let mut b = add_str_ls(&mut a); [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/test3.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | let mut c = &mut a; [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/test3.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let mut d = add_str_ls(&mut core); [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/test3.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | let mut a = [1,2,3,4,5,6]; [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/test4.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | let mut item = vec![1,2,3,4,5]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `self_info` [INFO] [stdout] --> src/test.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn self_info(){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `string_info` [INFO] [stdout] --> src/test.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn string_info(){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_item` [INFO] [stdout] --> src/test.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn test_item(){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn` [INFO] [stdout] --> src/test.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn test_fn(mut some_string:String)->String{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_item2` [INFO] [stdout] --> src/test.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn test_item2(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn2` [INFO] [stdout] --> src/test.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn test_fn2(s: &mut String){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn3` [INFO] [stdout] --> src/test.rs:101:8 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn test_fn3() -> String{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_splic` [INFO] [stdout] --> src/test.rs:106:8 [INFO] [stdout] | [INFO] [stdout] 106 | pub fn test_splic(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn4` [INFO] [stdout] --> src/test.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn test_fn4(s:&String)->usize{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_split` [INFO] [stdout] --> src/test.rs:138:4 [INFO] [stdout] | [INFO] [stdout] 138 | fn test_split(arr:&mut [i32]) -> & [i32]{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/test3.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn test1(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test2` [INFO] [stdout] --> src/test3.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn test2(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test3` [INFO] [stdout] --> src/test3.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn test3(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test4` [INFO] [stdout] --> src/test3.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn test4(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str` [INFO] [stdout] --> src/test3.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn add_str(str : String) -> String{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str_no_clone` [INFO] [stdout] --> src/test3.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn add_str_no_clone(mut str : String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test5` [INFO] [stdout] --> src/test3.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn test5() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str_l` [INFO] [stdout] --> src/test3.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn add_str_l(str: &mut String) -> &mut String{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test6` [INFO] [stdout] --> src/test3.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn test6(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test7` [INFO] [stdout] --> src/test3.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn test7(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str_ls` [INFO] [stdout] --> src/test3.rs:107:4 [INFO] [stdout] | [INFO] [stdout] 107 | fn add_str_ls(str: &mut String)->&mut String{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/test3.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn test(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `area` [INFO] [stdout] --> src/test4.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | fn area(&self)-> i32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Move` [INFO] [stdout] --> src/test4.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Write` [INFO] [stdout] --> src/test4.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | Write(String), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `ChangeColor` [INFO] [stdout] --> src/test4.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_enumo_option` [INFO] [stdout] --> src/test4.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn test_enumo_option(item : String) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `plus_one` [INFO] [stdout] --> src/test4.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | fn plus_one(x: Option) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_vec` [INFO] [stdout] --> src/test4.rs:87:4 [INFO] [stdout] | [INFO] [stdout] 87 | fn test_vec(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_str` [INFO] [stdout] --> src/test4.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn test_str(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `game` [INFO] [stdout] --> src/main.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn game(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_type_base` [INFO] [stdout] --> src/main.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn test_type_base(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_type_base2` [INFO] [stdout] --> src/main.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn test_type_base2(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn_1` [INFO] [stdout] --> src/main.rs:75:4 [INFO] [stdout] | [INFO] [stdout] 75 | fn test_fn_1() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `rust_return_test` [INFO] [stdout] --> src/main.rs:86:4 [INFO] [stdout] | [INFO] [stdout] 86 | fn rust_return_test()->i32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `if_else_math` [INFO] [stdout] --> src/main.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn if_else_math(i :bool){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `myHash` should have a snake case name [INFO] [stdout] --> src/test4.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | let mut myHash :HashMap = HashMap::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `my_hash` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/main.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | return loop { [INFO] [stdout] | ______^______- [INFO] [stdout] | | _____| [INFO] [stdout] | || [INFO] [stdout] 89 | || let b = if 123>111 { [INFO] [stdout] 90 | || 123 [INFO] [stdout] 91 | || }else{ [INFO] [stdout] 92 | || 444 [INFO] [stdout] 93 | || }; [INFO] [stdout] 94 | || } [INFO] [stdout] | || ^ [INFO] [stdout] | ||_____| [INFO] [stdout] | |______unreachable expression [INFO] [stdout] | any code following this expression is unreachable [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 87 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/test4.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 129 | panic!("sdfsdf"); [INFO] [stdout] | ----------------- any code following this expression is unreachable [INFO] [stdout] 130 | [INFO] [stdout] 131 | / let f = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] 132 | | if error.kind() == ErrorKind::NotFound { [INFO] [stdout] 133 | | File::create("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] 134 | | panic!("Problem creating the file: {:?}", error); [INFO] [stdout] ... | [INFO] [stdout] 138 | | } [INFO] [stdout] 139 | | }); [INFO] [stdout] | |_______^ unreachable statement [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr` [INFO] [stdout] --> src/main.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let arr = [1,2,3,4,5]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_arr` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/main.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let months = ["January", "February", "March", "April", "May", "June", "July", [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | let mut item = [1;100]; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let a = rust_return_test(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/main.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | let b = if 123>111 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ans` [INFO] [stdout] --> src/main.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | let ans = if is_can_returen { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ans` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `b` is assigned to, but never used [INFO] [stdout] --> src/main.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | let mut b = 123; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_b` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `b` is never read [INFO] [stdout] --> src/main.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | b+=1; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/main.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | let item = while ans<1000 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ans` [INFO] [stdout] --> src/main.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | let ans = for number in 1..4 { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ans` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/main.rs:119:19 [INFO] [stdout] | [INFO] [stdout] 119 | let ans = for number in 1..4 { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `two` [INFO] [stdout] --> src/test.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let two = one; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_two` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/test.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let one = &mut str; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let b = "222"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let b = a; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let b = a.clone(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/test3.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let item = &mut a; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/test3.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let mut b = add_str_ls(&mut a); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ccc` [INFO] [stdout] --> src/test3.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | let ccc = 123; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ccc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/test4.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let a = Message::Quit; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/test4.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | let a = if let 1 = some_u8_value { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/test4.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | let p = &item[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/test4.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | let p = item[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item3` [INFO] [stdout] --> src/test4.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let item3 = item+&item2; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/test4.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let f = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | let mut item = [1;100]; [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:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let mut is_can_returen = i; [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/test.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let mut one = String::from("test"); [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/test.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let mut a = "sdfsdf"; [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/test.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | let mut s = String::from("sdf"); [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/test3.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut c = &mut b; [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/test3.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let mut b = add_str_ls(&mut a); [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/test3.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | let mut c = &mut a; [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/test3.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let mut d = add_str_ls(&mut core); [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/test3.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | let mut a = [1,2,3,4,5,6]; [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/test4.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | let mut item = vec![1,2,3,4,5]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `self_info` [INFO] [stdout] --> src/test.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn self_info(){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `string_info` [INFO] [stdout] --> src/test.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn string_info(){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_item` [INFO] [stdout] --> src/test.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn test_item(){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn` [INFO] [stdout] --> src/test.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn test_fn(mut some_string:String)->String{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_item2` [INFO] [stdout] --> src/test.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn test_item2(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn2` [INFO] [stdout] --> src/test.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn test_fn2(s: &mut String){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn3` [INFO] [stdout] --> src/test.rs:101:8 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn test_fn3() -> String{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_splic` [INFO] [stdout] --> src/test.rs:106:8 [INFO] [stdout] | [INFO] [stdout] 106 | pub fn test_splic(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn4` [INFO] [stdout] --> src/test.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn test_fn4(s:&String)->usize{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_split` [INFO] [stdout] --> src/test.rs:138:4 [INFO] [stdout] | [INFO] [stdout] 138 | fn test_split(arr:&mut [i32]) -> & [i32]{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/test3.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn test1(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test2` [INFO] [stdout] --> src/test3.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn test2(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test3` [INFO] [stdout] --> src/test3.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn test3(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test4` [INFO] [stdout] --> src/test3.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn test4(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str` [INFO] [stdout] --> src/test3.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn add_str(str : String) -> String{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str_no_clone` [INFO] [stdout] --> src/test3.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn add_str_no_clone(mut str : String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test5` [INFO] [stdout] --> src/test3.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn test5() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str_l` [INFO] [stdout] --> src/test3.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn add_str_l(str: &mut String) -> &mut String{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test6` [INFO] [stdout] --> src/test3.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn test6(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test7` [INFO] [stdout] --> src/test3.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn test7(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_str_ls` [INFO] [stdout] --> src/test3.rs:107:4 [INFO] [stdout] | [INFO] [stdout] 107 | fn add_str_ls(str: &mut String)->&mut String{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/test3.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn test(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `area` [INFO] [stdout] --> src/test4.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | fn area(&self)-> i32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Move` [INFO] [stdout] --> src/test4.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Write` [INFO] [stdout] --> src/test4.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | Write(String), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `ChangeColor` [INFO] [stdout] --> src/test4.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_enumo_option` [INFO] [stdout] --> src/test4.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn test_enumo_option(item : String) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `plus_one` [INFO] [stdout] --> src/test4.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | fn plus_one(x: Option) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_vec` [INFO] [stdout] --> src/test4.rs:87:4 [INFO] [stdout] | [INFO] [stdout] 87 | fn test_vec(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_str` [INFO] [stdout] --> src/test4.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn test_str(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `game` [INFO] [stdout] --> src/main.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn game(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_type_base` [INFO] [stdout] --> src/main.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn test_type_base(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_type_base2` [INFO] [stdout] --> src/main.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn test_type_base2(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn_1` [INFO] [stdout] --> src/main.rs:75:4 [INFO] [stdout] | [INFO] [stdout] 75 | fn test_fn_1() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `rust_return_test` [INFO] [stdout] --> src/main.rs:86:4 [INFO] [stdout] | [INFO] [stdout] 86 | fn rust_return_test()->i32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `if_else_math` [INFO] [stdout] --> src/main.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn if_else_math(i :bool){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `myHash` should have a snake case name [INFO] [stdout] --> src/test4.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | let mut myHash :HashMap = HashMap::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `my_hash` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 87 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.48s [INFO] running `Command { std: "docker" "inspect" "997aee351a7b83e5cc0f9ca4cc4cfccfd0df85dea852baa589393f6e89869171", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "997aee351a7b83e5cc0f9ca4cc4cfccfd0df85dea852baa589393f6e89869171", kill_on_drop: false }` [INFO] [stdout] 997aee351a7b83e5cc0f9ca4cc4cfccfd0df85dea852baa589393f6e89869171