Skip to content

Commit 7e51e7d

Browse files
committed
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.
1 parent 27a046e commit 7e51e7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/num/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ Basic usage:
12091209
```
12101210
", $Feature, "let x: ", stringify!($SelfT), " = 2; // or any other integer type
12111211
1212-
assert_eq!(x.pow(4), 16);",
1212+
assert_eq!(x.pow(5), 32);",
12131213
$EndFeature, "
12141214
```"),
12151215
#[stable(feature = "rust1", since = "1.0.0")]
@@ -2364,7 +2364,7 @@ assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));", $E
23642364
Basic usage:
23652365
23662366
```
2367-
", $Feature, "assert_eq!(2", stringify!($SelfT), ".pow(4), 16);", $EndFeature, "
2367+
", $Feature, "assert_eq!(2", stringify!($SelfT), ".pow(5), 32);", $EndFeature, "
23682368
```"),
23692369
#[stable(feature = "rust1", since = "1.0.0")]
23702370
#[inline]

0 commit comments

Comments
 (0)