Skip to content

Commit 4aa9a41

Browse files
committed
---
yaml --- r: 123436 b: refs/heads/auto c: 69c2754 h: refs/heads/master v: v3
1 parent 5e232ba commit 4aa9a41

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: af794a5aae761306ffc894ebd2bedd44f2a9703c
16+
refs/heads/auto: 69c27546ee37ac2d0384748a21c7dad00642a223
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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)