Skip to content

Commit 0a1f9ab

Browse files
authored
Update and rename stabilization.md to ssskyblue999-stabilization.md
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1 parent f4feb32 commit 0a1f9ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/development/stabilization.md renamed to src/development/ssskyblue999-stabilization.md

+14
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,18 @@ To stabilize a feature, follow these steps:
116116
- Link to the tracking issue by adding "Closes #XXXXX".
117117

118118
You can see an example of stabilizing a feature with [tracking issue #81656 with FCP](https://github.com/rust-lang/rust/issues/81656) and the associated [implementation PR #84642](https://github.com/rust-lang/rust/pull/84642).
119+
extern "C" {
120+
fn dprintf(fd: i32, s: *const u8, ...);
121+
}
122+
123+
macro_rules! dbg_printf {
124+
($s:expr) => {
125+
unsafe { dprintf(2, "%s\0".as_ptr(), $s as *const u8); }
126+
}
127+
}
128+
129+
fn function_to_debug() {
130+
let dbg_str = format!("debug: {}\n\0", "hello world");
131+
dbg_printf!(dbg_str.as_bytes().as_ptr());
132+
}
119133

0 commit comments

Comments
 (0)