diff options
| author | bors <bors@rust-lang.org> | 2014-02-23 15:37:05 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-23 15:37:05 -0800 |
| commit | 329fcd48e508ebe41e6d2425c0f54b2210af401d (patch) | |
| tree | b5297ad96ec683968e1b5dee486710be4a7c8ab3 /src/libsyntax/parse/token.rs | |
| parent | cbed3321f5bbe4375819dd82193bd4299fabafb9 (diff) | |
| parent | 386db05df8aa8349857ad6f5486db0bdcc79f3cd (diff) | |
| download | rust-329fcd48e508ebe41e6d2425c0f54b2210af401d.tar.gz rust-329fcd48e508ebe41e6d2425c0f54b2210af401d.zip | |
auto merge of #12338 : edwardw/rust/hygienic-break-continue, r=cmr
Makes labelled loops hygiene by performing renaming of the labels defined in e.g. `'x: loop { ... }` and then used in break and continue statements within loop body so that they act hygienically when used with macros.
Closes #12262.
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index a2f3b65f06e..528eb7d54f3 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -704,8 +704,8 @@ pub fn is_reserved_keyword(tok: &Token) -> bool { pub fn mtwt_token_eq(t1 : &Token, t2 : &Token) -> bool { match (t1,t2) { - (&IDENT(id1,_),&IDENT(id2,_)) => - ast_util::mtwt_resolve(id1) == ast_util::mtwt_resolve(id2), + (&IDENT(id1,_),&IDENT(id2,_)) | (&LIFETIME(id1),&LIFETIME(id2)) => + ast_util::mtwt_resolve(id1) == ast_util::mtwt_resolve(id2), _ => *t1 == *t2 } } |
