From 2842d692e67566a78e5e71afdb287e2410514782 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 12 Jun 2022 01:36:19 +0200 Subject: [PATCH] Make object! macro public (TMP) --- objc2-foundation/src/macros.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/objc2-foundation/src/macros.rs b/objc2-foundation/src/macros.rs index a52965fe9..edc3e9f46 100644 --- a/objc2-foundation/src/macros.rs +++ b/objc2-foundation/src/macros.rs @@ -1,3 +1,5 @@ +#[doc(hidden)] +#[macro_export] macro_rules! __impl_as_ref_borrow { ($name:ident<$($t:ident $(: $b:ident)?),*>,) => {}; ($name:ident<$($t:ident $(: $b:ident)?),*>, $item:ty, $($tail:ty,)*) => { @@ -39,7 +41,7 @@ macro_rules! __impl_as_ref_borrow { } } - __impl_as_ref_borrow!($name<$($t $(: $b)?),*>, $($tail,)*); + $crate::__impl_as_ref_borrow!($name<$($t $(: $b)?),*>, $($tail,)*); }; } @@ -51,6 +53,7 @@ macro_rules! __impl_as_ref_borrow { /// and it's instances must have the raw encoding `Encoding::Object` (an /// example: `NSAutoreleasePool` does not have this). Finally the ownership /// must be correct for this class. +#[macro_export] macro_rules! object { ( $(#[$m:meta])* @@ -163,7 +166,7 @@ macro_rules! object { } } - __impl_as_ref_borrow!($name<$($t $(: $b)?),*>, $inherits, $($inheritance_rest,)*); + $crate::__impl_as_ref_borrow!($name<$($t $(: $b)?),*>, $inherits, $($inheritance_rest,)*); // Objective-C equality has approximately the same semantics as Rust // equality (although less aptly specified).