diff options
Diffstat (limited to 'rust/kernel')
-rw-r--r-- | rust/kernel/str.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 17dc8d273302..b771310fa4a4 100644 --- a/rust/kernel/str.rs +++ b/rust/kernel/str.rs @@ -583,3 +583,9 @@ impl Deref for CString { unsafe { CStr::from_bytes_with_nul_unchecked(self.buf.as_slice()) } } } + +/// A convenience alias for [`core::format_args`]. +#[macro_export] +macro_rules! fmt { + ($($f:tt)*) => ( core::format_args!($($f)*) ) +} |