Support widestring macro on non-literal strings

This enables usage in macros like

        L!(stringify!($snake_case_name))

in the upcoming AST port.
This commit is contained in:
Johannes Altmanninger 2023-03-04 01:28:32 +01:00
parent be89793669
commit 7ec27617ae

View File

@ -14,7 +14,7 @@ pub use widestring::{Utf32Str as wstr, Utf32String as WString};
/// The result is of type wstr.
/// It is NOT nul-terminated.
macro_rules! L {
($string:literal) => {
($string:expr) => {
widestring::utf32str!($string)
};
}