rust-lang/rustfix

Failed to install rustfix

Closed this issue · 3 comments

I tried to update the rustfix using cargo and it's failing.

Error:

error: no method named `parameter_environment` found for type `rustc::ty::TyCtxt<'a, 'tcx, 'tcx>` in the current scope
   --> /Users/ytr289/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.134/src/utils/mod.rs:790:32
    |
790 |     let parameter_env = cx.tcx.parameter_environment(parameter_item);
    |                                ^^^^^^^^^^^^^^^^^^^^^

error: no method named `parameter_environment` found for type `rustc::ty::TyCtxt<'a, 'tcx, 'tcx>` in the current scope
   --> /Users/ytr289/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.134/src/utils/mod.rs:810:22
    |
810 |     let env = cx.tcx.parameter_environment(env);
    |                      ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /Users/ytr289/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.134/src/utils/mod.rs:811:69
    |
811 |     !ty.subst(cx.tcx, substs).moves_by_default(cx.tcx.global_tcx(), &env, DUMMY_SP)
    |                                                                     ^^^^ expected struct `rustc::ty::ParamEnv`, found reference
    |
    = note: expected type `rustc::ty::ParamEnv<'_>`
               found type `&_`

error: no method named `parameter_environment` found for type `rustc::ty::TyCtxt<'a, 'tcx, 'tcx>` in the current scope
  --> /Users/ytr289/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.134/src/needless_pass_by_value.rs:85:40
   |
85 |             let parameter_env = cx.tcx.parameter_environment(fn_def_id);
   |                                        ^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

error: Could not compile `clippy_lints`.
Build failed, waiting for other jobs to finish...
error: failed to compile `clippy v0.0.134`, intermediate artifacts can be found at `/var/folders/zl/4vh8ccr57954fgw4c9xzpfrsyclf11/T/cargo-install.erha8y19M1vy`

Rust toolchain version:

 rustup show
Default host: x86_64-apple-darwin

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

nightly-x86_64-apple-darwin (default)
rustc 1.19.0-nightly (5b13bff52 2017-05-23)

The problem is that clippy is stuck until cargo publishes a new version with some bugfix we need.