Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0599] when running cargo install cargo-dylint #365

Closed
dutterbutter opened this issue Jun 30, 2022 · 3 comments
Closed

error[E0599] when running cargo install cargo-dylint #365

dutterbutter opened this issue Jun 30, 2022 · 3 comments

Comments

@dutterbutter
Copy link

Overview

When running cargo install cargo-dylint I run into the following issues:

error[E0599]: no method named `iter` found for opaque type `impl Iterator<Item = &OsString>` in the current scope
  --> /Users/dut/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.61.0/src/cargo/core/compiler/build_plan.rs:81:35
   |
81 |         for arg in cmd.get_args().iter() {
   |                                   ^^^^ method not found in `impl Iterator<Item = &OsString>`

error[E0599]: no method named `iter` found for opaque type `impl Iterator<Item = &OsString>` in the current scope
   --> /Users/dut/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.61.0/src/cargo/core/compiler/mod.rs:751:24
    |
751 |     rustdoc.get_args().iter().any(|flag| {
    |                        ^^^^ method not found in `impl Iterator<Item = &OsString>`

error[E0599]: no method named `hash` found for opaque type `impl Iterator<Item = &OsString>` in the current scope
   --> /Users/dut/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.61.0/src/cargo/util/rustc.rs:354:20
    |
354 |     cmd.get_args().hash(&mut hasher);
    |                    ^^^^ method not found in `impl Iterator<Item = &OsString>`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `cargo` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-dylint v2.0.7`, intermediate artifacts can be found at `/var/folders/8f/d4zygk791wdbfwyr8dqg31tr0000gn/T/cargo-installH6Edjz`

Caused by:
  build failed

Operating System: macOS Monterey also fails on Ubuntu 20.04
Rust versions tried:

nightly-2022-06-22-aarch64-apple-darwin
nightly-2022-06-22-x86_64-unknown-linux-gnu
@smoelius
Copy link
Collaborator

Thank you very much for the report. The issue appears to be this: rust-lang/cargo#10803

As a workaround, you could try:

cargo install cargo-dylint --locked

@smoelius
Copy link
Collaborator

smoelius commented Jul 1, 2022

I think this has been fixed. Could you confirm that it works for you now? And, if so, do you think we can close this issue?

@dutterbutter
Copy link
Author

Yes this works! Thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants