-
Notifications
You must be signed in to change notification settings - Fork 162
Closed
Labels
Description
When compiling code like
bitflags! {
pub struct AdjustFlags: u32 {
/// Add buf.time to the current time. If buf.status includes the ADJ_NANO flag, then buf.time.tv_usec is interpreted as a nanosecond value;
/// otherwise it is interpreted as microseconds.
///
/// The value of buf.time is the sum of its two fields, but the field buf.time.tv_usec must always be nonnegative.
/// The following example shows how to normalize a timeval with nanosecond resolution.
///
/// ```C
/// while (buf.time.tv_usec < 0) {
/// buf.time.tv_sec -= 1;
/// buf.time.tv_usec += 1000000000;
/// }
/// ```
const SETOFFSET = libc::ADJ_SETOFFSET;
}
}
The doc-comments order is reversed on compile, causing issues with generated docs and the doctest.
This bug only occurs on bitflags 2.2.0 and not on earlier versions
Reactions are currently unavailable