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:
parent
6ceb9b4157
commit
313cb8acae
3 changed files with 46 additions and 13 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue