diff options
| author | bors <bors@rust-lang.org> | 2018-04-19 03:53:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-19 03:53:32 +0000 |
| commit | 883bf4ba2ed8c63ed2c3201576bca1ec10488624 (patch) | |
| tree | 5e34f0fc747c284689f142b6da327efa7e731192 | |
| parent | 5dc896e9e737f3661c229ca96ab4297081fb5069 (diff) | |
| parent | 587098abf943b08cbed79063b5bad30b4864ffe8 (diff) | |
| download | rust-883bf4ba2ed8c63ed2c3201576bca1ec10488624.tar.gz rust-883bf4ba2ed8c63ed2c3201576bca1ec10488624.zip | |
Auto merge of #49630 - npmccallum:shl, r=alexcrichton
Update Rhs on ShlAssign to default to Self This matches the behavior on ShrAssign and all other *Assign operations.
| -rw-r--r-- | src/libcore/ops/bit.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/ops/bit.rs b/src/libcore/ops/bit.rs index ec1e65be774..81c4455cef4 100644 --- a/src/libcore/ops/bit.rs +++ b/src/libcore/ops/bit.rs @@ -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; @@ -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; @@ -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); |
