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 {
741
741
/// where `mask` removes any high-order bits of `rhs` that
742
742
/// would cause the shift to exceed the bitwidth of the type.
743
743
///
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
+ ///
744
751
/// # Examples
745
752
///
746
753
/// Basic usage:
@@ -759,6 +766,13 @@ macro_rules! int_impl {
759
766
/// where `mask` removes any high-order bits of `rhs` that
760
767
/// would cause the shift to exceed the bitwidth of the type.
761
768
///
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
+ ///
762
776
/// # Examples
763
777
///
764
778
/// Basic usage:
You can’t perform that action at this time.
0 commit comments