[INFO] cloning repository https://github.com/MRGRAVITY817/rust-coin [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/MRGRAVITY817/rust-coin" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMRGRAVITY817%2Frust-coin", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMRGRAVITY817%2Frust-coin'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0999f63d59dbf572e15f2b46e9df2bb4945b5425 [INFO] checking MRGRAVITY817/rust-coin against try#9961e55b3687a6d0b2bab4af0e5e81494b09be81 for pr-139087-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMRGRAVITY817%2Frust-coin" "/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/MRGRAVITY817/rust-coin [INFO] finished tweaking git repo https://github.com/MRGRAVITY817/rust-coin [INFO] tweaked toml for git repo https://github.com/MRGRAVITY817/rust-coin written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/MRGRAVITY817/rust-coin on toolchain 9961e55b3687a6d0b2bab4af0e5e81494b09be81 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9961e55b3687a6d0b2bab4af0e5e81494b09be81" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/MRGRAVITY817/rust-coin 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" "+9961e55b3687a6d0b2bab4af0e5e81494b09be81" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded once_cell v1.9.0 [INFO] [stderr] Downloaded pin-project-lite v0.2.8 [INFO] [stderr] Downloaded redox_syscall v0.2.10 [INFO] [stderr] Downloaded http-range-header v0.3.0 [INFO] [stderr] Downloaded fs2 v0.4.3 [INFO] [stderr] Downloaded axum-core v0.1.1 [INFO] [stderr] Downloaded digest v0.10.2 [INFO] [stderr] Downloaded async-trait v0.1.52 [INFO] [stderr] Downloaded tokio-util v0.6.9 [INFO] [stderr] Downloaded tracing v0.1.30 [INFO] [stderr] Downloaded indexmap v1.8.0 [INFO] [stderr] Downloaded cpufeatures v0.2.1 [INFO] [stderr] Downloaded tower v0.4.11 [INFO] [stderr] Downloaded axum v0.4.5 [INFO] [stderr] Downloaded hyper v0.14.16 [INFO] [stderr] Downloaded tower-http v0.2.2 [INFO] [stderr] Downloaded serde_json v1.0.79 [INFO] [stderr] Downloaded syn v1.0.86 [INFO] [stderr] Downloaded ntapi v0.3.6 [INFO] [stderr] Downloaded tracing-attributes v0.1.19 [INFO] [stderr] Downloaded clap v3.0.14 [INFO] [stderr] Downloaded tracing-core v0.1.22 [INFO] [stderr] Downloaded termcolor v1.1.2 [INFO] [stderr] Downloaded textwrap v0.14.2 [INFO] [stderr] Downloaded crypto-common v0.1.2 [INFO] [stderr] Downloaded sled v0.34.7 [INFO] [stderr] Downloaded libc v0.2.117 [INFO] [stderr] Downloaded tokio v1.16.1 [INFO] [stderr] Downloaded http v0.2.6 [INFO] [stderr] Downloaded sha2 v0.10.1 [INFO] [stderr] Downloaded httparse v1.6.0 [INFO] [stderr] Downloaded matchit v0.4.6 [INFO] [stderr] Downloaded clap_derive v3.0.14 [INFO] [stderr] Downloaded os_str_bytes v6.0.0 [INFO] [stderr] Downloaded mio v0.7.14 [INFO] [stderr] Downloaded sync_wrapper v0.1.1 [INFO] [stderr] Downloaded tower-layer v0.3.1 [INFO] [stderr] Downloaded bincode v1.3.3 [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+9961e55b3687a6d0b2bab4af0e5e81494b09be81" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 53bacef829405f6d02f3787b73b1a8bfc6f1c447b969725c2838da1480d047f1 [INFO] running `Command { std: "docker" "start" "-a" "53bacef829405f6d02f3787b73b1a8bfc6f1c447b969725c2838da1480d047f1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "53bacef829405f6d02f3787b73b1a8bfc6f1c447b969725c2838da1480d047f1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "53bacef829405f6d02f3787b73b1a8bfc6f1c447b969725c2838da1480d047f1", kill_on_drop: false }` [INFO] [stdout] 53bacef829405f6d02f3787b73b1a8bfc6f1c447b969725c2838da1480d047f1 [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+9961e55b3687a6d0b2bab4af0e5e81494b09be81" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 127acf1e12228f67e75f2a57bf0f2af7f4a7ec998d0067b78933b3c871fef2f5 [INFO] running `Command { std: "docker" "start" "-a" "127acf1e12228f67e75f2a57bf0f2af7f4a7ec998d0067b78933b3c871fef2f5", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.86 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling libc v0.2.117 [INFO] [stderr] Compiling version_check v0.9.4 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling futures-core v0.3.21 [INFO] [stderr] Checking pin-project-lite v0.2.8 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Checking bytes v1.1.0 [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Compiling parking_lot_core v0.8.5 [INFO] [stderr] Checking scopeguard v1.1.0 [INFO] [stderr] Checking itoa v1.0.1 [INFO] [stderr] Compiling futures-task v0.3.21 [INFO] [stderr] Checking smallvec v1.8.0 [INFO] [stderr] Checking lock_api v0.4.6 [INFO] [stderr] Compiling typenum v1.15.0 [INFO] [stderr] Checking instant v0.1.12 [INFO] [stderr] Compiling serde_derive v1.0.136 [INFO] [stderr] Compiling futures-util v0.3.21 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Compiling serde v1.0.136 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Checking once_cell v1.9.0 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Checking tracing-core v0.1.22 [INFO] [stderr] Checking tower-service v0.3.1 [INFO] [stderr] Compiling generic-array v0.14.5 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Checking http v0.2.6 [INFO] [stderr] Compiling crossbeam-utils v0.8.7 [INFO] [stderr] Compiling httparse v1.6.0 [INFO] [stderr] Compiling futures-channel v0.3.21 [INFO] [stderr] Compiling async-trait v0.1.52 [INFO] [stderr] Compiling indexmap v1.8.0 [INFO] [stderr] Compiling serde_json v1.0.79 [INFO] [stderr] Compiling crossbeam-epoch v0.9.7 [INFO] [stderr] Checking try-lock v0.2.3 [INFO] [stderr] Checking futures-sink v0.3.21 [INFO] [stderr] Checking percent-encoding v2.1.0 [INFO] [stderr] Checking tower-layer v0.3.1 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Compiling crc32fast v1.3.2 [INFO] [stderr] Checking ryu v1.0.9 [INFO] [stderr] Checking matches v0.1.9 [INFO] [stderr] Checking want v0.3.0 [INFO] [stderr] Checking mio v0.7.14 [INFO] [stderr] Compiling quote v1.0.15 [INFO] [stderr] Checking num_cpus v1.13.1 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking form_urlencoded v1.0.1 [INFO] [stderr] Checking socket2 v0.4.4 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Checking http-range-header v0.3.0 [INFO] [stderr] Checking mime v0.3.16 [INFO] [stderr] Checking httpdate v1.0.2 [INFO] [stderr] Checking hashbrown v0.11.2 [INFO] [stderr] Checking byteorder v1.4.3 [INFO] [stderr] Compiling heck v0.4.0 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking fs2 v0.4.3 [INFO] [stderr] Checking os_str_bytes v6.0.0 [INFO] [stderr] Checking textwrap v0.14.2 [INFO] [stderr] Checking termcolor v1.1.2 [INFO] [stderr] Checking matchit v0.4.6 [INFO] [stderr] Checking sync_wrapper v0.1.1 [INFO] [stderr] Checking strsim v0.10.0 [INFO] [stderr] Checking cpufeatures v0.2.1 [INFO] [stderr] Checking sled v0.34.7 [INFO] [stderr] Checking crypto-common v0.1.2 [INFO] [stderr] Checking block-buffer v0.10.2 [INFO] [stderr] Checking digest v0.10.2 [INFO] [stderr] Checking sha2 v0.10.1 [INFO] [stderr] Checking http-body v0.4.4 [INFO] [stderr] Checking tower-http v0.2.2 [INFO] [stderr] Compiling tokio-macros v1.7.0 [INFO] [stderr] Compiling tracing-attributes v0.1.19 [INFO] [stderr] Compiling pin-project-internal v1.0.10 [INFO] [stderr] Compiling thiserror-impl v1.0.30 [INFO] [stderr] Compiling clap_derive v3.0.14 [INFO] [stderr] Checking tokio v1.16.1 [INFO] [stderr] Checking tracing v0.1.30 [INFO] [stderr] Checking axum-core v0.1.1 [INFO] [stderr] Checking thiserror v1.0.30 [INFO] [stderr] Checking clap v3.0.14 [INFO] [stderr] Checking pin-project v1.0.10 [INFO] [stderr] Checking tokio-util v0.6.9 [INFO] [stderr] Checking hyper v0.14.16 [INFO] [stderr] Checking tower v0.4.11 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking axum v0.4.5 [INFO] [stderr] Checking rust-coin v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/blockchain/chain.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | fn blocks(&self) -> Vec<&Block> { [INFO] [stdout] | ------ ^^^^^^^^^^^ expected `Vec<&Block>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec<&Block>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/blockchain/chain.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | fn blocks(&self) -> Vec<&Block> { [INFO] [stdout] | ------ ^^^^^^^^^^^ expected `Vec<&Block>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec<&Block>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tx_id` [INFO] [stdout] --> src/blockchain/chain.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn find_tx(&self, tx_id: impl AsRef) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_tx_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address` [INFO] [stdout] --> src/blockchain/chain.rs:45:27 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn balance(&self, address: String) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/blockchain/chain.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let chain = RUSTCOIN.read()?.chain(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 72 | let db = DB.read()?; [INFO] [stdout] 73 | db.save_checkpoint(to_bytes(chain)?) [INFO] [stdout] | ----- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 71 ~ let binding = RUSTCOIN.read()?; [INFO] [stdout] 72 ~ let chain = binding.chain(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db` [INFO] [stdout] --> src/blockchain/chain.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn add_block(db: &CoinDb) -> Result { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from` [INFO] [stdout] --> src/blockchain/transactions.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn new(from: String, to: String, amount: Amount) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/blockchain/transactions.rs:31:30 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn new(from: String, to: String, amount: Amount) -> Result { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `amount` [INFO] [stdout] --> src/blockchain/transactions.rs:31:42 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn new(from: String, to: String, amount: Amount) -> Result { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_amount` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address` [INFO] [stdout] --> src/blockchain/transactions.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new_coinbase(address: String) -> Self { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `tx_in.tx_id` which is behind a shared reference [INFO] [stdout] --> src/blockchain/transactions.rs:89:39 [INFO] [stdout] | [INFO] [stdout] 85 | .map(|tx_in| { [INFO] [stdout] | ----- move occurs because `tx_in.tx_id` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 89 | if verify(tx_in.tx_id, tx_in.signature, address) { [INFO] [stdout] | ^^^^^^^^^^^ `tx_in.tx_id` is moved here [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 89 | if verify(tx_in.tx_id.clone(), tx_in.signature, address) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `tx_in.signature` which is behind a shared reference [INFO] [stdout] --> src/blockchain/transactions.rs:89:52 [INFO] [stdout] | [INFO] [stdout] 85 | .map(|tx_in| { [INFO] [stdout] | ----- move occurs because `tx_in.signature` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 89 | if verify(tx_in.tx_id, tx_in.signature, address) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ `tx_in.signature` is moved here [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 89 | if verify(tx_in.tx_id, tx_in.signature.clone(), address) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `tx_in.tx_id` which is behind a shared reference [INFO] [stdout] --> src/blockchain/transactions.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | chain.find_tx(tx_in.tx_id).and_then(|prev_tx| { [INFO] [stdout] | ^^^^^^^^^^^ move occurs because `tx_in.tx_id` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 86 | chain.find_tx(tx_in.tx_id.clone()).and_then(|prev_tx| { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `name` [INFO] [stdout] --> src/db.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 27 | let name = format!("{DB_NAME}_{}", name.as_ref()); [INFO] [stdout] | ---- move occurs because `name` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 28 | let db = open_db(name); [INFO] [stdout] | ---- value moved here [INFO] [stdout] 29 | Self { db, name } [INFO] [stdout] | ^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 28 | let db = open_db(name.clone()); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | self.db [INFO] [stdout] | ^^^^^^^ move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 33 | self.db.clone() [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | let block_tree = self.db?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 41 | let block_tree = as Clone>::clone(&self.db)?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 41 | let block_tree = self.db.clone()?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | self.db?.remove(BLOCK_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 47 | as Clone>::clone(&self.db)?.remove(BLOCK_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 47 | self.db.clone()?.remove(BLOCK_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | let data_tree = self.db?.open_tree(DATA_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 52 | let data_tree = as Clone>::clone(&self.db)?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 52 | let data_tree = self.db.clone()?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | let data_tree = self.db?.open_tree(DATA_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 58 | let data_tree = as Clone>::clone(&self.db)?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 58 | let data_tree = self.db.clone()?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:64:26 [INFO] [stdout] | [INFO] [stdout] 64 | let block_tree = self.db?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 64 | let block_tree = as Clone>::clone(&self.db)?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 64 | let block_tree = self.db.clone()?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tx_id` [INFO] [stdout] --> src/blockchain/chain.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn find_tx(&self, tx_id: impl AsRef) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_tx_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address` [INFO] [stdout] --> src/blockchain/chain.rs:45:27 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn balance(&self, address: String) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/blockchain/chain.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let chain = RUSTCOIN.read()?.chain(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 72 | let db = DB.read()?; [INFO] [stdout] 73 | db.save_checkpoint(to_bytes(chain)?) [INFO] [stdout] | ----- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 71 ~ let binding = RUSTCOIN.read()?; [INFO] [stdout] 72 ~ let chain = binding.chain(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/utils.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | hasher.finalize().to_vec().as_slice() [INFO] [stdout] | --------------------------^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] | temporary value created here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db` [INFO] [stdout] --> src/blockchain/chain.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn add_block(db: &CoinDb) -> Result { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing function parameter `res` [INFO] [stdout] --> src/utils.rs:16:54 [INFO] [stdout] | [INFO] [stdout] 16 | let result = bincode::serialize(&data).map(|res| res.as_slice())?; [INFO] [stdout] | ---^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] | `res` is borrowed here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `block` [INFO] [stdout] --> src/utils.rs:20:23 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn from_bytes<'a>(block: &'a Block, data: &'a [u8]) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_block` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tx_id` [INFO] [stdout] --> src/wallet.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | tx_id: impl AsRef<[u8]>, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_tx_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `txin_sig` [INFO] [stdout] --> src/wallet.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | txin_sig: impl AsRef, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_txin_sig` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address` [INFO] [stdout] --> src/wallet.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | address: impl AsRef, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from` [INFO] [stdout] --> src/blockchain/transactions.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn new(from: String, to: String, amount: Amount) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/blockchain/transactions.rs:31:30 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn new(from: String, to: String, amount: Amount) -> Result { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `amount` [INFO] [stdout] --> src/blockchain/transactions.rs:31:42 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn new(from: String, to: String, amount: Amount) -> Result { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_amount` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address` [INFO] [stdout] --> src/blockchain/transactions.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new_coinbase(address: String) -> Self { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `tx_in.tx_id` which is behind a shared reference [INFO] [stdout] --> src/blockchain/transactions.rs:89:39 [INFO] [stdout] | [INFO] [stdout] 85 | .map(|tx_in| { [INFO] [stdout] | ----- move occurs because `tx_in.tx_id` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 89 | if verify(tx_in.tx_id, tx_in.signature, address) { [INFO] [stdout] | ^^^^^^^^^^^ `tx_in.tx_id` is moved here [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 89 | if verify(tx_in.tx_id.clone(), tx_in.signature, address) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `tx_in.signature` which is behind a shared reference [INFO] [stdout] --> src/blockchain/transactions.rs:89:52 [INFO] [stdout] | [INFO] [stdout] 85 | .map(|tx_in| { [INFO] [stdout] | ----- move occurs because `tx_in.signature` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 89 | if verify(tx_in.tx_id, tx_in.signature, address) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ `tx_in.signature` is moved here [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 89 | if verify(tx_in.tx_id, tx_in.signature.clone(), address) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `tx_in.tx_id` which is behind a shared reference [INFO] [stdout] --> src/blockchain/transactions.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | chain.find_tx(tx_in.tx_id).and_then(|prev_tx| { [INFO] [stdout] | ^^^^^^^^^^^ move occurs because `tx_in.tx_id` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 86 | chain.find_tx(tx_in.tx_id.clone()).and_then(|prev_tx| { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0382, E0507, E0515, E0716. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `name` [INFO] [stdout] --> src/db.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 27 | let name = format!("{DB_NAME}_{}", name.as_ref()); [INFO] [stdout] | ---- move occurs because `name` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 28 | let db = open_db(name); [INFO] [stdout] | ---- value moved here [INFO] [stdout] 29 | Self { db, name } [INFO] [stdout] | ^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 28 | let db = open_db(name.clone()); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | self.db [INFO] [stdout] | ^^^^^^^ move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 33 | self.db.clone() [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-coin` (bin "rust-coin" test) due to 14 previous errors; 12 warnings emitted [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | let block_tree = self.db?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 41 | let block_tree = as Clone>::clone(&self.db)?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 41 | let block_tree = self.db.clone()?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | self.db?.remove(BLOCK_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 47 | as Clone>::clone(&self.db)?.remove(BLOCK_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 47 | self.db.clone()?.remove(BLOCK_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | let data_tree = self.db?.open_tree(DATA_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 52 | let data_tree = as Clone>::clone(&self.db)?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 52 | let data_tree = self.db.clone()?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | let data_tree = self.db?.open_tree(DATA_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 58 | let data_tree = as Clone>::clone(&self.db)?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 58 | let data_tree = self.db.clone()?.open_tree(DATA_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.db` which is behind a shared reference [INFO] [stdout] --> src/db.rs:64:26 [INFO] [stdout] | [INFO] [stdout] 64 | let block_tree = self.db?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.db` moved due to this method call [INFO] [stdout] | move occurs because `self.db` has type `std::result::Result`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.db` [INFO] [stdout] --> /rustc/9961e55b3687a6d0b2bab4af0e5e81494b09be81/library/core/src/ops/try_trait.rs:219:14 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 64 | let block_tree = as Clone>::clone(&self.db)?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 64 | let block_tree = self.db.clone()?.open_tree(BLOCK_TREE)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/utils.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | hasher.finalize().to_vec().as_slice() [INFO] [stdout] | --------------------------^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] | temporary value created here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing function parameter `res` [INFO] [stdout] --> src/utils.rs:16:54 [INFO] [stdout] | [INFO] [stdout] 16 | let result = bincode::serialize(&data).map(|res| res.as_slice())?; [INFO] [stdout] | ---^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] | `res` is borrowed here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `block` [INFO] [stdout] --> src/utils.rs:20:23 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn from_bytes<'a>(block: &'a Block, data: &'a [u8]) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_block` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tx_id` [INFO] [stdout] --> src/wallet.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | tx_id: impl AsRef<[u8]>, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_tx_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `txin_sig` [INFO] [stdout] --> src/wallet.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | txin_sig: impl AsRef, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_txin_sig` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address` [INFO] [stdout] --> src/wallet.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | address: impl AsRef, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0382, E0507, E0515, E0716. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-coin` (bin "rust-coin") due to 14 previous errors; 12 warnings emitted [INFO] running `Command { std: "docker" "inspect" "127acf1e12228f67e75f2a57bf0f2af7f4a7ec998d0067b78933b3c871fef2f5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "127acf1e12228f67e75f2a57bf0f2af7f4a7ec998d0067b78933b3c871fef2f5", kill_on_drop: false }` [INFO] [stdout] 127acf1e12228f67e75f2a57bf0f2af7f4a7ec998d0067b78933b3c871fef2f5