Change ItemModifier and ItemDecorator to traits

For convenience, the traits are implemented for the respective bare
functions. Change code from this:

```rust
ItemDecorator(some_function)
// or
ItemModifier(some_other_function)
```
to
```rust
ItemDecorator(box some_function)
// or
ItemModifier(box some_other_function)
```

[breaking-change]
This commit is contained in:
Steven Fackler 2014-09-09 23:57:14 -07:00
parent 6ceb9b4157
commit 313cb8acae
3 changed files with 46 additions and 13 deletions

View file

@ -36,7 +36,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_macro("identity", expand_identity);
reg.register_syntax_extension(
token::intern("into_foo"),
ItemModifier(expand_into_foo));
ItemModifier(box expand_into_foo));
}
fn expand_make_a_1(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])