Skip to content

Cargo install clippy fails on Windows MSVC #1342

Closed
@ark-

Description

@ark-

I also get the same error when using it as a dependency [dependencies] ... clippy = "*"

Running on

> rustup show
Default host: x86_64-pc-windows-msvc

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)
1.5.0-x86_64-pc-windows-msvc

installed targets for active toolchain
--------------------------------------

i686-apple-darwin
x86_64-pc-windows-msvc

active toolchain
----------------

nightly-x86_64-pc-windows-msvc (default)
rustc 1.15.0-nightly (0ed951993 2016-11-14)

> rustc --version
rustc 1.15.0-nightly (0ed951993 2016-11-14)

> cargo --version
cargo 0.15.0-nightly (9f1beaf 2016-11-14)

Command cargo install clippy

    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling regex-syntax v0.3.9
   Compiling matches v0.1.4
   Compiling nom v1.2.4
   Compiling rustc-serialize v0.3.21
   Compiling unicode-normalization v0.1.2
   Compiling quine-mc_cluskey v0.2.4
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\regex-syntax-0.3.9\src\lib.rs --crate-name regex_syntax --crate-type lib -C opt-level=3 -C metadata=6602c4e3d91326a4 -C extra-filename=-6602c4e3d91326a4 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --cap-lints allow`
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\matches-0.1.4\lib.rs --crate-name matches --crate-type lib -C opt-level=3 -C metadata=3614821dd5ceb75c -C extra-filename=-3614821dd5ceb75c --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --cap-lints allow`
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\nom-1.2.4\src\lib.rs --crate-name nom --crate-type lib -C opt-level=3 --cfg "feature=\"default\"" --cfg "feature=\"stream\"" -C metadata=24d7a34b1cbfee73 -C extra-filename=-24d7a34b1cbfee73 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --cap-lints allow`
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\rustc-serialize-0.3.21\src\lib.rs --crate-name rustc_serialize --crate-type lib -C opt-level=3 -C metadata=b495e2b03d862e12 -C extra-filename=-b495e2b03d862e12 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --cap-lints allow`
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\unicode-normalization-0.1.2\src\lib.rs --crate-name unicode_normalization --crate-type lib -C opt-level=3 -C metadata=5de3a9c8fd8ddf4e -C extra-filename=-5de3a9c8fd8ddf4e --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --cap-lints allow`
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\quine-mc_cluskey-0.2.4\src\lib.rs --crate-name quine_mc_cluskey --crate-type lib -C opt-level=3 -C metadata=84dd239bf0c39084 -C extra-filename=-84dd239bf0c39084 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --cap-lints allow`
   Compiling semver v0.2.3
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\semver-0.2.3\src\lib.rs --crate-name semver --crate-type lib -C opt-level=3 --cfg "feature=\"default\"" -C metadata=60d1aa0e68346373 -C extra-filename=-60d1aa0e68346373 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --extern nom=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libnom-24d7a34b1cbfee73.rlib --cap-lints allow`
   Compiling toml v0.1.30
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\toml-0.1.30\src\lib.rs --crate-name toml --crate-type lib -C opt-level=3 --cfg "feature=\"default\"" --cfg "feature=\"rustc-serialize\"" -C metadata=1a75b37a708f335b -C extra-filename=-1a75b37a708f335b --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --extern rustc_serialize=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\librustc_serialize-b495e2b03d862e12.rlib --cap-lints allow`
   Compiling clippy_lints v0.0.98
     Running `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\lib.rs --crate-name clippy_lints --crate-type lib -C opt-level=3 -C metadata=b5bd105727548720 -C extra-filename=-b5bd105727548720 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --extern semver=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libsemver-60d1aa0e68346373.rlib --extern unicode_normalization=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libunicode_normalization-5de3a9c8fd8ddf4e.rlib --extern matches=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libmatches-3614821dd5ceb75c.rlib --extern regex_syntax=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libregex_syntax-6602c4e3d91326a4.rlib --extern quine_mc_cluskey=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libquine_mc_cluskey-84dd239bf0c39084.rlib --extern toml=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libtoml-1a75b37a708f335b.rlib --extern rustc_serialize=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\librustc_serialize-b495e2b03d862e12.rlib --cap-lints allow`
error[E0432]: unresolved import `rustc::ty::adjustment::AutoAdjustment`
 --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\escape.rs:8:5
  |
