We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
naked_functions
1 parent 47b4f7d commit f200e17Copy full SHA for f200e17
ch05/c-fibers/src/main.rs
@@ -6,7 +6,6 @@
6
///
7
/// See: https://github.com/PacktPublishing/Asynchronous-Programming-in-Rust/issues/31
8
/// for more information.
9
-#![feature(naked_functions)]
10
use std::arch::{asm, naked_asm};
11
12
const DEFAULT_STACK_SIZE: usize = 1024 * 1024 * 2;
@@ -147,7 +146,7 @@ fn guard() {
147
146
};
148
}
149
150
-#[naked]
+#[unsafe(naked)]
151
unsafe extern "C" fn skip() {
152
naked_asm!("ret")
153
@@ -159,7 +158,7 @@ pub fn yield_thread() {
159
158
160
161
162
163
#[no_mangle]
164
#[cfg_attr(target_os = "macos", export_name = "\x01switch")] // see: How-to-MacOS-M.md for explanation
165
unsafe extern "C" fn switch() {
0 commit comments