[INFO] cloning repository https://github.com/mie998/programming-bitcoin-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mie998/programming-bitcoin-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmie998%2Fprogramming-bitcoin-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmie998%2Fprogramming-bitcoin-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ef46de31365a5679ea533a0aa6959b95085d2186 [INFO] testing mie998/programming-bitcoin-rs against try#db823df02fd0c2cf67b43025ac3fef3f2d743245 for pr-150681 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmie998%2Fprogramming-bitcoin-rs" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mie998/programming-bitcoin-rs [INFO] finished tweaking git repo https://github.com/mie998/programming-bitcoin-rs [INFO] tweaked toml for git repo https://github.com/mie998/programming-bitcoin-rs written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mie998/programming-bitcoin-rs on toolchain db823df02fd0c2cf67b43025ac3fef3f2d743245 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/mie998/programming-bitcoin-rs 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" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded impl_ops v0.1.1 [INFO] [stderr] Downloaded bitcoin_hashes v0.11.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 7832ef379cb8a42e802067baba514d8d5545451a0113c94cb7290fe4ac053422 [INFO] running `Command { std: "docker" "start" "-a" "7832ef379cb8a42e802067baba514d8d5545451a0113c94cb7290fe4ac053422", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7832ef379cb8a42e802067baba514d8d5545451a0113c94cb7290fe4ac053422", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7832ef379cb8a42e802067baba514d8d5545451a0113c94cb7290fe4ac053422", kill_on_drop: false }` [INFO] [stdout] 7832ef379cb8a42e802067baba514d8d5545451a0113c94cb7290fe4ac053422 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 004f1870d126aeef7c42570a04a66997085bc6aa73fbd847557bac052cca90f0 [INFO] running `Command { std: "docker" "start" "-a" "004f1870d126aeef7c42570a04a66997085bc6aa73fbd847557bac052cca90f0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling num-integer v0.1.45 [INFO] [stderr] Compiling num-bigint v0.4.3 [INFO] [stderr] Compiling impl_ops v0.1.1 [INFO] [stderr] Compiling bs58 v0.4.0 [INFO] [stderr] Compiling bitcoin_hashes v0.11.0 [INFO] [stderr] Compiling getrandom v0.2.7 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling programming-bitcoin-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected `;`, found `}` [INFO] [stdout] --> src/transaction/tx.rs:148:49 [INFO] [stdout] | [INFO] [stdout] 148 | let response = requests.get(url) [INFO] [stdout] | ^ help: add `;` here [INFO] [stdout] 149 | } [INFO] [stdout] | - unexpected token [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `requests` in this scope [INFO] [stdout] --> src/transaction/tx.rs:148:32 [INFO] [stdout] | [INFO] [stdout] 148 | let response = requests.get(url) [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `bitcoin_hashes::Hash` [INFO] [stdout] --> src/transaction/tx.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use bitcoin_hashes::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Script` [INFO] [stdout] --> src/transaction/tx.rs:89:26 [INFO] [stdout] | [INFO] [stdout] 89 | let script_sig = Script::parse(reader); [INFO] [stdout] | ^^^^^^ use of undeclared type `Script` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `serialize` found for struct `Vec` in the current scope [INFO] [stdout] --> src/transaction/tx.rs:102:39 [INFO] [stdout] | [INFO] [stdout] 102 | result.extend(self.script_sig.serialize()); [INFO] [stdout] | ^^^^^^^^^ method not found in `Vec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Script` [INFO] [stdout] --> src/transaction/tx.rs:115:29 [INFO] [stdout] | [INFO] [stdout] 115 | let script_pubkey = Script::parse(reader); [INFO] [stdout] | ^^^^^^ use of undeclared type `Script` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `serialize` found for struct `Vec` in the current scope [INFO] [stdout] --> src/transaction/tx.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | result.extend(self.script_pubkey.serialize()); [INFO] [stdout] | ^^^^^^^^^ method not found in `Vec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/transaction/tx.rs:147:84 [INFO] [stdout] | [INFO] [stdout] 147 | let url = format!("{}/tx/{}.hex", TxFetcher::get_url(testnet), hex(tx_id)); [INFO] [stdout] | --- ^^^^^ expected `&[u8]`, found `Vec` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&[u8]` [INFO] [stdout] found struct `Vec` [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/util/hex.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn hex(bytes: &[u8]) -> String { [INFO] [stdout] | ^^^ ------------ [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 147 | let url = format!("{}/tx/{}.hex", TxFetcher::get_url(testnet), hex(&tx_id)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/transaction/tx.rs:146:42 [INFO] [stdout] | [INFO] [stdout] 146 | (true, _) | (false, None) => { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 147 | | let url = format!("{}/tx/{}.hex", TxFetcher::get_url(testnet), hex(tx_id)); [INFO] [stdout] 148 | | let response = requests.get(url) [INFO] [stdout] 149 | | } [INFO] [stdout] | |_____________^ expected `Tx`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `reader`, a captured variable in an `FnMut` closure [INFO] [stdout] --> src/transaction/tx.rs:44:71 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ - move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] | | [INFO] [stdout] | captured outer variable [INFO] [stdout] ... [INFO] [stdout] 44 | let inputs: Vec = num_inputs.iter().map(|_| TxIn::parse(reader)).collect(); [INFO] [stdout] | --- ^^^^^^ `reader` is moved here [INFO] [stdout] | | [INFO] [stdout] | captured by this `FnMut` closure [INFO] [stdout] | [INFO] [stdout] help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but `FnOnce` closures may consume them only once [INFO] [stdout] --> /rustc/db823df02fd0c2cf67b43025ac3fef3f2d743245/library/core/src/iter/traits/iterator.rs:780:11 [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 44 | let inputs: Vec = num_inputs.iter().map(|_| TxIn::parse(reader)).collect(); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `reader`, a captured variable in an `FnMut` closure [INFO] [stdout] --> src/transaction/tx.rs:47:74 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ - move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] | | [INFO] [stdout] | captured outer variable [INFO] [stdout] ... [INFO] [stdout] 47 | let outputs: Vec = num_inputs.iter().map(|_| TxOut::parse(reader)).collect(); [INFO] [stdout] | --- ^^^^^^ `reader` is moved here [INFO] [stdout] | | [INFO] [stdout] | captured by this `FnMut` closure [INFO] [stdout] | [INFO] [stdout] help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but `FnOnce` closures may consume them only once [INFO] [stdout] --> /rustc/db823df02fd0c2cf67b43025ac3fef3f2d743245/library/core/src/iter/traits/iterator.rs:780:11 [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 47 | let outputs: Vec = num_inputs.iter().map(|_| TxOut::parse(reader)).collect(); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `reader` [INFO] [stdout] --> src/transaction/tx.rs:43:46 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 40 | let buf = read(reader, 4); [INFO] [stdout] | ------ value moved here [INFO] [stdout] ... [INFO] [stdout] 43 | let num_inputs = varint::read_varint(reader); [INFO] [stdout] | ^^^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 40 | let buf = read(reader, 4); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider mutably borrowing `reader` [INFO] [stdout] | [INFO] [stdout] 40 | let buf = read(&mut reader, 4); [INFO] [stdout] | ++++ [INFO] [stdout] help: consider further restricting type parameter `R` with trait `Copy` [INFO] [stdout] | [INFO] [stdout] 38 | R: Read + std::marker::Copy, [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `reader` [INFO] [stdout] --> src/transaction/tx.rs:44:55 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 43 | let num_inputs = varint::read_varint(reader); [INFO] [stdout] | ------ value moved here [INFO] [stdout] 44 | let inputs: Vec = num_inputs.iter().map(|_| TxIn::parse(reader)).collect(); [INFO] [stdout] | ^^^ ------ use occurs due to use in closure [INFO] [stdout] | | [INFO] [stdout] | value used here after move [INFO] [stdout] | [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 43 | let num_inputs = varint::read_varint(reader); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider mutably borrowing `reader` [INFO] [stdout] | [INFO] [stdout] 43 | let num_inputs = varint::read_varint(&mut reader); [INFO] [stdout] | ++++ [INFO] [stdout] help: consider further restricting type parameter `R` with trait `Copy` [INFO] [stdout] | [INFO] [stdout] 38 | R: Read + std::marker::Copy, [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `reader` [INFO] [stdout] --> src/transaction/tx.rs:46:47 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 44 | let inputs: Vec = num_inputs.iter().map(|_| TxIn::parse(reader)).collect(); [INFO] [stdout] | --- ------ variable moved due to use in closure [INFO] [stdout] | | [INFO] [stdout] | value moved into closure here [INFO] [stdout] 45 | // parse Output portion [INFO] [stdout] 46 | let num_outputs = varint::read_varint(reader); [INFO] [stdout] | ^^^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 44 | let inputs: Vec = num_inputs.iter().map(|_| TxIn::parse(reader)).collect(); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider mutably borrowing `reader` [INFO] [stdout] | [INFO] [stdout] 44 | let inputs: Vec = num_inputs.iter().map(|_| TxIn::parse(&mut reader)).collect(); [INFO] [stdout] | ++++ [INFO] [stdout] help: consider further restricting type parameter `R` with trait `Copy` [INFO] [stdout] | [INFO] [stdout] 38 | R: Read + std::marker::Copy, [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `reader` [INFO] [stdout] --> src/transaction/tx.rs:47:57 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 46 | let num_outputs = varint::read_varint(reader); [INFO] [stdout] | ------ value moved here [INFO] [stdout] 47 | let outputs: Vec = num_inputs.iter().map(|_| TxOut::parse(reader)).collect(); [INFO] [stdout] | ^^^ ------ use occurs due to use in closure [INFO] [stdout] | | [INFO] [stdout] | value used here after move [INFO] [stdout] | [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 46 | let num_outputs = varint::read_varint(reader); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider mutably borrowing `reader` [INFO] [stdout] | [INFO] [stdout] 46 | let num_outputs = varint::read_varint(&mut reader); [INFO] [stdout] | ++++ [INFO] [stdout] help: consider further restricting type parameter `R` with trait `Copy` [INFO] [stdout] | [INFO] [stdout] 38 | R: Read + std::marker::Copy, [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `reader` [INFO] [stdout] --> src/transaction/tx.rs:49:48 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ------ move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 47 | let outputs: Vec = num_inputs.iter().map(|_| TxOut::parse(reader)).collect(); [INFO] [stdout] | --- ------ variable moved due to use in closure [INFO] [stdout] | | [INFO] [stdout] | value moved into closure here [INFO] [stdout] 48 | // parse Locktime portion [INFO] [stdout] 49 | let locktime = u32::from_le_bytes(read(reader, 4).try_into().unwrap()); [INFO] [stdout] | ^^^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/transaction/tx.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | fn parse(reader: R, testnet: bool) -> Self [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 47 | let outputs: Vec = num_inputs.iter().map(|_| TxOut::parse(reader)).collect(); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider mutably borrowing `reader` [INFO] [stdout] | [INFO] [stdout] 47 | let outputs: Vec = num_inputs.iter().map(|_| TxOut::parse(&mut reader)).collect(); [INFO] [stdout] | ++++ [INFO] [stdout] help: consider further restricting type parameter `R` with trait `Copy` [INFO] [stdout] | [INFO] [stdout] 38 | R: Read + std::marker::Copy, [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_outputs` [INFO] [stdout] --> src/transaction/tx.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | let num_outputs = varint::read_varint(reader); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_outputs` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `reader` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/util/reader.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | match reader.read_exact(&mut buf) { [INFO] [stdout] | ^^^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 3 | pub fn read(mut reader: R, size: usize) -> Vec [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `buf` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/util/reader.rs:8:29 [INFO] [stdout] | [INFO] [stdout] 8 | match reader.read_exact(&mut buf) { [INFO] [stdout] | ^^^^^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 7 | let mut buf = vec![0u8; size]; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/util/varint.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn read_varint(mut reader: R) -> Vec [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `reader` [INFO] [stdout] --> src/util/varint.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn read_varint(mut reader: R) -> Vec [INFO] [stdout] | ---------- move occurs because `reader` has type `R`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 8 | let buf_len1 = read(reader, 1); [INFO] [stdout] | ------ value moved here [INFO] [stdout] ... [INFO] [stdout] 17 | read(reader, valid_len) [INFO] [stdout] | ^^^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] help: if `R` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/util/varint.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn read_varint(mut reader: R) -> Vec [INFO] [stdout] | ^ consider constraining this type parameter with `Clone` [INFO] [stdout] ... [INFO] [stdout] 8 | let buf_len1 = read(reader, 1); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider mutably borrowing `reader` [INFO] [stdout] | [INFO] [stdout] 8 | let buf_len1 = read(&mut reader, 1); [INFO] [stdout] | ++++ [INFO] [stdout] help: consider further restricting type parameter `R` with trait `Copy` [INFO] [stdout] | [INFO] [stdout] 6 | R: Read + std::marker::Copy, [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0382, E0425, E0433, E0507, E0596, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `programming-bitcoin-rs` (bin "programming-bitcoin-rs") due to 18 previous errors; 3 warnings emitted [INFO] running `Command { std: "docker" "inspect" "004f1870d126aeef7c42570a04a66997085bc6aa73fbd847557bac052cca90f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "004f1870d126aeef7c42570a04a66997085bc6aa73fbd847557bac052cca90f0", kill_on_drop: false }` [INFO] [stdout] 004f1870d126aeef7c42570a04a66997085bc6aa73fbd847557bac052cca90f0