arcnmx / cargo-clippy

cargo clippy
MIT License
68 stars 11 forks source link

Can't build, maybe clippy issue #9

Closed vi closed 8 years ago

vi commented 8 years ago
cargo-clippy$ cargo build
    Updating git repository `https://github.com/Manishearth/rust-clippy`
    Updating registry `https://github.com/rust-lang/crates.io-index` 
Downloading unicode-normalization v0.1.1
   Compiling unicode-normalization v0.1.1
   Compiling clippy v0.0.32 (https://github.com/Manishearth/rust-clippy#cd3c649a)
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/lib.rs:24:1: 24:27 error: can't find crate for `rustc_plugin` [E0463]
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/lib.rs:24 extern crate rustc_plugin;
                                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `clippy`.

To learn more, run the command again with --verbose.
arcnmx commented 8 years ago

What rustc version? Try making sure you're keeping up to date with the latest nightly. clippy is really picky about the specific version of rustc due to the API instability.

vi commented 8 years ago

Updated, retried:

rust@vi-notebook:~/cargo-clippy$ cargo  build --verbose
       Fresh unicode-normalization v0.1.1
   Compiling clippy v0.0.32 (https://github.com/Manishearth/rust-clippy#cd3c649a)
     Running `rustc /home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/lib.rs --crate-name clippy --crate-type dylib -C prefer-dynamic -g -C metadata=40c3bc5ba3ca261c -C extra-filename=-40c3bc5ba3ca261c --out-dir /home/vi/home/rust/cargo-clippy/target/debug/deps --emit=dep-info,link -L dependency=/home/vi/home/rust/cargo-clippy/target/debug/deps -L dependency=/home/vi/home/rust/cargo-clippy/target/debug/deps --extern unicode_normalization=/home/vi/home/rust/cargo-clippy/target/debug/deps/libunicode_normalization-c9c61d0237a4561d.rlib --cap-lints allow`
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:438:62: 438:68 error: mismatched types:
 expected `syntax::ptr::P<[syntax::ptr::P<rustc_front::hir::Ty>]>`,
    found `collections::vec::Vec<_>`
(expected struct `syntax::ptr::P`,
    found struct `collections::vec::Vec`) [E0308]
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:438             (&UnitType, &Return(ref ty)) if ty.node == TyTup(vec![]) => true,
                                                                                                                                                            ^~~~~~
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:438:62: 438:68 note: in this expansion of vec! (defined in <std macros>)
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:438:62: 438:68 help: run `rustc --explain E0308` to see a detailed explanation
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:440:61: 440:67 error: mismatched types:
 expected `syntax::ptr::P<[syntax::ptr::P<rustc_front::hir::Ty>]>`,
    found `collections::vec::Vec<_>`
(expected struct `syntax::ptr::P`,
    found struct `collections::vec::Vec`) [E0308]
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:440             (&AnyType, &Return(ref ty)) if ty.node != TyTup(vec![])  => true,
                                                                                                                                                           ^~~~~~
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:440:61: 440:67 note: in this expansion of vec! (defined in <std macros>)
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/methods.rs:440:61: 440:67 help: run `rustc --explain E0308` to see a detailed explanation
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/map_clone.rs:85:46: 85:57 error: mismatched types:
 expected `syntax::ptr::P<[rustc_front::hir::PathSegment]>`,
    found `[rustc_front::hir::PathSegment; 1]`
(expected struct `syntax::ptr::P`,
    found array of 1 elements) [E0308]
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/map_clone.rs:85             !path.global && path.segments == arg_segment
                                                                                                                                             ^~~~~~~~~~~
/home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/map_clone.rs:85:46: 85:57 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 3 previous errors
Could not compile `clippy`.

Caused by:
  Process didn't exit successfully: `rustc /home/vi/home/rust/.cargo/git/checkouts/rust-clippy-e920d1b5eb9a65e3/master/src/lib.rs --crate-name clippy --crate-type dylib -C prefer-dynamic -g -C metadata=40c3bc5ba3ca261c -C extra-filename=-40c3bc5ba3ca261c --out-dir /home/vi/home/rust/cargo-clippy/target/debug/deps --emit=dep-info,link -L dependency=/home/vi/home/rust/cargo-clippy/target/debug/deps -L dependency=/home/vi/home/rust/cargo-clippy/target/debug/deps --extern unicode_normalization=/home/vi/home/rust/cargo-clippy/target/debug/deps/libunicode_normalization-c9c61d0237a4561d.rlib --cap-lints allow` (exit code: 101)
rust@vi-notebook:~/cargo-clippy$ rustc --version
rustc 1.7.0-nightly (2b8e96dad 2015-12-21)
vi commented 8 years ago

After cargo update it has succeed:

$ cargo update
    Updating git repository `https://github.com/Manishearth/rust-clippy`
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating clippy v0.0.32 (https://github.com/Manishearth/rust-clippy#cd3c649a) -> #ee236dac
$ cargo build
   Compiling clippy v0.0.33 (https://github.com/Manishearth/rust-clippy#ee236dac)
   Compiling cargo-clippy v0.1.0 (file:///home/vi/home/rust/cargo-clippy)