Skip to content

Commit b087e3b

Browse files
committed
---
yaml --- r: 180990 b: refs/heads/master c: f58a1bf h: refs/heads/master v: v3
1 parent 02ef361 commit b087e3b

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
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: 369adaf5150877c124de99a1b9a94f7b522aade6
2+
refs/heads/master: f58a1bfa981eee4ba4d4c3c801f94772e4ab0019
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f1bb6c2f46f08c1d7b6d695f5b3cf93142cb8860
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/src/libsyntax/ext/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ pub trait ItemDecorator {
3535
sp: Span,
3636
meta_item: &ast::MetaItem,
3737
item: &ast::Item,
38-
push: Box<FnMut(P<ast::Item>)>);
38+
push: &mut FnMut(P<ast::Item>));
3939
}
4040

4141
impl<F> ItemDecorator for F
42-
where F : Fn(&mut ExtCtxt, Span, &ast::MetaItem, &ast::Item, Box<FnMut(P<ast::Item>)>)
42+
where F : Fn(&mut ExtCtxt, Span, &ast::MetaItem, &ast::Item, &mut FnMut(P<ast::Item>))
4343
{
4444
fn expand(&self,
4545
ecx: &mut ExtCtxt,
4646
sp: Span,
4747
meta_item: &ast::MetaItem,
4848
item: &ast::Item,
49-
push: Box<FnMut(P<ast::Item>)>) {
49+
push: &mut FnMut(P<ast::Item>)) {
5050
(*self)(ecx, sp, meta_item, item, push)
5151
}
5252
}

trunk/src/libsyntax/ext/deriving/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ pub fn expand_deprecated_deriving(cx: &mut ExtCtxt,
7272
span: Span,
7373
_: &MetaItem,
7474
_: &Item,
75-
_: Box<FnMut(P<Item>)>) {
75+
_: &mut FnMut(P<Item>)) {
7676
cx.span_err(span, "`deriving` has been renamed to `derive`");
7777
}
7878

7979
pub fn expand_meta_derive(cx: &mut ExtCtxt,
8080
_span: Span,
8181
mitem: &MetaItem,
8282
item: &Item,
83-
mut push: Box<FnMut(P<Item>)>) {
83+
push: &mut FnMut(P<Item>)) {
8484
match mitem.node {
8585
MetaNameValue(_, ref l) => {
8686
cx.span_err(l.span, "unexpected value in `derive`");

trunk/src/libsyntax/ext/expand.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ fn expand_mac_invoc<T, F, G>(mac: ast::Mac, span: codemap::Span,
363363
mark_thunk: G,
364364
fld: &mut MacroExpander)
365365
-> Option<T> where
366-
F: FnOnce(Box<MacResult>) -> Option<T>,
366+
F: for<'a> FnOnce(Box<MacResult+'a>) -> Option<T>,
367367
G: FnOnce(T, Mrk) -> T,
368368
{
369369
match mac.node {
@@ -1102,9 +1102,10 @@ fn expand_annotatable(a: Annotatable,
11021102
// but that double-mut-borrows fld
11031103
let mut items: SmallVector<P<ast::Item>> = SmallVector::zero();
11041104
dec.expand(fld.cx, attr.span, &*attr.node.value, &**it,
1105-
box |item| items.push(item));
1106-
decorator_items.extend(items.into_iter()
1107-
.flat_map(|item| expand_item(item, fld).into_iter()));
1105+
&mut |item| items.push(item));
1106+
decorator_items.extend(
1107+
items.into_iter()
1108+
.flat_map(|item| expand_item(item, fld).into_iter()));
11081109

11091110
fld.cx.bt_pop();
11101111
}

0 commit comments

Comments
 (0)