8 | use rustc::ty::adjustment::AutoAdjustment;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AutoAdjustment` in `ty::adjustment`. Did you mean to use `Adjustment`?

error[E0432]: unresolved import `rustc::ty::ImplOrTraitItem`
 --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\len_zero.rs:3:23
  |
3 | use rustc::ty::{self, ImplOrTraitItem};
  |                       ^^^^^^^^^^^^^^^ no `ImplOrTraitItem` in `ty`

error[E0432]: unresolved import `rustc::ty::adjustment::AutoAdjustment::AdjustDerefRef`
 --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\needless_borrow.rs:9:5
  |
9 | use rustc::ty::adjustment::AutoAdjustment::AdjustDerefRef;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `AutoAdjustment` in `ty::adjustment`

error[E0531]: unresolved tuple struct/variant `ty::MethodTraitItem`
   --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\len_zero.rs:188:16
    |
188 |         if let ty::MethodTraitItem(ref method) = *item {
    |                ^^^^^^^^^^^^^^^^^^^

error[E0053]: method `check_fn` has an incompatible type for trait
  --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\escape.rs:65:5
   |
65 |     fn check_fn(&mut self, cx: &LateContext, _: visit::FnKind, decl: &FnDecl, body: &Block, _: Span, id: NodeId) {
   |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
   |
   = note: expected type `fn(&mut escape::Pass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
   = note:    found type `fn(&mut escape::Pass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error[E0053]: method `check_fn` has an incompatible type for trait
  --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\functions.rs:72:5
   |
72 |     fn check_fn(&mut self, cx: &LateContext, kind: intravisit::FnKind, decl: &hir::FnDecl, block: &hir::Block, span: Span, nodeid: ast::NodeId) {
   |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
   |
   = note: expected type `fn(&mut functions::Functions, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
   = note:    found type `fn(&mut functions::Functions, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error[E0053]: method `check_fn` has an incompatible type for trait
   --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\misc.rs:171:5
    |
171 |     fn check_fn(&mut self, cx: &LateContext, k: FnKind, decl: &FnDecl, _: &Block, _: Span, _: NodeId) {
    |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
    |
    = note: expected type `fn(&mut misc::Pass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
    = note:    found type `fn(&mut misc::Pass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error[E0050]: method `check_fn` has 7 parameters but the declaration in trait `rustc::lint::EarlyLintPass::check_fn` has 6
   --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\misc_early.rs:242:93
    |
242 |     fn check_fn(&mut self, cx: &EarlyContext, _: FnKind, decl: &FnDecl, _: &Block, _: Span, _: NodeId) {
    |                                                                                             ^ expected 6 parameters, found 7

error[E0053]: method `check_fn` has an incompatible type for trait
   --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\new_without_default.rs:93:5
    |
93  |     fn check_fn(&mut self, cx: &LateContext, kind: FnKind, decl: &hir::FnDecl, _: &hir::Block, span: Span, id: ast::NodeId) {
    |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
    |
    = note: expected type `fn(&mut new_without_default::NewWithoutDefault, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
    = note:    found type `fn(&mut new_without_default::NewWithoutDefault, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error[E0050]: method `check_fn` has 7 parameters but the declaration in trait `rustc::lint::EarlyLintPass::check_fn` has 6
   --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\returns.rs:132:94
    |
132 |     fn check_fn(&mut self, cx: &EarlyContext, _: FnKind, _: &FnDecl, block: &Block, _: Span, _: NodeId) {
    |                                                                                              ^ expected 6 parameters, found 7

error[E0053]: method `check_fn` has an incompatible type for trait
  --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\shadow.rs:84:5
   |
84 |     fn check_fn(&mut self, cx: &LateContext, _: FnKind, decl: &FnDecl, block: &Block, _: Span, _: NodeId) {
   |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
   |
   = note: expected type `fn(&mut shadow::Pass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
   = note:    found type `fn(&mut shadow::Pass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error[E0053]: method `check_fn` has an incompatible type for trait
   --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\types.rs:538:5
    |
538 |     fn check_fn(&mut self, cx: &LateContext, _: FnKind, decl: &FnDecl, _: &Block, _: Span, _: NodeId) {
    |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
    |
    = note: expected type `fn(&mut types::TypeComplexityPass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
    = note:    found type `fn(&mut types::TypeComplexityPass, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error[E0053]: method `check_fn` has an incompatible type for trait
  --> C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\unused_label.rs:50:5
   |
50 |     fn check_fn(&mut self, cx: &LateContext, kind: FnKind, decl: &hir::FnDecl, body: &hir::Block, span: Span, fn_id: ast::NodeId) {
   |     ^ expected struct `rustc::hir::Expr`, found struct `rustc::hir::Block`
   |
   = note: expected type `fn(&mut unused_label::UnusedLabel, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Expr, syntax::codemap::Span, syntax::ast::NodeId)`
   = note:    found type `fn(&mut unused_label::UnusedLabel, &rustc::lint::LateContext<'_, '_>, rustc::hir::intravisit::FnKind<'_>, &rustc::hir::FnDecl, &rustc::hir::Block, syntax::codemap::Span, syntax::ast::NodeId)`

error: aborting due to 9 previous errors

error: failed to compile `clippy v0.0.98`, intermediate artifacts can be found at `C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL`

Caused by:
  Could not compile `clippy_lints`.

Caused by:
  process didn't exit successfully: `rustc C:\Users\Mark\.cargo\registry\src\github.com-1ecc6299db9ec823\clippy_lints-0.0.98\src\lib.rs --crate-name clippy_lints --crate-type lib -C opt-level=3 -C metadata=b5bd105727548720 -C extra-filename=-b5bd105727548720 --out-dir C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --emit=dep-info,link -L dependency=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps --extern semver=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libsemver-60d1aa0e68346373.rlib --extern unicode_normalization=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libunicode_normalization-5de3a9c8fd8ddf4e.rlib --extern matches=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libmatches-3614821dd5ceb75c.rlib --extern regex_syntax=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libregex_syntax-6602c4e3d91326a4.rlib --extern quine_mc_cluskey=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libquine_mc_cluskey-84dd239bf0c39084.rlib --extern toml=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\libtoml-1a75b37a708f335b.rlib --extern rustc_serialize=C:\Users\Mark\AppData\Local\Temp\cargo-install.uSwkkIWJKCWL\release\deps\librustc_serialize-b495e2b03d862e12.rlib --cap-lints allow` (exit code: 101)

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