pacak / cargo-show-asm

cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code
Apache License 2.0
712 stars 35 forks source link

Install fails with rustc 1.74.0 #252

Closed GregoryTravis closed 8 months ago

GregoryTravis commented 8 months ago

I'm running rustc 1.74.0 on MacOS 12.6.3. I'm getting the error below. Is there a rustc version requirement for this crate?

$ cargo install cargo-show-asm

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types
   --> /Users/gmt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-show-asm-0.2.30/src/asm.rs:465:45
    |
465 |     fn lines(&self, range: Range<usize>) -> impl Iterator<Item = &str> {
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return types
   --> /Users/gmt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-show-asm-0.2.30/src/lib.rs:207:45
    |
207 |     fn lines(&self, range: Range<usize>) -> impl Iterator<Item = &str>;
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types
   --> /Users/gmt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-show-asm-0.2.30/src/lib.rs:211:45
    |
211 |     fn lines(&self, range: Range<usize>) -> impl Iterator<Item = &str> {
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
pacak commented 8 months ago

Version published on crates.io uses return position impl trait in trait - this requires 1.75.0. You can install one of the earlier versions - 0.2.29 should work, install version from github or update your compiler. Are there any reasons you are not on the latest version of rustc?

GregoryTravis commented 8 months ago

Version published on crates.io uses return position impl trait in trait - this requires 1.75.0. You can install one of the earlier versions - 0.2.29 should work, install version from github or update your compiler. Are there any reasons you are not on the latest version of rustc?

I don't think I have any reason not to update rust so I'll try that.

pacak commented 8 months ago

I'm assuming that's no longer a problem.