Macro zerocopy::macros::safety_comment

source ·
macro_rules! safety_comment {
    (#[doc = r" SAFETY:"] $($(#[$attr:meta])* $macro:ident!$args:tt;)*) => { ... };
}
Expand description

Documents multiple unsafe blocks with a single safety comment.

Invoked as:

safety_comment! {
    // Non-doc comments come first.
    /// SAFETY:
    /// Safety comment starts on its own line.
    macro_1!(args);
    macro_2! { args };
    /// SAFETY:
    /// Subsequent safety comments are allowed but not required.
    macro_3! { args };
}

The macro invocations are emitted, each decorated with the following attribute: #[allow(clippy::undocumented_unsafe_blocks)].