Skip to content

Commit

Permalink
Take 2^5 as examples in document of pow() (fixes #48396)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ordovicia committed Feb 21, 2018
1 parent 27a046e commit 7e51e7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/num/mod.rs
Expand Up @@ -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")]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 7e51e7d

Please sign in to comment.