From 7e51e7ddd62211834de76dfa2fe3e5d8927e9b12 Mon Sep 17 00:00:00 2001 From: Hidehito Yabuuchi Date: Wed, 21 Feb 2018 22:30:40 +0900 Subject: [PATCH] Take 2^5 as examples in document of pow() (fixes #48396) Current document takes 2^4, which is equal to 4^2. This example is not very helpful for those unfamiliar with math words in English and thus rely on example codes. --- src/libcore/num/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 560dcf295b278..43330b63f9b9c 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -1209,7 +1209,7 @@ Basic usage: ``` ", $Feature, "let x: ", stringify!($SelfT), " = 2; // or any other integer type -assert_eq!(x.pow(4), 16);", +assert_eq!(x.pow(5), 32);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] @@ -2364,7 +2364,7 @@ assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));", $E Basic usage: ``` -", $Feature, "assert_eq!(2", stringify!($SelfT), ".pow(4), 16);", $EndFeature, " +", $Feature, "assert_eq!(2", stringify!($SelfT), ".pow(5), 32);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] #[inline]