Skip to content

Commit f724241

Browse files
committed
---
yaml --- r: 173231 b: refs/heads/snap-stage3 c: 055cc2e h: refs/heads/master i: 173229: 7733f3c 173227: 6ae88e2 173223: 617673b 173215: e229ac0 v: v3
1 parent 75f186f commit f724241

File tree

2 files changed

+61
-9
lines changed

2 files changed

+61
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 896cb36ecab3eaeb7f101087e030e43771eca5ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 47424cda1e05f5bb75e04346836f003fecb7f775
4+
refs/heads/snap-stage3: 055cc2ee742e29e389c5bd1da3a9d49ff8ca3724
55
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libcore/ops.rs

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -706,20 +706,45 @@ pub trait Shl<RHS> {
706706
}
707707

708708
macro_rules! shl_impl {
709-
($($t:ty)*) => ($(
709+
($t:ty, $f:ty) => (
710710
#[stable]
711-
impl Shl<uint> for $t {
711+
impl Shl<$f> for $t {
712712
type Output = $t;
713713

714714
#[inline]
715-
fn shl(self, other: uint) -> $t {
715+
fn shl(self, other: $f) -> $t {
716716
self << other
717717
}
718718
}
719+
)
720+
}
721+
722+
// SNAP 9e4e524e0
723+
#[cfg(not(stage0))]
724+
macro_rules! shl_impl_all {
725+
($($t:ty)*) => ($(
726+
shl_impl! { $t, u8 }
727+
shl_impl! { $t, u16 }
728+
shl_impl! { $t, u32 }
729+
shl_impl! { $t, u64 }
730+
shl_impl! { $t, usize }
731+
732+
shl_impl! { $t, i8 }
733+
shl_impl! { $t, i16 }
734+
shl_impl! { $t, i32 }
735+
shl_impl! { $t, i64 }
736+
shl_impl! { $t, isize }
719737
)*)
720738
}
721739

722-
shl_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 }
740+
#[cfg(stage0)]
741+
macro_rules! shl_impl_all {
742+
($($t:ty)*) => ($(
743+
shl_impl! { $t, usize }
744+
)*)
745+
}
746+
747+
shl_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
723748

724749
/// The `Shr` trait is used to specify the functionality of `>>`.
725750
///
@@ -761,17 +786,44 @@ pub trait Shr<RHS> {
761786
}
762787

763788
macro_rules! shr_impl {
764-
($($t:ty)*) => ($(
765-
impl Shr<uint> for $t {
789+
($t:ty, $f:ty) => (
790+
impl Shr<$f> for $t {
766791
type Output = $t;
767792

768793
#[inline]
769-
fn shr(self, other: uint) -> $t { self >> other }
794+
fn shr(self, other: $f) -> $t {
795+
self >> other
796+
}
770797
}
798+
)
799+
}
800+
801+
// SNAP 9e4e524e0
802+
#[cfg(not(stage0))]
803+
macro_rules! shr_impl_all {
804+
($($t:ty)*) => ($(
805+
shr_impl! { $t, u8 }
806+
shr_impl! { $t, u16 }
807+
shr_impl! { $t, u32 }
808+
shr_impl! { $t, u64 }
809+
shr_impl! { $t, usize }
810+
811+
shr_impl! { $t, i8 }
812+
shr_impl! { $t, i16 }
813+
shr_impl! { $t, i32 }
814+
shr_impl! { $t, i64 }
815+
shr_impl! { $t, isize }
816+
)*)
817+
}
818+
819+
#[cfg(stage0)]
820+
macro_rules! shr_impl_all {
821+
($($t:ty)*) => ($(
822+
shr_impl! { $t, usize }
771823
)*)
772824
}
773825

774-
shr_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 }
826+
shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
775827

776828
/// The `Index` trait is used to specify the functionality of indexing operations
777829
/// like `arr[idx]` when used in an immutable context.

0 commit comments

Comments
 (0)