rust/tests/ui/lint/non-local-defs/auxiliary/non_local_macro.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
600 B
Rust
Raw Permalink Normal View History

#[macro_export]
macro_rules! non_local_impl {
($a:ident) => {
const _IMPL_DEBUG: () = {
impl ::std::fmt::Debug for $a {
fn fmt(&self, _: &mut ::std::fmt::Formatter<'_>)
-> ::std::result::Result<(), ::std::fmt::Error>
{
todo!()
}
}
};
}
}
#[macro_export]
macro_rules! non_local_macro_rules {
($a:ident) => {
const _MACRO_EXPORT: () = {
#[macro_export]
macro_rules! $a {
() => {}
}
};
}
}