Skip to content

unable to build 0.21.3 for Windows - temporary value dropped while borrowed  #4073

@cryptoni9n

Description

@cryptoni9n

receiving these errors when trying to cargo build --release from git branch 0.21.3:

error[E0716]: temporary value dropped while borrowed                                                                                                               
  --> src\subcommand\verify.rs:35:8
   |
34 |       } else if let Some(file) = &self.file {
   |  ____________-
35 | |       &fs::read(file)?
   | |        ^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
36 | |     } else {
   | |     - temporary value is freed at the end of this statement
37 | |       unreachable!()
38 | |     };
   | |_____- borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error[E0716]: temporary value dropped while borrowed
  --> src\subcommand\wallet\sign.rs:38:8
   |
37 |       } else if let Some(file) = &self.file {
   |  ____________-
38 | |       &fs::read(file)?
   | |        ^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
39 | |     } else {
   | |     - temporary value is freed at the end of this statement
40 | |       unreachable!()
41 | |     };
   | |_____- borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

For more information about this error, try `rustc --explain E0716`.
error: could not compile `ord` (lib) due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions