about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-09-09 23:57:14 -0700
committerSteven Fackler <sfackler@gmail.com>2014-09-10 09:15:13 -0700
commit313cb8acaea05e703441bd5adb92aacce5bf6411 (patch)
tree66f774dcb2ed082983adeea86d26bd23175a1678 /src/test
parent6ceb9b4157a076977b0d782632960bb90a0d39d9 (diff)
downloadrust-313cb8acaea05e703441bd5adb92aacce5bf6411.tar.gz
rust-313cb8acaea05e703441bd5adb92aacce5bf6411.zip
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]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/auxiliary/macro_crate_test.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/auxiliary/macro_crate_test.rs b/src/test/auxiliary/macro_crate_test.rs
index 0a9cfb5884f..fbbee2e625a 100644
--- a/src/test/auxiliary/macro_crate_test.rs
+++ b/src/test/auxiliary/macro_crate_test.rs
@@ -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])