derive -> ipc
This commit is contained in:
@@ -49,7 +49,7 @@ pub fn expand_ipc_implementation(
|
||||
let item = match *annotatable {
|
||||
Annotatable::Item(ref item) => item,
|
||||
_ => {
|
||||
cx.span_err(meta_item.span, "`#[derive(Ipc)]` may only be applied to struct implementations");
|
||||
cx.span_err(meta_item.span, "`#[ipc]` may only be applied to struct implementations");
|
||||
return;
|
||||
},
|
||||
};
|
||||
@@ -832,7 +832,7 @@ fn implement_interface(
|
||||
_ => {
|
||||
cx.span_err(
|
||||
item.span,
|
||||
"`#[derive(Ipc)]` may only be applied to implementations and traits");
|
||||
"`#[ipc]` may only be applied to implementations and traits");
|
||||
return Err(Error);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ pub fn register(reg: &mut syntex::Registry) {
|
||||
reg.add_attr("feature(custom_derive)");
|
||||
reg.add_attr("feature(custom_attribute)");
|
||||
|
||||
reg.add_decorator("derive_Ipc", codegen::expand_ipc_implementation);
|
||||
reg.add_decorator("ipc", codegen::expand_ipc_implementation);
|
||||
reg.add_decorator("derive_Binary", serialization::expand_serialization_implementation);
|
||||
|
||||
reg.add_post_expansion_pass(strip_attributes);
|
||||
@@ -92,7 +92,7 @@ pub fn register(reg: &mut syntex::Registry) {
|
||||
#[cfg(not(feature = "with-syntex"))]
|
||||
pub fn register(reg: &mut rustc_plugin::Registry) {
|
||||
reg.register_syntax_extension(
|
||||
syntax::parse::token::intern("derive_Ipc"),
|
||||
syntax::parse::token::intern("ipc"),
|
||||
syntax::ext::base::MultiDecorator(
|
||||
Box::new(codegen::expand_ipc_implementation)));
|
||||
reg.register_syntax_extension(
|
||||
|
||||
Reference in New Issue
Block a user