diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-06-02 20:48:53 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-06-06 18:36:15 -0700 |
| commit | bede54b14acb093e86a936d5ba62ff2af8b558d5 (patch) | |
| tree | 1d55f928357e66573d9de0fe6be60174184491b6 /src/libsyntax/parse | |
| parent | ef32ffd0b1602ff87536508a7f75fd9b1510b4e9 (diff) | |
| download | rust-bede54b14acb093e86a936d5ba62ff2af8b558d5.tar.gz rust-bede54b14acb093e86a936d5ba62ff2af8b558d5.zip | |
misc. copies in core/syntax to please borrowck
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index cb92aad04c7..bbbd09632ef 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -184,16 +184,16 @@ fn is_lit(t: token::token) -> bool { } } -fn is_ident(t: token::token) -> bool { +pure fn is_ident(t: token::token) -> bool { alt t { token::IDENT(_, _) { ret true; } _ { } } ret false; } -fn is_plain_ident(t: token::token) -> bool { +pure fn is_plain_ident(t: token::token) -> bool { ret alt t { token::IDENT(_, false) { true } _ { false } }; } -fn is_bar(t: token::token) -> bool { +pure fn is_bar(t: token::token) -> bool { alt t { token::BINOP(token::OR) | token::OROR { true } _ { false } } } |
