Failed to install rustfix
Closed this issue · 3 comments
rohitjoshi commented
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)
oli-obk commented
The problem is that clippy is stuck until cargo publishes a new version with some bugfix we need.
killercup commented
The error you show is about compiling clippy—which we don't depend on (if I recall correctly). What command did you use to install rustfix?
Regardless, clippy is probably not compiling with the latest nightly. Maybe try a nightly from a few days ago? I think `cargo +nightly-2017-05-20 install clippy` does the job.
… Am 25.05.2017 um 00:51 schrieb Rohit Joshi ***@***.***>:
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)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
rohitjoshi commented
@killercup sorry. This was for clippy. I see https://github.com/Manishearth/rust-clippy/issues/1778