Skip to content

Commit a4ecf19

Browse files
committed
---
yaml --- r: 123691 b: refs/heads/try c: 69c2754 h: refs/heads/master i: 123689: 9862cce 123687: a54c802 v: v3
1 parent 2e83af5 commit a4ecf19

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: da4e4e4e0a7778a85748aa4a303b13f603e96b4b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8ddd286ea4ba4384a0dc9eae393ed515460a986e
5-
refs/heads/try: af794a5aae761306ffc894ebd2bedd44f2a9703c
5+
refs/heads/try: 69c27546ee37ac2d0384748a21c7dad00642a223
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libsyntax/ext/expand.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,14 @@ mod test {
13251325
"macro_rules! m((a)=>(13)) fn main(){m!(a);}".to_string());
13261326
}
13271327

1328+
// should be able to use a bound identifier as a literal in a macro definition:
1329+
#[test] fn self_macro_parsing(){
1330+
expand_crate_str(
1331+
"macro_rules! foo ((zz) => (287u;))
1332+
fn f(zz : int) {foo!(zz);}".to_string()
1333+
);
1334+
}
1335+
13281336
// renaming tests expand a crate and then check that the bindings match
13291337
// the right varrefs. The specification of the test case includes the
13301338
// text of the crate, and also an array of arrays. Each element in the

branches/try/src/libsyntax/ext/tt/macro_parser.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,7 @@ pub fn parse(sess: &ParseSess,
354354
MatchNonterminal(_,_,_) => { bb_eis.push(ei) }
355355
MatchTok(ref t) => {
356356
let mut ei_t = ei.clone();
357-
//if (token_name_eq(t,&tok)) {
358-
if token::mtwt_token_eq(t,&tok) {
357+
if token_name_eq(t,&tok) {
359358
ei_t.idx += 1;
360359
next_eis.push(ei_t);
361360
}

0 commit comments

Comments
 (0)