1
Fork 0

Cleanup some ugly variable names, now that we have let-hygiene.

This commit is contained in:
Paul Stansifer 2014-05-11 18:58:58 -04:00 committed by Alex Crichton
parent 0aae5574ea
commit cdd5893347

View file

@ -139,7 +139,7 @@ macro_rules! maybe_whole_expr (
INTERPOLATED(token::NtPath(ref pt)) => Some((**pt).clone()), INTERPOLATED(token::NtPath(ref pt)) => Some((**pt).clone()),
_ => None, _ => None,
}; };
let ret = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::NtExpr(e)) => { INTERPOLATED(token::NtExpr(e)) => {
Some(e) Some(e)
} }
@ -149,7 +149,7 @@ macro_rules! maybe_whole_expr (
} }
_ => None _ => None
}; };
match ret { match found {
Some(e) => { Some(e) => {
$p.bump(); $p.bump();
return e; return e;
@ -164,13 +164,13 @@ macro_rules! maybe_whole_expr (
macro_rules! maybe_whole ( macro_rules! maybe_whole (
($p:expr, $constructor:ident) => ( ($p:expr, $constructor:ident) => (
{ {
let __found__ = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::$constructor(_)) => { INTERPOLATED(token::$constructor(_)) => {
Some(($p).bump_and_get()) Some(($p).bump_and_get())
} }
_ => None _ => None
}; };
match __found__ { match found {
Some(INTERPOLATED(token::$constructor(x))) => { Some(INTERPOLATED(token::$constructor(x))) => {
return x.clone() return x.clone()
} }
@ -180,13 +180,13 @@ macro_rules! maybe_whole (
); );
(no_clone $p:expr, $constructor:ident) => ( (no_clone $p:expr, $constructor:ident) => (
{ {
let __found__ = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::$constructor(_)) => { INTERPOLATED(token::$constructor(_)) => {
Some(($p).bump_and_get()) Some(($p).bump_and_get())
} }
_ => None _ => None
}; };
match __found__ { match found {
Some(INTERPOLATED(token::$constructor(x))) => { Some(INTERPOLATED(token::$constructor(x))) => {
return x return x
} }
@ -196,13 +196,13 @@ macro_rules! maybe_whole (
); );
(deref $p:expr, $constructor:ident) => ( (deref $p:expr, $constructor:ident) => (
{ {
let __found__ = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::$constructor(_)) => { INTERPOLATED(token::$constructor(_)) => {
Some(($p).bump_and_get()) Some(($p).bump_and_get())
} }
_ => None _ => None
}; };
match __found__ { match found {
Some(INTERPOLATED(token::$constructor(x))) => { Some(INTERPOLATED(token::$constructor(x))) => {
return (*x).clone() return (*x).clone()
} }
@ -212,13 +212,13 @@ macro_rules! maybe_whole (
); );
(Some $p:expr, $constructor:ident) => ( (Some $p:expr, $constructor:ident) => (
{ {
let __found__ = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::$constructor(_)) => { INTERPOLATED(token::$constructor(_)) => {
Some(($p).bump_and_get()) Some(($p).bump_and_get())
} }
_ => None _ => None
}; };
match __found__ { match found {
Some(INTERPOLATED(token::$constructor(x))) => { Some(INTERPOLATED(token::$constructor(x))) => {
return Some(x.clone()), return Some(x.clone()),
} }
@ -228,13 +228,13 @@ macro_rules! maybe_whole (
); );
(iovi $p:expr, $constructor:ident) => ( (iovi $p:expr, $constructor:ident) => (
{ {
let __found__ = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::$constructor(_)) => { INTERPOLATED(token::$constructor(_)) => {
Some(($p).bump_and_get()) Some(($p).bump_and_get())
} }
_ => None _ => None
}; };
match __found__ { match found {
Some(INTERPOLATED(token::$constructor(x))) => { Some(INTERPOLATED(token::$constructor(x))) => {
return IoviItem(x.clone()) return IoviItem(x.clone())
} }
@ -244,13 +244,13 @@ macro_rules! maybe_whole (
); );
(pair_empty $p:expr, $constructor:ident) => ( (pair_empty $p:expr, $constructor:ident) => (
{ {
let __found__ = match ($p).token { let found = match ($p).token {
INTERPOLATED(token::$constructor(_)) => { INTERPOLATED(token::$constructor(_)) => {
Some(($p).bump_and_get()) Some(($p).bump_and_get())
} }
_ => None _ => None
}; };
match __found__ { match found {
Some(INTERPOLATED(token::$constructor(x))) => { Some(INTERPOLATED(token::$constructor(x))) => {
return (Vec::new(), x) return (Vec::new(), x)
} }