cargo-show-asm: fix failing tests
newer rustc automagically marks simple functions as inline, this includes `add` used for tests. Marking it as `inline(never)` makes sure it's always included so tests can find it
This commit is contained in:
@@ -9,7 +9,7 @@ name = "add"
|
||||
version = "0.0.0"
|
||||
EOF
|
||||
cat >src/lib.rs <<EOF
|
||||
pub fn add(a: u32, b: u32) -> u32 { a + b }
|
||||
#[inline(never)] pub fn add(a: u32, b: u32) -> u32 { a + b }
|
||||
EOF
|
||||
|
||||
[[ "$(cargo asm add::add | tee /dev/stderr)" == *"lea eax, "* ]]
|
||||
|
||||
Reference in New Issue
Block a user