Skip to content

Commit

Permalink
Auto merge of #49630 - npmccallum:shl, r=alexcrichton
Browse files Browse the repository at this point in the history
Update Rhs on ShlAssign to default to Self

This matches the behavior on ShrAssign and all other *Assign operations.
  • Loading branch information
bors committed Apr 19, 2018
2 parents 5dc896e + 587098a commit 883bf4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcore/ops/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented(message="no implementation for `{Self} << {RHS}`",
label="no implementation for `{Self} << {RHS}`")]
pub trait Shl<RHS> {
pub trait Shl<RHS=Self> {
/// The resulting type after applying the `<<` operator.
#[stable(feature = "rust1", since = "1.0.0")]
type Output;
Expand Down Expand Up @@ -482,7 +482,7 @@ shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 }
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented(message="no implementation for `{Self} >> {RHS}`",
label="no implementation for `{Self} >> {RHS}`")]
pub trait Shr<RHS> {
pub trait Shr<RHS=Self> {
/// The resulting type after applying the `>>` operator.
#[stable(feature = "rust1", since = "1.0.0")]
type Output;
Expand Down Expand Up @@ -738,7 +738,7 @@ bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_on_unimplemented(message="no implementation for `{Self} <<= {Rhs}`",
label="no implementation for `{Self} <<= {Rhs}`")]
pub trait ShlAssign<Rhs> {
pub trait ShlAssign<Rhs=Self> {
/// Performs the `<<=` operation.
#[stable(feature = "op_assign_traits", since = "1.8.0")]
fn shl_assign(&mut self, rhs: Rhs);
Expand Down

0 comments on commit 883bf4b

Please sign in to comment.