From da2f4b419d3b197e2dbe0031276fd58dd35b0ec2 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Mon, 2 Apr 2018 09:29:03 -0700 Subject: [PATCH] Fix doctests --- src/libcore/num/wrapping.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index 80dd370e4050e..eaa9129f881aa 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -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()); @@ -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));