From 82c4e470e711da032ccb192a69428d8fa59e90ec Mon Sep 17 00:00:00 2001 From: pacak Date: Sat, 20 Jan 2024 09:26:40 -0500 Subject: [PATCH] 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 --- .../development/tools/rust/cargo-show-asm/test-basic-x86_64.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust/cargo-show-asm/test-basic-x86_64.nix b/pkgs/development/tools/rust/cargo-show-asm/test-basic-x86_64.nix index c0dd8b421b0a5..ca1738f02185e 100644 --- a/pkgs/development/tools/rust/cargo-show-asm/test-basic-x86_64.nix +++ b/pkgs/development/tools/rust/cargo-show-asm/test-basic-x86_64.nix @@ -9,7 +9,7 @@ name = "add" version = "0.0.0" EOF cat >src/lib.rs < 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, "* ]]