aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lib.rs
diff options
context:
space:
mode:
authorDavid Winslow <cdwinslow@gmail.com>2015-07-01 16:31:07 -0400
committerDavid Winslow <cdwinslow@gmail.com>2015-07-01 18:27:06 -0400
commit4cf46bff2d00f33a8866dc6880c8f6178fdf81a4 (patch)
treebfa5da23abf5d88edd40c26486e34b0cf40383d9 /components/plugins/lib.rs
parente958d92be6c35234bcffce2d4e74ece585de02e4 (diff)
downloadservo-4cf46bff2d00f33a8866dc6880c8f6178fdf81a4.tar.gz
servo-4cf46bff2d00f33a8866dc6880c8f6178fdf81a4.zip
Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
Diffstat (limited to 'components/plugins/lib.rs')
-rw-r--r--components/plugins/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs
index 4a6b3e6ed4f..0a6c917fcf4 100644
--- a/components/plugins/lib.rs
+++ b/components/plugins/lib.rs
@@ -7,10 +7,10 @@
//! Attributes this crate provides:
//!
//! - `#[privatize]` : Forces all fields in a struct/enum to be private
-//! - `#[jstraceable]` : Auto-derives an implementation of `JSTraceable` for a struct in the script crate
+//! - `#[derive(JSTraceable)]` : Auto-derives an implementation of `JSTraceable` for a struct in the script crate
//! - `#[must_root]` : Prevents data of the marked type from being used on the stack.
//! See the lints module for more details
-//! - `#[dom_struct]` : Implies `#[privatize]`,`#[jstraceable]`, and `#[must_root]`.
+//! - `#[dom_struct]` : Implies `#[privatize]`,`#[derive(JSTraceable)]`, and `#[must_root]`.
//! Use this for structs that correspond to a DOM type
#![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private)]
@@ -29,7 +29,7 @@ use syntax::ext::base::*;
use syntax::parse::token::intern;
// Public for documentation to show up
-/// Handles the auto-deriving for `#[jstraceable]`
+/// Handles the auto-deriving for `#[derive(JSTraceable)]`
pub mod jstraceable;
/// Handles the auto-deriving for `#[derive(HeapSizeOf)]`
pub mod heap_size;
@@ -43,7 +43,7 @@ pub mod casing;
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_syntax_extension(intern("dom_struct"), MultiModifier(box jstraceable::expand_dom_struct));
- reg.register_syntax_extension(intern("jstraceable"), MultiDecorator(box jstraceable::expand_jstraceable));
+ reg.register_syntax_extension(intern("derive_JSTraceable"), MultiDecorator(box jstraceable::expand_jstraceable));
reg.register_syntax_extension(intern("_generate_reflector"), MultiDecorator(box reflector::expand_reflector));
reg.register_syntax_extension(intern("derive_HeapSizeOf"), MultiDecorator(box heap_size::expand_heap_size));
reg.register_macro("to_lower", casing::expand_lower);