Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed May 16, 2016
1 parent 79b343d commit 02a1eef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,8 @@ pub type ExplicitSelf = Spanned<SelfKind>;

impl Arg {
pub fn to_self(&self) -> Option<ExplicitSelf> {
if let PatKind::Ident(BindByValue(mutbl), ident, _) = self.pat.node {
if ident.node.unhygienic_name == keywords::SelfValue.name() {
if let PatKind::Ident(BindByValue(mutbl), name, _) = self.pat.node {
if name.node.unhygienize() == keywords::SelfValue.name() {
return match self.ty.node {
TyInfer => Some(respan(self.pat.span, SelfKind::Value(mutbl))),
TyRptr(lt, MutTy{ref ty, mutbl}) if ty.node == TyInfer => {
Expand All @@ -1158,8 +1158,8 @@ impl Arg {
}

pub fn is_self(&self) -> bool {
if let PatKind::Ident(_, ident, _) = self.pat.node {
ident.node.unhygienic_name == keywords::SelfValue.name()
if let PatKind::Ident(_, name, _) = self.pat.node {
name.node.unhygienize() == keywords::SelfValue.name()
} else {
false
}
Expand Down

0 comments on commit 02a1eef

Please sign in to comment.