cargo-asm icon indicating copy to clipboard operation
cargo-asm copied to clipboard

cargo-asm panics on unwrapping a directory

Open ernieIzde8ski opened this issue 1 year ago • 1 comments

I wrote the following program:

use std::f64::consts::{E, PI};

fn power_squared(a: f64, b: f64) -> f64 {
    a.powf(b).powf(2.0)
}

fn doubled_exp(a: f64, b: f64) -> f64 {
    a.powf(b * 2.0)
}

fn main() {
    println!("{}", power_squared(E, PI));
    println!("{}", doubled_exp(E, PI));
}

and I tried to get the assembly for the former function, which caused a panic:

[2 0] ernie@vivec% cargo asm --build-type=debug playground::doubled_exp 
thread 'main' panicked at /home/ernie/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-asm-0.1.16/src/rust.rs:123:33:
called `Result::unwrap()` on an `Err` value: Os { code: 21, kind: IsADirectory, message: "Is a directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

cargo 1.74.0 rustc 1.74.0 cargo-asm 0.1.16

ernieIzde8ski avatar Dec 05 '23 04:12 ernieIzde8ski

cargo-asm is no longer maintained, you can try cargo-show-asm instead.

pacak avatar Jan 11 '24 12:01 pacak