[INFO] cloning repository https://github.com/johnowagon/qr-encoder [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/johnowagon/qr-encoder" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjohnowagon%2Fqr-encoder", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjohnowagon%2Fqr-encoder'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b792183e8029f631ed2f126884cfe24bc90cbfb1 [INFO] checking johnowagon/qr-encoder against master#a9e7b30487235621751cc628f170c0f15fb215c4 for pr-136539 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjohnowagon%2Fqr-encoder" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/johnowagon/qr-encoder on toolchain a9e7b30487235621751cc628f170c0f15fb215c4 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a9e7b30487235621751cc628f170c0f15fb215c4" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/johnowagon/qr-encoder [INFO] finished tweaking git repo https://github.com/johnowagon/qr-encoder [INFO] tweaked toml for git repo https://github.com/johnowagon/qr-encoder written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/johnowagon/qr-encoder already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a9e7b30487235621751cc628f170c0f15fb215c4" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: no edition set: defaulting to the 2015 edition while the latest is 2024 [INFO] [stderr] warning: unused manifest key: lib.version [INFO] [stderr] warning: unused manifest key: package.path [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+a9e7b30487235621751cc628f170c0f15fb215c4" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 56e1493444784a5d35e82885dc7453f1cd207d1e710b912dbcdbc7d4d6ef5341 [INFO] running `Command { std: "docker" "start" "-a" "56e1493444784a5d35e82885dc7453f1cd207d1e710b912dbcdbc7d4d6ef5341", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "56e1493444784a5d35e82885dc7453f1cd207d1e710b912dbcdbc7d4d6ef5341", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "56e1493444784a5d35e82885dc7453f1cd207d1e710b912dbcdbc7d4d6ef5341", kill_on_drop: false }` [INFO] [stdout] 56e1493444784a5d35e82885dc7453f1cd207d1e710b912dbcdbc7d4d6ef5341 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/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" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+a9e7b30487235621751cc628f170c0f15fb215c4" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f967b57f358e7b789703fc588c561d31da59d83bd666ed2df3e74254b46eec44 [INFO] running `Command { std: "docker" "start" "-a" "f967b57f358e7b789703fc588c561d31da59d83bd666ed2df3e74254b46eec44", kill_on_drop: false }` [INFO] [stderr] warning: no edition set: defaulting to the 2015 edition while the latest is 2024 [INFO] [stderr] warning: unused manifest key: lib.version [INFO] [stderr] warning: unused manifest key: package.path [INFO] [stderr] Compiling radium v0.7.0 [INFO] [stderr] Checking tap v1.0.1 [INFO] [stderr] Checking funty v2.0.0 [INFO] [stderr] Checking wyz v0.5.1 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Checking mything v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `fmt` [INFO] [stdout] --> src/modes.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{ops::Index, fmt}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/consts.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::convert::TryInto` [INFO] [stdout] --> src/encoding.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::convert::TryInto; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::modes::Mode` [INFO] [stdout] --> src/Mode.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::modes::Mode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fmt` [INFO] [stdout] --> src/modes.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{ops::Index, fmt}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/consts.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::convert::TryInto` [INFO] [stdout] --> src/encoding.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::convert::TryInto; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::modes::Mode` [INFO] [stdout] --> src/Mode.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::modes::Mode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Encoder.rs:46:23 [INFO] [stdout] | [INFO] [stdout] 46 | mode: (), [INFO] [stdout] | ^^ expected `Mode`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Encoder.rs:47:35 [INFO] [stdout] | [INFO] [stdout] 47 | correction_level: (), [INFO] [stdout] | ^^ expected `ErrorCorrectionLevel`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Encoder.rs:48:26 [INFO] [stdout] | [INFO] [stdout] 48 | version: (), [INFO] [stdout] | ^^ expected `u16`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `AlphaNumeric: From` is not satisfied [INFO] [stdout] --> src/Mode.rs:27:30 [INFO] [stdout] | [INFO] [stdout] 27 | self.state = AlphaNumeric::from(self.state); [INFO] [stdout] | ^^^^^^^^^^^^ the trait `From` is not implemented for `AlphaNumeric` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 22 | impl ModeStateMachine where AlphaNumeric: From { [INFO] [stdout] | +++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Mode.rs:27:30 [INFO] [stdout] | [INFO] [stdout] 22 | impl ModeStateMachine { [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 27 | self.state = AlphaNumeric::from(self.state); [INFO] [stdout] | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `S`, found `AlphaNumeric` [INFO] [stdout] | | [INFO] [stdout] | expected due to the type of this binding [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `S` [INFO] [stdout] found struct `AlphaNumeric` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/modes.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | _ => Err(ModeError) [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/modes.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 59 | Mode::Numeric => Ok(bitvec![0, 0, 0, 1]), [INFO] [stdout] | ------------- matches some of the same values [INFO] [stdout] 60 | Mode::AlphaNumeric => Ok(bitvec![0, 0, 1, 0]), [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] 61 | Mode::Byte => Ok(bitvec![0, 1, 0, 0]), [INFO] [stdout] | ---------- matches some of the same values [INFO] [stdout] 62 | Mode::Kanji => Ok(bitvec![1, 0, 0, 0]), [INFO] [stdout] | ----------- matches some of the same values [INFO] [stdout] 63 | Mode::ECI => Ok(bitvec![0, 1, 1, 1]), [INFO] [stdout] 64 | _ => Err(ModeError) [INFO] [stdout] | ^ ...and 1 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/modes.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | _ => Err(ModeError) [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/modes.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 73 | Mode::AlphaNumeric => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 84 | Mode::Numeric => { [INFO] [stdout] | ------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 95 | Mode::Byte => { [INFO] [stdout] | ---------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 106 | Mode::Kanji => { [INFO] [stdout] | ----------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 121 | _ => Err(ModeError) [INFO] [stdout] | ^ ...and 1 other patterns collectively make this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/encoding.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let mut result: BitVec = BitVec::new(); [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: value assigned to `tmp` is never read [INFO] [stdout] --> src/encoding.rs:96:21 [INFO] [stdout] | [INFO] [stdout] 96 | let mut tmp: BitVec = BitVec::new(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `tmp` is never read [INFO] [stdout] --> src/encoding.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | let mut tmp: BitVec = BitVec::new(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/encoding.rs:114:22 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn byte_encoding(s: String) -> BitVec { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/encoding.rs:118:23 [INFO] [stdout] | [INFO] [stdout] 118 | pub fn kanji_encoding(s: String) -> BitVec { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `*s` which is behind a shared reference [INFO] [stdout] --> src/Mode.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] | ^ ------------ `*s` moved due to this method call [INFO] [stdout] | | [INFO] [stdout] | move occurs because `*s` has type `St`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `GetTokens::get_tokens` takes ownership of the receiver `self`, which moves `*s` [INFO] [stdout] --> src/Mode.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | fn get_tokens(self) -> String; [INFO] [stdout] | ^^^^ [INFO] [stdout] help: if `St` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/Mode.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_tokens(self, s: &St) { [INFO] [stdout] | ^^ consider constraining this type parameter with `Clone` [INFO] [stdout] 36 | for c in self.data.chars() { [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] | - you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `self` because it is borrowed [INFO] [stdout] --> src/Mode.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_tokens(self, s: &St) { [INFO] [stdout] | ---- binding `self` declared here [INFO] [stdout] 36 | for c in self.data.chars() { [INFO] [stdout] | --------- borrow of `self.data` occurs here [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] 38 | self.next(); [INFO] [stdout] | ^^^^ move out of `self` occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `self` [INFO] [stdout] --> src/Mode.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_tokens(self, s: &St) { [INFO] [stdout] | ---- move occurs because `self` has type `ModeStateMachine`, which does not implement the `Copy` trait [INFO] [stdout] 36 | for c in self.data.chars() { [INFO] [stdout] | -------------------------- inside of this loop [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] 38 | self.next(); [INFO] [stdout] | ^^^^ ------ `self` moved due to this method call, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: `ModeStateMachine::::next` takes ownership of the receiver `self`, which moves `self` [INFO] [stdout] --> src/Mode.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | fn next(self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `m` [INFO] [stdout] --> src/Mode.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | fn from(m: Numeric) -> AlphaNumeric { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0382, E0505, E0507. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `mything` (lib test) due to 8 previous errors; 12 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Encoder.rs:46:23 [INFO] [stdout] | [INFO] [stdout] 46 | mode: (), [INFO] [stdout] | ^^ expected `Mode`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Encoder.rs:47:35 [INFO] [stdout] | [INFO] [stdout] 47 | correction_level: (), [INFO] [stdout] | ^^ expected `ErrorCorrectionLevel`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Encoder.rs:48:26 [INFO] [stdout] | [INFO] [stdout] 48 | version: (), [INFO] [stdout] | ^^ expected `u16`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `AlphaNumeric: From` is not satisfied [INFO] [stdout] --> src/Mode.rs:27:30 [INFO] [stdout] | [INFO] [stdout] 27 | self.state = AlphaNumeric::from(self.state); [INFO] [stdout] | ^^^^^^^^^^^^ the trait `From` is not implemented for `AlphaNumeric` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 22 | impl ModeStateMachine where AlphaNumeric: From { [INFO] [stdout] | +++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/Mode.rs:27:30 [INFO] [stdout] | [INFO] [stdout] 22 | impl ModeStateMachine { [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 27 | self.state = AlphaNumeric::from(self.state); [INFO] [stdout] | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `S`, found `AlphaNumeric` [INFO] [stdout] | | [INFO] [stdout] | expected due to the type of this binding [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `S` [INFO] [stdout] found struct `AlphaNumeric` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/modes.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | _ => Err(ModeError) [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/modes.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 59 | Mode::Numeric => Ok(bitvec![0, 0, 0, 1]), [INFO] [stdout] | ------------- matches some of the same values [INFO] [stdout] 60 | Mode::AlphaNumeric => Ok(bitvec![0, 0, 1, 0]), [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] 61 | Mode::Byte => Ok(bitvec![0, 1, 0, 0]), [INFO] [stdout] | ---------- matches some of the same values [INFO] [stdout] 62 | Mode::Kanji => Ok(bitvec![1, 0, 0, 0]), [INFO] [stdout] | ----------- matches some of the same values [INFO] [stdout] 63 | Mode::ECI => Ok(bitvec![0, 1, 1, 1]), [INFO] [stdout] 64 | _ => Err(ModeError) [INFO] [stdout] | ^ ...and 1 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/modes.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | _ => Err(ModeError) [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/modes.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 73 | Mode::AlphaNumeric => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 84 | Mode::Numeric => { [INFO] [stdout] | ------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 95 | Mode::Byte => { [INFO] [stdout] | ---------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 106 | Mode::Kanji => { [INFO] [stdout] | ----------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 121 | _ => Err(ModeError) [INFO] [stdout] | ^ ...and 1 other patterns collectively make this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/encoding.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let mut result: BitVec = BitVec::new(); [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: value assigned to `tmp` is never read [INFO] [stdout] --> src/encoding.rs:96:21 [INFO] [stdout] | [INFO] [stdout] 96 | let mut tmp: BitVec = BitVec::new(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `tmp` is never read [INFO] [stdout] --> src/encoding.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | let mut tmp: BitVec = BitVec::new(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/encoding.rs:114:22 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn byte_encoding(s: String) -> BitVec { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/encoding.rs:118:23 [INFO] [stdout] | [INFO] [stdout] 118 | pub fn kanji_encoding(s: String) -> BitVec { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `*s` which is behind a shared reference [INFO] [stdout] --> src/Mode.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] | ^ ------------ `*s` moved due to this method call [INFO] [stdout] | | [INFO] [stdout] | move occurs because `*s` has type `St`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `GetTokens::get_tokens` takes ownership of the receiver `self`, which moves `*s` [INFO] [stdout] --> src/Mode.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | fn get_tokens(self) -> String; [INFO] [stdout] | ^^^^ [INFO] [stdout] help: if `St` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/Mode.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_tokens(self, s: &St) { [INFO] [stdout] | ^^ consider constraining this type parameter with `Clone` [INFO] [stdout] 36 | for c in self.data.chars() { [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] | - you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `self` because it is borrowed [INFO] [stdout] --> src/Mode.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_tokens(self, s: &St) { [INFO] [stdout] | ---- binding `self` declared here [INFO] [stdout] 36 | for c in self.data.chars() { [INFO] [stdout] | --------- borrow of `self.data` occurs here [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] 38 | self.next(); [INFO] [stdout] | ^^^^ move out of `self` occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `self` [INFO] [stdout] --> src/Mode.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_tokens(self, s: &St) { [INFO] [stdout] | ---- move occurs because `self` has type `ModeStateMachine`, which does not implement the `Copy` trait [INFO] [stdout] 36 | for c in self.data.chars() { [INFO] [stdout] | -------------------------- inside of this loop [INFO] [stdout] 37 | if !s.get_tokens().contains(c) { [INFO] [stdout] 38 | self.next(); [INFO] [stdout] | ^^^^ ------ `self` moved due to this method call, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: `ModeStateMachine::::next` takes ownership of the receiver `self`, which moves `self` [INFO] [stdout] --> src/Mode.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | fn next(self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `m` [INFO] [stdout] --> src/Mode.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | fn from(m: Numeric) -> AlphaNumeric { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0382, E0505, E0507. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `mything` (lib) due to 8 previous errors; 12 warnings emitted [INFO] running `Command { std: "docker" "inspect" "f967b57f358e7b789703fc588c561d31da59d83bd666ed2df3e74254b46eec44", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f967b57f358e7b789703fc588c561d31da59d83bd666ed2df3e74254b46eec44", kill_on_drop: false }` [INFO] [stdout] f967b57f358e7b789703fc588c561d31da59d83bd666ed2df3e74254b46eec44