Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,21 @@ macro_rules! offset_of {
}};
}

/// Defines constants with an accompanying doc comment pointing out their
/// instability, and links to the crate documentation for usage guidelines.
macro_rules! ct {
($($it:item)+) => {
$(
/// This constant, among others often used in C for the purposes of denoting the
/// latest value or limit in a set of constants, is likely to change upstream.
/// For correct usage, see the [crate-level documentation][docs].
///
/// [docs]: index.html#usage-recommendations
$it
)+
};
}

#[cfg(test)]
mod tests {
use core::any::TypeId;
Expand Down