diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-07-01 18:27:40 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-07-01 18:27:40 -0600 |
commit | bbb39082e0f640400546d2084a450a8675820a82 (patch) | |
tree | f531bb4d70d8eb6a1080d9711c29587c883bf0ce /components/script/dom/bindings/trace.rs | |
parent | fc1e427ff9bb0e9891053ec1eba292530ebbe91a (diff) | |
parent | 4cf46bff2d00f33a8866dc6880c8f6178fdf81a4 (diff) | |
download | servo-bbb39082e0f640400546d2084a450a8675820a82.tar.gz servo-bbb39082e0f640400546d2084a450a8675820a82.zip |
Auto merge of #6529 - dwins:master, r=Manishearth
Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524. I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6529)
<!-- Reviewable:end -->
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> } |