Skip to content

Commit

Permalink
Fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm authored and clarfonthey committed Apr 3, 2018
1 parent eda3ee5 commit a366076
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libcore/num/wrapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ macro_rules! wrapping_int_impl_unsigned {
/// Basic usage:
///
/// ```
/// #![feature(wrapping_int_impl)]
///
/// use std::num::wrapping;
///
/// assert!(Wrapping(16).is_power_of_two());
/// assert!(!Wrapping(10).is_power_of_two());
/// assert!(!Wrapping(0).is_power_of_two());
Expand All @@ -703,6 +707,8 @@ macro_rules! wrapping_int_impl_unsigned {
/// ```
/// #![feature(wrapping_int_impl)]
///
/// use std::num::wrapping;
///
/// assert_eq!(Wrapping(2).next_power_of_two(), Wrapping(2));
/// assert_eq!(Wrapping(3).next_power_of_two(), Wrapping(4));
/// assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));
Expand Down

0 comments on commit a366076

Please sign in to comment.