]> git.lizzy.rs Git - rust.git/commitdiff
doc: add links to rotate_(left|right)
authorLzu Tao <taolzu@gmail.com>
Fri, 15 May 2020 04:49:23 +0000 (04:49 +0000)
committerLzu Tao <taolzu@gmail.com>
Fri, 15 May 2020 04:49:23 +0000 (04:49 +0000)
src/libcore/num/mod.rs

index a259e293b0c1a8cd9b675a40be997a7aeb383a98..9039e71b82864892f707322d8e31762fb5968c92 100644 (file)
@@ -1448,8 +1448,8 @@ pub const fn wrapping_neg(self) -> Self {
 
 Note that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to
 the range of the type, rather than the bits shifted out of the LHS being returned to the other end.
-The primitive integer types all implement a `rotate_left` function, which may be what you want
-instead.
+The primitive integer types all implement a `[`rotate_left`](#method.rotate_left) function,
+which may be what you want instead.
 
 # Examples
 
@@ -1480,8 +1480,8 @@ pub const fn wrapping_shl(self, rhs: u32) -> Self {
 
 Note that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted
 to the range of the type, rather than the bits shifted out of the LHS being returned to the other
-end. The primitive integer types all implement a `rotate_right` function, which may be what you want
-instead.
+end. The primitive integer types all implement a [`rotate_right`](#method.rotate_right) function,
+which may be what you want instead.
 
 # Examples
 
@@ -3508,8 +3508,8 @@ pub const fn wrapping_neg(self) -> Self {
 RHS of a wrapping shift-left is restricted to the range
 of the type, rather than the bits shifted out of the LHS
 being returned to the other end. The primitive integer
-types all implement a `rotate_left` function, which may
-be what you want instead.
+types all implement a [`rotate_left`](#method.rotate_left) function,
+which may be what you want instead.
 
 # Examples
 
@@ -3542,8 +3542,8 @@ pub const fn wrapping_shl(self, rhs: u32) -> Self {
 RHS of a wrapping shift-right is restricted to the range
 of the type, rather than the bits shifted out of the LHS
 being returned to the other end. The primitive integer
-types all implement a `rotate_right` function, which may
-be what you want instead.
+types all implement a [`rotate_right`](#method.rotate_right) function,
+which may be what you want instead.
 
 # Examples