Consider a library crate with the following contents:
pub fn foo(a: u32) -> u8 {
a as u8
}
This function does not show up in cargo asm, not with --everything either. I can get the function to show up by tagging it #[no_mangle] or #[inline(never)].
I'm reporting this as an issue because the Readme says this:
rustc will only generate the code for your function if it knows what type it is, including generic parameters and if it is exported (in case of a library) and not inlined (in case of a binary, example, test, etc.). If your function takes a generic parameter - try making a monomorphic wrapper around it and make it pub and #[inline(never)].
Consider a library crate with the following contents:
This function does not show up in
cargo asm
, not with--everything
either. I can get the function to show up by tagging it#[no_mangle]
or#[inline(never)]
.I'm reporting this as an issue because the Readme says this:
This makes it sound like this shouldn't happen.