Macro icu_datetime::helpers::size_test
source · macro_rules! size_test { ($ty:ty, $id:ident, pinned = $pinned:literal, beta = $beta:literal, nightly = $nightly:literal) => { ... }; ($ty:ty, $id:ident, $size:literal) => { ... }; }
Expand description
Generates a test that checks the stack size of an item and a macro
that should be used with #[doc]
to document it.
ⓘ
size_test!(MyType, my_type_size, 32);
// Add this annotation to the type's docs:
#[doc = my_type_size!()]
The size should correspond to the Rust version in rust-toolchain.toml.
If the size on latest beta differs from rust-toolchain.toml, use the named arguments version of this macro to specify both sizes:
ⓘ
size_test!(MyType, my_type_size, pinned = 32, beta = 24, nightly = 24);
The test is ignored by default but runs in CI. To run the test locally,
run cargo test -- --include-ignored