#[doc(alias = "@interface")]
#[macro_export]
macro_rules! extern_conformance {
(unsafe impl $(<$($t:ident : $($bound:ident)? $(?$sized:ident)? $(+ $b:path)*),* $(,)?>)? $ty:ident for $protocol:ty {}) => {
unsafe impl $(<$($t : $($bound)? $(?$sized)? $(+ $b)*),*>)? $ty for $protocol {
}
};
}
#[cfg(test)]
mod tests {
use crate::runtime::NSObject;
use crate::{extern_class, extern_protocol};
extern_class!(
#[unsafe(super(NSObject))]
#[name = "NSObject"]
struct OldSyntax;
);
extern_protocol!(
#[name = "NSObjectProtocol"]
#[allow(clippy::missing_safety_doc)]
unsafe trait Protocol {}
);
unsafe impl Protocol for OldSyntax {}
}