From 7865fa15edd1d5fce0a6c01606e3cd4aed1755e8 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Fri, 17 Dec 2021 17:42:08 +0000 Subject: [PATCH] Add missing `::` to `core` reference in macro (#1384) --- crates/libs/macros/src/implement.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/libs/macros/src/implement.rs b/crates/libs/macros/src/implement.rs index b89ba6927a..5ddc4171e5 100644 --- a/crates/libs/macros/src/implement.rs +++ b/crates/libs/macros/src/implement.rs @@ -168,7 +168,7 @@ pub fn gen(attribute: proc_macro::TokenStream, original_type: proc_macro::TokenS } impl<#constraints> ::windows::core::ToImpl<#interface_ident> for #impl_ident { unsafe fn to_impl(interface: &#interface_ident) -> &mut Self { - let this: ::windows::core::RawPtr = core::mem::transmute_copy(interface); + let this: ::windows::core::RawPtr = ::core::mem::transmute_copy(interface); let this = (this as *mut ::windows::core::RawPtr).sub(2 + #interface_count) as *mut #box_ident::<#(#generics,)*>; &mut (*this).implementation } @@ -179,7 +179,7 @@ pub fn gen(attribute: proc_macro::TokenStream, original_type: proc_macro::TokenS let mut phantoms = TokenStream::new(); for _ in 0..def.generic_params().count() { - phantoms.combine("e! { core::marker::PhantomData, }) + phantoms.combine("e! { ::core::marker::PhantomData, }) } vtable_ctors.combine("e! { @@ -240,7 +240,7 @@ pub fn gen(attribute: proc_macro::TokenStream, original_type: proc_macro::TokenS } } impl <#constraints> ::windows::core::Compose for #impl_ident { - unsafe fn compose<'a>(implementation: Self) -> (::windows::core::IInspectable, &'a mut core::option::Option<::windows::core::IInspectable>) { + unsafe fn compose<'a>(implementation: Self) -> (::windows::core::IInspectable, &'a mut ::core::option::Option<::windows::core::IInspectable>) { let inspectable: ::windows::core::IInspectable = implementation.into(); let this = (&inspectable as *const _ as *mut ::windows::core::RawPtr).sub(1) as *mut #box_ident::<#(#generics,)*>; (inspectable, &mut (*this).base)