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

cargo-asm panics on unwrapping a directory #249

Open
ernieIzde8ski opened this issue Dec 5, 2023 · 1 comment
Open

cargo-asm panics on unwrapping a directory #249

ernieIzde8ski opened this issue Dec 5, 2023 · 1 comment

Comments

@ernieIzde8ski
Copy link

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

@pacak
Copy link

pacak commented Jan 11, 2024

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

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