diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-17 12:43:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-17 12:43:30 +0200 |
| commit | ba3e535c078fd325a51a72fc66e44111a6e763ff (patch) | |
| tree | 7dc32e8faf1ca3dfadb24831f3c9f8a46644d3fb /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | d2120b7d422215c166d64a0290d40d4222480ba7 (diff) | |
| parent | 88b08582b2781339f30deedffcfc84949d4190a0 (diff) | |
| download | rust-ba3e535c078fd325a51a72fc66e44111a6e763ff.tar.gz rust-ba3e535c078fd325a51a72fc66e44111a6e763ff.zip | |
Rollup merge of #112644 - zica87:nonZeroTypes, r=Mark-Simulacrum
Correct types in method descriptions of `NonZero*` types - `$Int`: e.g. i32, usize - `$Ty`: e.g. NonZeroI32, NonZeroUsize |method|current description|after my changes| |-|-|-| |`saturating_add`|...Return `$Int`::MAX on overflow.|...Return `$Ty`::MAX on overflow.| |`checked_abs`|...returns None if self == `$Int`::MIN.|...returns None if self == `$Ty`::MIN.| |`checked_neg`|...returning None if self == i32::MIN.|...returning None if self == `$Ty`::MIN.| |`saturating_neg`|...returning MAX if self == i32::MIN...|...returning `$Ty`::MAX if self == `$Ty`::MIN...| |`saturating_mul`|...Return `$Int`::MAX...|...Return `$Ty`::MAX...| |`saturating_pow`|...Return `$Int`::MIN or `$Int`::MAX...|...Return `$Ty`::MIN or `$Ty`::MAX...| --- For example: ```rust pub const fn saturating_neg(self) -> NonZeroI128 ``` - current - Saturating negation. Computes `-self`, returning `MAX` if `self == i32::MIN` instead of overflowing. - after my changes - Saturating negation. Computes `-self`, returning `NonZeroI128::MAX` if `self == NonZeroI128::MIN` instead of overflowing.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
