Rollup merge of #25710 - Manishearth:no_decorator_clone, r=sfackler

fixes #25683

I have a very nonscientific measurement of the data via valgrind/massif [here](https://gist.github.com/Manishearth/4c47f15f6835cb3957c4)

I measured the memory usage for both --pretty=expanded and -Z no-trans

It *seems* like there's a 20-25MB decrease during expansion on stage2 librustc; but I'm not quite sure.

r? @eddyb

(have not yet run tests, but it compiles fine, might want to wait before giving r+)

cc @nrc @huon
This commit is contained in:
Oliver Schneider 2015-05-23 19:03:19 +02:00
commit 04fe212e1f
18 changed files with 39 additions and 39 deletions

View file

@ -37,7 +37,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
fn expand(cx: &mut ExtCtxt,
span: Span,
mitem: &ast::MetaItem,
item: Annotatable,
item: &Annotatable,
push: &mut FnMut(Annotatable)) {
let trait_def = TraitDef {
span: span,
@ -71,5 +71,5 @@ fn expand(cx: &mut ExtCtxt,
],
};
trait_def.expand(cx, mitem, &item, push)
trait_def.expand(cx, mitem, item, push)
}

View file

@ -39,7 +39,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
fn expand(cx: &mut ExtCtxt,
span: Span,
mitem: &ast::MetaItem,
item: Annotatable,
item: &Annotatable,
push: &mut FnMut(Annotatable)) {
let trait_def = TraitDef {
span: span,
@ -62,7 +62,7 @@ fn expand(cx: &mut ExtCtxt,
],
};
trait_def.expand(cx, mitem, &item, push)
trait_def.expand(cx, mitem, item, push)
}
// Mostly copied from syntax::ext::deriving::hash

View file

@ -108,7 +108,7 @@ fn expand_into_foo_multi(cx: &mut ExtCtxt,
fn expand_duplicate(cx: &mut ExtCtxt,
sp: Span,
mi: &MetaItem,
it: Annotatable,
it: &Annotatable,
push: &mut FnMut(Annotatable))
{
let copy_name = match mi.node {