Skip to content

Commit b63cd15

Browse files
committed
require cstr to be a literal
1 parent a6e60e5 commit b63cd15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raw/cstr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub const fn assert_valid_cstr<T: ValidCStr>() {}
105105

106106
#[macro_export]
107107
macro_rules! cstr {
108-
($text:expr) => {{
108+
($text:literal) => {{
109109
const VALIDATED: Option<&$crate::raw::CStr> = $crate::raw::validate_cstr($text);
110110
const VALID: bool = VALIDATED.is_some();
111111
$crate::raw::assert_valid_cstr::<$crate::raw::IsValidCStr<VALID>>();

0 commit comments

Comments
 (0)