[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] checking elitt565/ProducerConsumer/54d2a7cec58794102b774bad4a0d12f1a631c017 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felitt565%2FProducerConsumer" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/elitt565/ProducerConsumer on toolchain ccf408f4326a858c00dd845a64a86b16f360a801 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "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-5-tc2/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" "+ccf408f4326a858c00dd845a64a86b16f360a801" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2fc7904758c32acc3af97def16d09776306c8e24820b633aef9711437ea9a47a [INFO] running `Command { std: "docker" "start" "-a" "2fc7904758c32acc3af97def16d09776306c8e24820b633aef9711437ea9a47a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2fc7904758c32acc3af97def16d09776306c8e24820b633aef9711437ea9a47a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2fc7904758c32acc3af97def16d09776306c8e24820b633aef9711437ea9a47a", kill_on_drop: false }` [INFO] [stdout] 2fc7904758c32acc3af97def16d09776306c8e24820b633aef9711437ea9a47a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] aed14df26e738d9ff08e0510c397ecf8136b31d72a808f1b89b107cf8ccd2187 [INFO] running `Command { std: "docker" "start" "-a" "aed14df26e738d9ff08e0510c397ecf8136b31d72a808f1b89b107cf8ccd2187", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Migrating Cargo.toml from 2021 edition to 2024 [INFO] [stderr] Compiling crossbeam-utils v0.8.15 [INFO] [stderr] Compiling memoffset v0.8.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.14 [INFO] [stderr] Compiling crossbeam-queue v0.3.8 [INFO] [stderr] Checking crossbeam-channel v0.5.8 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Checking crossbeam v0.8.2 [INFO] [stderr] Checking producer_consumer v0.1.0 (/tmp/fixit) [INFO] [stderr] Migrating src/main.rs from 2021 edition to 2024 [INFO] [stderr] Fixed src/ledger.rs (3 fixes) [INFO] [stderr] Fixed src/ledger/bank.rs (10 fixes) [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:38:35 [INFO] [stdout] | [INFO] [stdout] 38 | 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 issue #114447 [INFO] [stdout] = note: this will be a hard error in the 2024 edition [INFO] [stdout] = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior [INFO] [stdout] = note: `--force-warn static-mut-refs` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: use `addr_of_mut!` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 38 | bank_obj = *Lazy::get_mut(addr_of_mut!(lazy_bank_obj)).unwrap(); [INFO] [stdout] | ~~~~~~~~~~~~~ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `ledger_lock` should have an upper case name [INFO] [stdout] --> src/ledger.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | 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:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | 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:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | 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:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | 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:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | &*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] 37 | let _ = &*lazy_bank_obj; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger.rs:93:11 [INFO] [stdout] | [INFO] [stdout] 93 | 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: 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: 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: 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: 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: 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: 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: 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: 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] [stdout] warning: 26 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/ledger.rs:38:35 [INFO] [stdout] | [INFO] [stdout] 38 | 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 issue #114447 [INFO] [stdout] = note: this will be a hard error in the 2024 edition [INFO] [stdout] = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior [INFO] [stdout] = note: `--force-warn static-mut-refs` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: use `addr_of_mut!` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 38 | bank_obj = *Lazy::get_mut(addr_of_mut!(lazy_bank_obj)).unwrap(); [INFO] [stdout] | ~~~~~~~~~~~~~ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `ledger_lock` should have an upper case name [INFO] [stdout] --> src/ledger.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | 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:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | 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:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | 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:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | 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:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | &*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] 37 | let _ = &*lazy_bank_obj; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `workerID` should have a snake case name [INFO] [stdout] --> src/ledger.rs:93:11 [INFO] [stdout] | [INFO] [stdout] 93 | 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: 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: 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: 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: 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: 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: 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: 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: 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] [stdout] warning: 26 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.79s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking producer_consumer v0.1.0 (/tmp/fixit) [INFO] [stdout] error[E0796]: creating a mutable reference to a mutable static [INFO] [stdout] --> src/ledger.rs:38:35 [INFO] [stdout] | [INFO] [stdout] 38 | bank_obj = *Lazy::get_mut(&mut lazy_bank_obj).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior [INFO] [stdout] help: use `addr_of_mut!` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 38 | bank_obj = *Lazy::get_mut(addr_of_mut!(lazy_bank_obj)).unwrap(); [INFO] [stdout] | ~~~~~~~~~~~~~ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0796]: creating a mutable reference to a mutable static [INFO] [stdout] --> src/ledger.rs:38:35 [INFO] [stdout] | [INFO] [stdout] 38 | bank_obj = *Lazy::get_mut(&mut lazy_bank_obj).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior [INFO] [stdout] help: use `addr_of_mut!` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 38 | bank_obj = *Lazy::get_mut(addr_of_mut!(lazy_bank_obj)).unwrap(); [INFO] [stdout] | ~~~~~~~~~~~~~ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0796`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0796`. [INFO] [stdout] [INFO] [stderr] error: could not compile `producer_consumer` (bin "producer_consumer" test) due to 2 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `producer_consumer` (bin "producer_consumer") due to 2 previous errors [INFO] [stderr] error: failed to check after updating to 2024 [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `cargo check --frozen --all --all-targets --message-format=json` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "aed14df26e738d9ff08e0510c397ecf8136b31d72a808f1b89b107cf8ccd2187", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aed14df26e738d9ff08e0510c397ecf8136b31d72a808f1b89b107cf8ccd2187", kill_on_drop: false }` [INFO] [stdout] aed14df26e738d9ff08e0510c397ecf8136b31d72a808f1b89b107cf8ccd2187