Skip to content

Commit

Permalink
Add methods for lshift and rshift to the wrapping trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jan 30, 2015
1 parent 648e1b1 commit 9fb9ad6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion text/0000-integer-overflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ pub trait WrappingOps {
fn wrapping_mul(self, rhs: Self) -> Self;
fn wrapping_div(self, rhs: Self) -> Self;
fn wrapping_rem(self, rhs: Self) -> Self;


fn wrapping_lshift(self, amount: u32) -> Self;
fn wrapping_rshift(self, amount: u32) -> Self;

fn wrapping_as_u8(self, rhs: Self) -> u8;
fn wrapping_as_u16(self, rhs: Self) -> u16;
fn wrapping_as_u32(self, rhs: Self) -> u32
Expand Down

0 comments on commit 9fb9ad6

Please sign in to comment.