Skip to content

Compilation Errors - error: variable does not need to be mutable #1075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Thireus opened this issue May 19, 2018 · 2 comments
Closed

Compilation Errors - error: variable does not need to be mutable #1075

Thireus opened this issue May 19, 2018 · 2 comments

Comments

@Thireus
Copy link

Thireus commented May 19, 2018

Compilation failed on armv7l host with master head at 4bbaa8d.

   Compiling grin_core v0.2.0 (file:///home/thireus/grin/core)
warning: use of deprecated item: underlying aggsig api still subject to review and change
   --> core/src/core/transaction.rs:194:12
    |
194 |    valid = secp::aggsig::verify_single(&secp, &sig, &msg, None, &pubkeys[i], false);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: #[warn(deprecated)] on by default

warning: use of deprecated item: Experimental - underlying code unreviewed and subject to change
   --> core/src/core/transaction.rs:952:14
    |
952 |   match secp.verify_bullet_proof(self.commit, self.proof, None) {
    |              ^^^^^^^^^^^^^^^^^^^

error: variable does not need to be mutable
   --> core/src/core/transaction.rs:528:7
    |
528 |   let mut keys = kernel_offsets
    |       ---^^^^^
    |       |
    |       help: remove this `mut`
    |
note: lint level defined here
   --> core/src/lib.rs:21:9
    |
21  | #![deny(unused_mut)]
    |         ^^^^^^^^^^

error: variable does not need to be mutable
   --> core/src/core/transaction.rs:602:7
    |
602 |   let mut keys = kernel_offsets
    |       ---^^^^^
    |       |
    |       help: remove this `mut`

error: variable does not need to be mutable
   --> core/src/core/transaction.rs:662:7
    |
662 |   let mut positive_key = vec![mk_tx.offset]
    |       ---^^^^^^^^^^^^^
    |       |
    |       help: remove this `mut`

error: variable does not need to be mutable
   --> core/src/core/transaction.rs:668:7
    |
668 |   let mut negative_keys = kernel_offsets
    |       ---^^^^^^^^^^^^^^
    |       |
    |       help: remove this `mut`

error: aborting due to 4 previous errors

error: Could not compile `grin_core`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@ignopeverell
Copy link
Contributor

What does rustc --version give you? You should have at least 1.24.

@Thireus
Copy link
Author

Thireus commented May 21, 2018

Well spotted, thank you Ignotus!

I was on rustc 1.22.1. I did a rustup default 1.25.0 to upgrade (rustup update on 1.26.0 didn't work for ARM --> rust-lang/rustup#1410).

@Thireus Thireus closed this as completed May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants