[INFO] cloning repository https://github.com/elitt565/ProducerConsumer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/elitt565/ProducerConsumer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felitt565%2FProducerConsumer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felitt565%2FProducerConsumer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 54d2a7cec58794102b774bad4a0d12f1a631c017 [INFO] building elitt565/ProducerConsumer against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felitt565%2FProducerConsumer" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/elitt565/ProducerConsumer on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/elitt565/ProducerConsumer [INFO] finished tweaking git repo https://github.com/elitt565/ProducerConsumer [INFO] tweaked toml for git repo https://github.com/elitt565/ProducerConsumer written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/elitt565/ProducerConsumer 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] fdd7929093d8a543ccfac4bc963c4ef2931357ea50c9e1d9a7f657cafc253c8b [INFO] running `Command { std: "docker" "start" "-a" "fdd7929093d8a543ccfac4bc963c4ef2931357ea50c9e1d9a7f657cafc253c8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fdd7929093d8a543ccfac4bc963c4ef2931357ea50c9e1d9a7f657cafc253c8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fdd7929093d8a543ccfac4bc963c4ef2931357ea50c9e1d9a7f657cafc253c8b", kill_on_drop: false }` [INFO] [stdout] fdd7929093d8a543ccfac4bc963c4ef2931357ea50c9e1d9a7f657cafc253c8b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 11791fbaa2de63c1e77446e890bfa758ac70bffb62304f8bc2cb4ccd27509b36 [INFO] running `Command { std: "docker" "start" "-a" "11791fbaa2de63c1e77446e890bfa758ac70bffb62304f8bc2cb4ccd27509b36", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Compiling crossbeam-utils v0.8.15 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling crossbeam-queue v0.3.8 [INFO] [stderr] Compiling scopeguard v1.1.0 [INFO] [stderr] Compiling once_cell v1.17.1 [INFO] [stderr] Compiling memoffset v0.8.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.14 [INFO] [stderr] Compiling crossbeam-channel v0.5.8 [INFO] [stderr] Compiling crossbeam-deque v0.8.3 [INFO] [stderr] Compiling crossbeam v0.8.2 [INFO] [stderr] Compiling producer_consumer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/ledger.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/ledger.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ledger.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let mut b = Bank::new(10); [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/ledger/bank.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let mut b = Bank { [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/ledger/bank.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:123:21 [INFO] [stdout] | [INFO] [stdout] 123 | let mut g = accounts.get(src_id).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | let mut g1 = accounts.get(smaller).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 140 | let mut g2 = accounts.get(larger).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:166:21 [INFO] [stdout] | [INFO] [stdout] 166 | let mut g = accounts.get(i as usize).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:171:13 [INFO] [stdout] | [INFO] [stdout] 171 | let mut g = bank_lock.lock().unwrap(); [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/ledger/bank.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | let mut g = bank_lock.lock().unwrap(); [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/ledger/bank.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | let mut g = bank_lock.lock().unwrap(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `ledger_lock` should have an upper case name [INFO] [stdout] --> src/ledger.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | static ledger_lock: Mutex = Mutex::new(0); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper case: `LEDGER_LOCK` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `ledger` should have an upper case name [INFO] [stdout] --> src/ledger.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | static mut ledger: VecDeque = VecDeque::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper case: `LEDGER` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `lazy_bank_obj` should have an upper case name [INFO] [stdout] --> src/ledger.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | static mut lazy_bank_obj: Lazy = Lazy::new(|| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `LAZY_BANK_OBJ` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `InitBank` should have a snake case name [INFO] [stdout] --> src/ledger.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn InitBank(num_workers: u32, filename: String) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `init_bank` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/ledger.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | &*lazy_bank_obj; [INFO] [stdout] | ^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 39 | let _ = &*lazy_bank_obj; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:40:35 [INFO] [stdout] | [INFO] [stdout] 40 | bank_obj = *Lazy::get_mut(&mut lazy_bank_obj).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 40 | bank_obj = *Lazy::get_mut(&raw mut lazy_bank_obj).unwrap(); [INFO] [stdout] | ~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | ledger.push_back(l); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger.rs:95:11 [INFO] [stdout] | [INFO] [stdout] 95 | fn worker(workerID: u32, bank_obj: &mut Bank) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 98 | while !ledger.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | let l = ledger.pop_front().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `bank_lock` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | static bank_lock: Mutex = Mutex::new(0); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper case: `BANK_LOCK` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `accounts` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | static mut accounts: Vec = Vec::new(); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper case: `ACCOUNTS` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `num_succ` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | static mut num_succ: u32 = 0; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper case: `NUM_SUCC` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `num_fail` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | static mut num_fail: u32 = 0; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper case: `NUM_FAIL` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `accountID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | accountID: u32, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `account_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `N` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn new(N: u32) -> Bank { [INFO] [stdout] | ^ help: convert the identifier to snake case: `n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | accounts.push(acc); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:56:31 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn deposit(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ledgerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:56:46 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn deposit(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ledger_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `accountID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:56:61 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn deposit(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `account_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:59:23 [INFO] [stdout] | [INFO] [stdout] 59 | let acc = accounts.get_mut(accountID).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn withdraw(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ledgerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:83:47 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn withdraw(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ledger_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `accountID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:83:62 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn withdraw(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `account_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:87:25 [INFO] [stdout] | [INFO] [stdout] 87 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:88:16 [INFO] [stdout] | [INFO] [stdout] 88 | if accounts.get(accountID).unwrap().balance < amount { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:93:23 [INFO] [stdout] | [INFO] [stdout] 93 | let acc = accounts.get_mut(accountID).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:118:32 [INFO] [stdout] | [INFO] [stdout] 118 | pub fn transfer(&mut self, workerID: u32, ledgerID: u32, src_id: usize, dest_id: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ledgerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:118:47 [INFO] [stdout] | [INFO] [stdout] 118 | pub fn transfer(&mut self, workerID: u32, ledgerID: u32, src_id: usize, dest_id: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ledger_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:123:29 [INFO] [stdout] | [INFO] [stdout] 123 | let mut g = accounts.get(src_id).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `srcSmaller` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | let srcSmaller = src_id < dest_id; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `src_smaller` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:139:26 [INFO] [stdout] | [INFO] [stdout] 139 | let mut g1 = accounts.get(smaller).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:140:26 [INFO] [stdout] | [INFO] [stdout] 140 | let mut g2 = accounts.get(larger).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:141:16 [INFO] [stdout] | [INFO] [stdout] 141 | if accounts.get(src_id).unwrap().balance < amount { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:147:26 [INFO] [stdout] | [INFO] [stdout] 147 | let srcAcc = accounts.get_mut(src_id).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `srcAcc` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:147:17 [INFO] [stdout] | [INFO] [stdout] 147 | let srcAcc = accounts.get_mut(src_id).unwrap(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `src_acc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:148:27 [INFO] [stdout] | [INFO] [stdout] 148 | let destAcc = accounts.get_mut(dest_id).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `destAcc` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | let destAcc = accounts.get_mut(dest_id).unwrap(); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `dest_acc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:166:29 [INFO] [stdout] | [INFO] [stdout] 166 | let mut g = accounts.get(i as usize).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:167:41 [INFO] [stdout] | [INFO] [stdout] 167 | println!("ID# {} | {}", accounts.get(i as usize).unwrap().accountID, accounts.get(i as usize).unwrap().balance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:167:86 [INFO] [stdout] | [INFO] [stdout] 167 | println!("ID# {} | {}", accounts.get(i as usize).unwrap().accountID, accounts.get(i as usize).unwrap().balance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:173:47 [INFO] [stdout] | [INFO] [stdout] 173 | println!("Success: {} Fails: {}", num_succ, num_fail); [INFO] [stdout] | ^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:173:57 [INFO] [stdout] | [INFO] [stdout] 173 | println!("Success: {} Fails: {}", num_succ, num_fail); [INFO] [stdout] | ^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recordSucc` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | fn recordSucc(&mut self, message: String) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `record_succ` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recordFail` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:197:8 [INFO] [stdout] | [INFO] [stdout] 197 | fn recordFail(&mut self, message: String) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `record_fail` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.02s [INFO] running `Command { std: "docker" "inspect" "11791fbaa2de63c1e77446e890bfa758ac70bffb62304f8bc2cb4ccd27509b36", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "11791fbaa2de63c1e77446e890bfa758ac70bffb62304f8bc2cb4ccd27509b36", kill_on_drop: false }` [INFO] [stdout] 11791fbaa2de63c1e77446e890bfa758ac70bffb62304f8bc2cb4ccd27509b36 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1d3866c26af91f4700168875504af1aeea85dd7f2a465d3a7a7b158a16b7df1c [INFO] running `Command { std: "docker" "start" "-a" "1d3866c26af91f4700168875504af1aeea85dd7f2a465d3a7a7b158a16b7df1c", kill_on_drop: false }` [INFO] [stderr] Compiling producer_consumer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/ledger.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/ledger.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ledger.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let mut b = Bank::new(10); [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/ledger/bank.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let mut b = Bank { [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/ledger/bank.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:123:21 [INFO] [stdout] | [INFO] [stdout] 123 | let mut g = accounts.get(src_id).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | let mut g1 = accounts.get(smaller).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 140 | let mut g2 = accounts.get(larger).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:166:21 [INFO] [stdout] | [INFO] [stdout] 166 | let mut g = accounts.get(i as usize).unwrap().lock.lock().unwrap(); [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/ledger/bank.rs:171:13 [INFO] [stdout] | [INFO] [stdout] 171 | let mut g = bank_lock.lock().unwrap(); [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/ledger/bank.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | let mut g = bank_lock.lock().unwrap(); [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/ledger/bank.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | let mut g = bank_lock.lock().unwrap(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `ledger_lock` should have an upper case name [INFO] [stdout] --> src/ledger.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | static ledger_lock: Mutex = Mutex::new(0); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper case: `LEDGER_LOCK` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `ledger` should have an upper case name [INFO] [stdout] --> src/ledger.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | static mut ledger: VecDeque = VecDeque::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper case: `LEDGER` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `lazy_bank_obj` should have an upper case name [INFO] [stdout] --> src/ledger.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | static mut lazy_bank_obj: Lazy = Lazy::new(|| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `LAZY_BANK_OBJ` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `InitBank` should have a snake case name [INFO] [stdout] --> src/ledger.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn InitBank(num_workers: u32, filename: String) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `init_bank` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/ledger.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | &*lazy_bank_obj; [INFO] [stdout] | ^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 39 | let _ = &*lazy_bank_obj; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:40:35 [INFO] [stdout] | [INFO] [stdout] 40 | bank_obj = *Lazy::get_mut(&mut lazy_bank_obj).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 40 | bank_obj = *Lazy::get_mut(&raw mut lazy_bank_obj).unwrap(); [INFO] [stdout] | ~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | ledger.push_back(l); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger.rs:95:11 [INFO] [stdout] | [INFO] [stdout] 95 | fn worker(workerID: u32, bank_obj: &mut Bank) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 98 | while !ledger.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | let l = ledger.pop_front().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `bank_lock` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | static bank_lock: Mutex = Mutex::new(0); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper case: `BANK_LOCK` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `accounts` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | static mut accounts: Vec = Vec::new(); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper case: `ACCOUNTS` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `num_succ` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | static mut num_succ: u32 = 0; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper case: `NUM_SUCC` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `num_fail` should have an upper case name [INFO] [stdout] --> src/ledger/bank.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | static mut num_fail: u32 = 0; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper case: `NUM_FAIL` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `accountID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | accountID: u32, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `account_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `N` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn new(N: u32) -> Bank { [INFO] [stdout] | ^ help: convert the identifier to snake case: `n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | accounts.push(acc); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:56:31 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn deposit(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ledgerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:56:46 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn deposit(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ledger_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `accountID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:56:61 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn deposit(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `account_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:59:23 [INFO] [stdout] | [INFO] [stdout] 59 | let acc = accounts.get_mut(accountID).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn withdraw(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ledgerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:83:47 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn withdraw(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ledger_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `accountID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:83:62 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn withdraw(&mut self, workerID: u32, ledgerID: u32, accountID: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `account_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:87:25 [INFO] [stdout] | [INFO] [stdout] 87 | let mut g = accounts.get(accountID).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:88:16 [INFO] [stdout] | [INFO] [stdout] 88 | if accounts.get(accountID).unwrap().balance < amount { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:93:23 [INFO] [stdout] | [INFO] [stdout] 93 | let acc = accounts.get_mut(accountID).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:118:32 [INFO] [stdout] | [INFO] [stdout] 118 | pub fn transfer(&mut self, workerID: u32, ledgerID: u32, src_id: usize, dest_id: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `worker_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ledgerID` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:118:47 [INFO] [stdout] | [INFO] [stdout] 118 | pub fn transfer(&mut self, workerID: u32, ledgerID: u32, src_id: usize, dest_id: usize, amount: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ledger_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:123:29 [INFO] [stdout] | [INFO] [stdout] 123 | let mut g = accounts.get(src_id).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `srcSmaller` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | let srcSmaller = src_id < dest_id; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `src_smaller` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:139:26 [INFO] [stdout] | [INFO] [stdout] 139 | let mut g1 = accounts.get(smaller).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:140:26 [INFO] [stdout] | [INFO] [stdout] 140 | let mut g2 = accounts.get(larger).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:141:16 [INFO] [stdout] | [INFO] [stdout] 141 | if accounts.get(src_id).unwrap().balance < amount { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:147:26 [INFO] [stdout] | [INFO] [stdout] 147 | let srcAcc = accounts.get_mut(src_id).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `srcAcc` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:147:17 [INFO] [stdout] | [INFO] [stdout] 147 | let srcAcc = accounts.get_mut(src_id).unwrap(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `src_acc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:148:27 [INFO] [stdout] | [INFO] [stdout] 148 | let destAcc = accounts.get_mut(dest_id).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `destAcc` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | let destAcc = accounts.get_mut(dest_id).unwrap(); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `dest_acc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:166:29 [INFO] [stdout] | [INFO] [stdout] 166 | let mut g = accounts.get(i as usize).unwrap().lock.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:167:41 [INFO] [stdout] | [INFO] [stdout] 167 | println!("ID# {} | {}", accounts.get(i as usize).unwrap().accountID, accounts.get(i as usize).unwrap().balance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:167:86 [INFO] [stdout] | [INFO] [stdout] 167 | println!("ID# {} | {}", accounts.get(i as usize).unwrap().accountID, accounts.get(i as usize).unwrap().balance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:173:47 [INFO] [stdout] | [INFO] [stdout] 173 | println!("Success: {} Fails: {}", num_succ, num_fail); [INFO] [stdout] | ^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/ledger/bank.rs:173:57 [INFO] [stdout] | [INFO] [stdout] 173 | println!("Success: {} Fails: {}", num_succ, num_fail); [INFO] [stdout] | ^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recordSucc` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | fn recordSucc(&mut self, message: String) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `record_succ` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recordFail` should have a snake case name [INFO] [stdout] --> src/ledger/bank.rs:197:8 [INFO] [stdout] | [INFO] [stdout] 197 | fn recordFail(&mut self, message: String) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `record_fail` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.28s [INFO] running `Command { std: "docker" "inspect" "1d3866c26af91f4700168875504af1aeea85dd7f2a465d3a7a7b158a16b7df1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1d3866c26af91f4700168875504af1aeea85dd7f2a465d3a7a7b158a16b7df1c", kill_on_drop: false }` [INFO] [stdout] 1d3866c26af91f4700168875504af1aeea85dd7f2a465d3a7a7b158a16b7df1c