Skip to content

Commit 652acbe

Browse files
committed
---
yaml --- r: 175086 b: refs/heads/master c: c6c14b9 h: refs/heads/master v: v3
1 parent 7eb44a8 commit 652acbe

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 39676c8bf0ad0fe7249f788ab6ab6790360af73c
2+
refs/heads/master: c6c14b928f45302238f4dd4e32ee97e50af1bd6e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 777435990e0e91df6b72ce80c9b6fa485eeb5daa
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547

trunk/src/libcore/ops.rs

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ macro_rules! forward_ref_unop {
120120
}
121121
}
122122

123-
// implements the binary operator "&T op U"
124-
// based on "T + U" where T and U are expected `Copy`able
125-
macro_rules! forward_ref_val_binop {
123+
// implements binary operators "&T op U", "T op &U", "&T op &U"
124+
// based on "T op U" where T and U are expected to be `Copy`able
125+
macro_rules! forward_ref_binop {
126126
(impl $imp:ident, $method:ident for $t:ty, $u:ty) => {
127127
#[unstable]
128128
impl<'a> $imp<$u> for &'a $t {
@@ -133,13 +133,7 @@ macro_rules! forward_ref_val_binop {
133133
$imp::$method(*self, other)
134134
}
135135
}
136-
}
137-
}
138136

139-
// implements the binary operator "T op &U"
140-
// based on "T + U" where T and U are expected `Copy`able
141-
macro_rules! forward_val_ref_binop {
142-
(impl $imp:ident, $method:ident for $t:ty, $u:ty) => {
143137
#[unstable]
144138
impl<'a> $imp<&'a $u> for $t {
145139
type Output = <$t as $imp<$u>>::Output;
@@ -149,13 +143,7 @@ macro_rules! forward_val_ref_binop {
149143
$imp::$method(self, *other)
150144
}
151145
}
152-
}
153-
}
154146

155-
// implements the binary operator "&T op &U"
156-
// based on "T + U" where T and U are expected `Copy`able
157-
macro_rules! forward_ref_ref_binop {
158-
(impl $imp:ident, $method:ident for $t:ty, $u:ty) => {
159147
#[unstable]
160148
impl<'a, 'b> $imp<&'a $u> for &'b $t {
161149
type Output = <$t as $imp<$u>>::Output;
@@ -168,16 +156,6 @@ macro_rules! forward_ref_ref_binop {
168156
}
169157
}
170158

171-
// implements binary operators "&T op U", "T op &U", "&T op &U"
172-
// based on "T + U" where T and U are expected `Copy`able
173-
macro_rules! forward_ref_binop {
174-
(impl $imp:ident, $method:ident for $t:ty, $u:ty) => {
175-
forward_ref_val_binop! { impl $imp, $method for $t, $u }
176-
forward_val_ref_binop! { impl $imp, $method for $t, $u }
177-
forward_ref_ref_binop! { impl $imp, $method for $t, $u }
178-
}
179-
}
180-
181159
/// The `Add` trait is used to specify the functionality of `+`.
182160
///
183161
/// # Example

0 commit comments

Comments
 (0)