Rust-clippy: Does not compile on 1.28.0-nightly (4ecf12bf0 2018-06-02)

Created on 3 Jun 2018  路  10Comments  路  Source: rust-lang/rust-clippy

$ cargo +nightly install clippy
.
.
.
   Compiling clippy_lints v0.0.206
error[E0532]: expected unit struct/variant or constant, found tuple variant `hir::Visibility::Crate`
  --> /Users/josh.graham/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.206/src/utils/inspector.rs:56:13
   |
56 |             hir::Visibility::Crate => println!("visible crate wide"),
   |             ^^^^^^^^^^^^^^^^^^^^^^ not a unit struct/variant or constant
help: possible better candidates are found in other modules, you can import them into scope
   |
5  | use rustc::session::search_paths::PathKind::Crate;
   |
5  | use syntax_pos::symbol::keywords::Crate;
   |

error[E0532]: expected unit struct/variant or constant, found tuple variant `hir::Visibility::Crate`
   --> /Users/josh.graham/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.206/src/utils/inspector.rs:348:9
    |
348 |         hir::Visibility::Crate => println!("visible crate wide"),
    |         ^^^^^^^^^^^^^^^^^^^^^^ not a unit struct/variant or constant
help: possible better candidates are found in other modules, you can import them into scope
    |
5   | use rustc::session::search_paths::PathKind::Crate;
    |
5   | use syntax_pos::symbol::keywords::Crate;
    |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0532`.
error: failed to compile `clippy v0.0.206`, intermediate artifacts can be found at `/var/folders/yd/z6hvb47j5jn4d6gb22c1r66w0000gn/T/cargo-installSN7I7D`

Caused by:
  Could not compile `clippy_lints`.

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

Most helpful comment

So... this is fixed on master, but we're blocked on a cargo bug (https://github.com/rust-lang/cargo/issues/5427 ) that prevents us from publishing clippy

All 10 comments

$ cargo +nightly version
cargo 1.28.0-nightly (c3b09c968 2018-05-27)

$ rustup run nightly rustc --version
rustc 1.28.0-nightly (4ecf12bf0 2018-06-02)

$ rustup toolchain list
stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin

on it

So... this is fixed on master, but we're blocked on a cargo bug (https://github.com/rust-lang/cargo/issues/5427 ) that prevents us from publishing clippy

@oli-obk shall we (temporarily) disable edition?

It seems that upstream issue is resolved now 馃憤 Any ETA on pushing the new crate?

good question. I'll try to bump the cargo submodule in rustc.

@oli-obk wouldn't it work if you (or somebody else with crates.io permission) cloned cargo repo and used that version?

lol. that would indeed work. I don't like it, but I might just do it

Temporary workaround: cargo install clippy --git https://github.com/rust-lang-nursery/rust-clippy

published 0.0.207

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nbaksalyar picture nbaksalyar  路  3Comments

taiki-e picture taiki-e  路  3Comments

Luro02 picture Luro02  路  3Comments

matthiaskrgr picture matthiaskrgr  路  3Comments

matthiaskrgr picture matthiaskrgr  路  3Comments