Skip to content
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

Clippy failures running locally #166

Closed
JoshMcguigan opened this issue Jan 18, 2019 · 1 comment
Closed

Clippy failures running locally #166

JoshMcguigan opened this issue Jan 18, 2019 · 1 comment
Assignees
Labels
Tooling/Testing CI, benchmarking, and testing infrastucture.

Comments

@JoshMcguigan
Copy link
Contributor

JoshMcguigan commented Jan 18, 2019

I am getting errors when running clippy locally against the master branch.

$ cargo clippy -- -V
clippy 0.0.212 (b2601beb 2018-11-27)

$ git rev-parse master
2bd26cea006a67a36778adbcc3525f83765c044d

$ cargo clippy --all -- -D clippy    
Checking raft v0.4.0 (/Users/josh/Projects/raft-rs)
warning: lint name `clippy` is deprecated and does not have an effect anymore. Use: clippy::all
  |
  = note: requested on the command line with `-D clippy`

error: `cfg_attr` is deprecated for rustfmt and got replaced by tool_attributes
 --> src/eraftpb.rs:8:1
  |
8 | #![cfg_attr(rustfmt, rustfmt_skip)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#![rustfmt::skip]`
  |
  = note: `-D clippy::deprecated-cfg-attr` implied by `-D clippy`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr

error: aborting due to previous error

error: Could not compile `raft`.

To learn more, run the command again with --verbose.

It looks like later versions of rust-protobuf have updated the clippy config. After updating the generated file manually, I get the following output from clippy.

$ cargo clippy --all -- -D clippy
    Checking raft v0.4.0 (/Users/josh/Projects/raft-rs)
warning: lint name `clippy` is deprecated and does not have an effect anymore. Use: clippy::all
  |
  = note: requested on the command line with `-D clippy`

error: this .into_iter() call is equivalent to .iter() and will not move the slice
   --> src/raft.rs:766:14
    |
766 |         ents.into_iter()
    |              ^^^^^^^^^ help: call directly: `iter`
    |
    = note: `-D clippy::into-iter-on-ref` implied by `-D clippy`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref

error: aborting due to previous error

error: Could not compile `raft`.

To learn more, run the command again with --verbose.

Am I doing something incorrectly? I thought the travis builds might be passing because they use clippy-preview rather than clippy, but I tried installing that locally and got the same results.

@Hoverbear Hoverbear self-assigned this Jan 18, 2019
@Hoverbear
Copy link
Contributor

@JoshMcguigan I think this is part of the new Rust version. :) I'll fix it shortly. Sorry about that.

@Hoverbear Hoverbear added the Tooling/Testing CI, benchmarking, and testing infrastucture. label Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tooling/Testing CI, benchmarking, and testing infrastucture.
Projects
None yet
Development

No branches or pull requests

2 participants