diff --git a/src/util/macros.rs b/src/util/macros.rs index 59fd2549d9..7dca5410c8 100644 --- a/src/util/macros.rs +++ b/src/util/macros.rs @@ -982,8 +982,37 @@ macro_rules! codegen_preamble { } } +/// Stub for rendering codegen documentation; used to break build dependency +/// between benches and zerocopy when re-blessing codegen tests. +#[allow(unused)] +#[cfg(not(doc))] +macro_rules! codegen_section { + ( + header = $level:expr, + bench = $bench:expr, + format = $format:expr, + arity = $arity:literal, + $([ + $($open:ident)? + @index $index:literal + @title $title:literal + @variant $variant:literal + ]),* + ) => { + "" + }; + ( + header = $level:expr, + bench = $bench:expr, + format = $format:expr, + ) => { + "" + }; +} + /// Generates the HTML for code generation documentation. #[allow(unused)] +#[cfg(doc)] macro_rules! codegen_section { ( header = $level:expr,