File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -741,6 +741,13 @@ macro_rules! int_impl {
741741 /// where `mask` removes any high-order bits of `rhs` that
742742 /// would cause the shift to exceed the bitwidth of the type.
743743 ///
744+ /// Note that this is *not* the same as a rotate-left; the
745+ /// RHS of a wrapping shift-left is restricted to the range
746+ /// of the type, rather than the bits shifted out of the LHS
747+ /// being returned to the other end. The primitive integer
748+ /// types all implement a `rotate_left` function, which may
749+ /// be what you want instead.
750+ ///
744751 /// # Examples
745752 ///
746753 /// Basic usage:
@@ -759,6 +766,13 @@ macro_rules! int_impl {
759766 /// where `mask` removes any high-order bits of `rhs` that
760767 /// would cause the shift to exceed the bitwidth of the type.
761768 ///
769+ /// Note that this is *not* the same as a rotate-right; the
770+ /// RHS of a wrapping shift-right is restricted to the range
771+ /// of the type, rather than the bits shifted out of the LHS
772+ /// being returned to the other end. The primitive integer
773+ /// types all implement a `rotate_right` function, which may
774+ /// be what you want instead.
775+ ///
762776 /// # Examples
763777 ///
764778 /// Basic usage:
You can’t perform that action at this time.
0 commit comments