Skip to content

Commit

Permalink
Auto merge of #37735 - Mark-Simulacrum:remove-e-macro, r=bluss
Browse files Browse the repository at this point in the history
Remove macro work-around

`--stage 2` build succeeded.
  • Loading branch information
bors authored Nov 13, 2016
2 parents b6b98ea + 8a06740 commit ea02f87
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/libcore/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
use cmp::*;
use cmp::Ordering::*;

// FIXME(#19630) Remove this work-around
macro_rules! e {
($e:expr) => { $e }
}

// macro for implementing n-ary tuple functions and operations
macro_rules! tuple_impls {
($(
Expand All @@ -29,19 +24,19 @@ macro_rules! tuple_impls {
#[stable(feature = "rust1", since = "1.0.0")]
impl<$($T:Clone),+> Clone for ($($T,)+) {
fn clone(&self) -> ($($T,)+) {
($(e!(self.$idx.clone()),)+)
($(self.$idx.clone(),)+)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<$($T:PartialEq),+> PartialEq for ($($T,)+) {
#[inline]
fn eq(&self, other: &($($T,)+)) -> bool {
e!($(self.$idx == other.$idx)&&+)
$(self.$idx == other.$idx)&&+
}
#[inline]
fn ne(&self, other: &($($T,)+)) -> bool {
e!($(self.$idx != other.$idx)||+)
$(self.$idx != other.$idx)||+
}
}

Expand Down

0 comments on commit ea02f87

Please sign in to comment.