Skip to content

Commit a31d11b

Browse files
committed
---
yaml --- r: 152911 b: refs/heads/try2 c: 47eec97 h: refs/heads/master i: 152909: 87a8374 152907: 9119397 152903: 56634ba 152895: 38db87d v: v3
1 parent 5b7acf0 commit a31d11b

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 977b380cd2bb45a6556f77b79274460377c6ae94
8+
refs/heads/try2: 47eec97cdab94989cc4c5f20a1e1f2310df997aa
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -988,35 +988,30 @@ impl Folder for Marker {
988988
}
989989
}
990990

991-
// just a convenience:
992-
fn new_mark_folder(m: Mrk) -> Marker {
993-
Marker {mark: m}
994-
}
995-
996991
// apply a given mark to the given token trees. Used prior to expansion of a macro.
997992
fn mark_tts(tts: &[TokenTree], m: Mrk) -> Vec<TokenTree> {
998-
fold_tts(tts, &mut new_mark_folder(m))
993+
fold_tts(tts, &mut Marker{mark:m})
999994
}
1000995

1001996
// apply a given mark to the given expr. Used following the expansion of a macro.
1002997
fn mark_expr(expr: Gc<ast::Expr>, m: Mrk) -> Gc<ast::Expr> {
1003-
new_mark_folder(m).fold_expr(expr)
998+
Marker{mark:m}.fold_expr(expr)
1004999
}
10051000

10061001
// apply a given mark to the given pattern. Used following the expansion of a macro.
10071002
fn mark_pat(pat: Gc<ast::Pat>, m: Mrk) -> Gc<ast::Pat> {
1008-
new_mark_folder(m).fold_pat(pat)
1003+
Marker{mark:m}.fold_pat(pat)
10091004
}
10101005

10111006
// apply a given mark to the given stmt. Used following the expansion of a macro.
10121007
fn mark_stmt(expr: &ast::Stmt, m: Mrk) -> Gc<ast::Stmt> {
1013-
new_mark_folder(m).fold_stmt(expr)
1008+
Marker{mark:m}.fold_stmt(expr)
10141009
.expect_one("marking a stmt didn't return a stmt")
10151010
}
10161011

10171012
// apply a given mark to the given item. Used following the expansion of a macro.
10181013
fn mark_item(expr: Gc<ast::Item>, m: Mrk) -> SmallVector<Gc<ast::Item>> {
1019-
new_mark_folder(m).fold_item(expr)
1014+
Marker{mark:m}.fold_item(expr)
10201015
}
10211016

10221017
fn original_span(cx: &ExtCtxt) -> Gc<codemap::ExpnInfo> {

0 commit comments

Comments
 (0)