Closed
Description
After this PR merged in nightly toolchain, asm!
macro is not allowed in naked functions. This affects code in chapter 5.
~/code/Asynchronous-Programming-in-Rust/ch05/c-fibers > cargo +nightly run
Compiling c-fibers v0.1.0 (/home/yct21/code/Asynchronous-Programming-in-Rust/ch05/c-fibers)
error[E0787]: the `asm!` macro is not allowed in naked functions
--> src/main.rs:144:5
|
144 | asm!("ret", options(noreturn))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
error[E0787]: the `asm!` macro is not allowed in naked functions
--> src/main.rs:158:5
|
158 | / asm!(
159 | | "mov [rdi + 0x00], rsp",
160 | | "mov [rdi + 0x08], r15",
161 | | "mov [rdi + 0x10], r14",
... |
174 | | options(noreturn)
175 | | );
| |_____^ consider using the `naked_asm!` macro instead
Activity
fixes #31. Changes from using the macro inside naked function to sinc…
cfsamson commentedon Dec 10, 2024
Thank you for the heads up. I've updated the examples in the repository so it compiles correctly.
Merge pull request #32 from PacktPublishing/issue31