Skip to content

Commit 81cab93

Browse files
committed
docs: Use 0b1 instead of NonZero::MIN in NonZero::bit_width doctests
1 parent 57cb10a commit 81cab93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎library/core/src/num/nonzero.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
19501950
/// #
19511951
/// # fn main() { test().unwrap(); }
19521952
/// # fn test() -> Option<()> {
1953-
#[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::MIN.bit_width(), NonZero::new(1)?);")]
1953+
#[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0b1)?.bit_width(), NonZero::new(1)?);")]
19541954
#[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0b111)?.bit_width(), NonZero::new(3)?);")]
19551955
#[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0b1110)?.bit_width(), NonZero::new(4)?);")]
19561956
/// # Some(())

0 commit comments

Comments
 (0)