Skip to content

Commit f05c027

Browse files
committed
---
yaml --- r: 121853 b: refs/heads/master c: 47eec97 h: refs/heads/master i: 121851: 0924cce v: v3
1 parent 03f5d32 commit f05c027

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 977b380cd2bb45a6556f77b79274460377c6ae94
2+
refs/heads/master: 47eec97cdab94989cc4c5f20a1e1f2310df997aa
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: afdfe40aa0b7dfc7800dddbc1f55da979abfe486
55
refs/heads/try: 18dc3bc9e3314a250c0718ab329938e676410cdf

trunk/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)