mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 21:16:50 +00:00
Rollup merge of #48397 - ordovicia:pow_doc, r=GuillaumeGomez
Take 2^5 as examples in document of pow() Fixes #48396 by taking 2^5 as examples.
This commit is contained in:
commit
24c17cb1a8
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user