diff options
author | David Winslow <cdwinslow@gmail.com> | 2015-07-01 16:31:07 -0400 |
---|---|---|
committer | David Winslow <cdwinslow@gmail.com> | 2015-07-01 18:27:06 -0400 |
commit | 4cf46bff2d00f33a8866dc6880c8f6178fdf81a4 (patch) | |
tree | bfa5da23abf5d88edd40c26486e34b0cf40383d9 /components/script/dom/bindings/trace.rs | |
parent | e958d92be6c35234bcffce2d4e74ece585de02e4 (diff) | |
download | servo-4cf46bff2d00f33a8866dc6880c8f6178fdf81a4.tar.gz servo-4cf46bff2d00f33a8866dc6880c8f6178fdf81a4.zip |
Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
Diffstat (limited to 'components/script/dom/bindings/trace.rs')
-rw-r--r-- | components/script/dom/bindings/trace.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index f401e278498..5c854953f8f 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -12,7 +12,7 @@ //! phase. (This happens through `JSClass.trace` for non-proxy bindings, and //! through `ProxyTraps.trace` otherwise.) //! 2. `_trace` calls `Foo::trace()` (an implementation of `JSTraceable`). -//! This is typically derived via a `#[dom_struct]` (implies `#[jstraceable]`) annotation. +//! This is typically derived via a `#[dom_struct]` (implies `#[derive(JSTraceable)]`) annotation. //! Non-JS-managed types have an empty inline `trace()` method, //! achieved via `no_jsmanaged_fields!` or similar. //! 3. For all fields, `Foo::trace()` @@ -410,7 +410,7 @@ impl RootedTraceableSet { /// If you have GC things like *mut JSObject or JSVal, use jsapi::Rooted. /// If you have an arbitrary number of Reflectables to root, use RootedVec<JS<T>> /// If you know what you're doing, use this. -#[jstraceable] +#[derive(JSTraceable)] pub struct RootedTraceable<'a, T: 'a + JSTraceable> { ptr: &'a T } @@ -434,7 +434,7 @@ impl<'a, T: JSTraceable> Drop for RootedTraceable<'a, T> { /// Must be a reflectable #[allow(unrooted_must_root)] #[no_move] -#[jstraceable] +#[derive(JSTraceable)] pub struct RootedVec<T: JSTraceable + Reflectable> { v: Vec<T> } |