From 90d5515d47beca50355d831cb8f03f37ee495889 Mon Sep 17 00:00:00 2001 From: Moulins Date: Mon, 10 Apr 2023 18:21:08 +0200 Subject: [PATCH] wstr: fix `wstr_impl_traits` macro not working without `use ruffle_wstr::*` --- wstr/src/common.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wstr/src/common.rs b/wstr/src/common.rs index faf983a3e..659d73ddc 100644 --- a/wstr/src/common.rs +++ b/wstr/src/common.rs @@ -590,10 +590,10 @@ macro_rules! __wstr_impl_internal { } } - __wstr_impl_internal! { @eq_ord_units [$($generics)* const N: usize] for $ty, [u8; N] } - __wstr_impl_internal! { @eq_ord_units [$($generics)* const N: usize] for $ty, [u16; N] } - __wstr_impl_internal! { @eq_ord_units [$($generics)*] for $ty, [u8] } - __wstr_impl_internal! { @eq_ord_units [$($generics)*] for $ty, [u16] } + $crate::__wstr_impl_internal! { @eq_ord_units [$($generics)* const N: usize] for $ty, [u8; N] } + $crate::__wstr_impl_internal! { @eq_ord_units [$($generics)* const N: usize] for $ty, [u16; N] } + $crate::__wstr_impl_internal! { @eq_ord_units [$($generics)*] for $ty, [u8] } + $crate::__wstr_impl_internal! { @eq_ord_units [$($generics)*] for $ty, [u16] } }; (@base [$($generics:tt)*] for $ty:ty) => { @@ -667,12 +667,12 @@ macro_rules! __wstr_impl_internal { }; (@full [$($generics:tt)*] for $ty:ty) => { - __wstr_impl_internal!(@base [$($generics)*] for $ty); - __wstr_impl_internal!(@eq_ord_self [$($generics)*] for $ty); - __wstr_impl_internal!(@eq_ord [$($generics)*] for $ty, $crate::WStr); - __wstr_impl_internal!(@eq_ord [$($generics)*] for $crate::WStr, $ty); - __wstr_impl_internal!(@eq_ord [$($generics)* 'a,] for $ty, &'a $crate::WStr); - __wstr_impl_internal!(@eq_ord [$($generics)* 'a,] for &'a $crate::WStr, $ty); + $crate::__wstr_impl_internal!(@base [$($generics)*] for $ty); + $crate::__wstr_impl_internal!(@eq_ord_self [$($generics)*] for $ty); + $crate::__wstr_impl_internal!(@eq_ord [$($generics)*] for $ty, $crate::WStr); + $crate::__wstr_impl_internal!(@eq_ord [$($generics)*] for $crate::WStr, $ty); + $crate::__wstr_impl_internal!(@eq_ord [$($generics)* 'a,] for $ty, &'a $crate::WStr); + $crate::__wstr_impl_internal!(@eq_ord [$($generics)* 'a,] for &'a $crate::WStr, $ty); }; } @@ -691,10 +691,10 @@ macro_rules! __wstr_impl_internal { #[macro_export] macro_rules! wstr_impl_traits { (impl for $ty_name:ty) => { - __wstr_impl_internal!(@full [] for $ty_name); + $crate::__wstr_impl_internal!(@full [] for $ty_name); }; (impl [$($generics:tt)+] for $ty_name:ty) => { - __wstr_impl_internal!(@full [$($generics)*,] for $ty_name); + $crate::__wstr_impl_internal!(@full [$($generics)*,] for $ty_name); }; }