aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-11-02 22:43:37 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2016-11-03 01:10:35 +0100
commit391296278db4e815daaa72e62bacd88dbde9f7b1 (patch)
tree52e36b36986ec166291136d31a00b3ef135a6568 /components/script
parentb0cac458b6b64e7d85a8dcaef3b74f18950fe8a5 (diff)
downloadservo-391296278db4e815daaa72e62bacd88dbde9f7b1.tar.gz
servo-391296278db4e815daaa72e62bacd88dbde9f7b1.zip
Make #[derive(JSTraceable)] a procedural macro
Diffstat (limited to 'components/script')
-rw-r--r--components/script/Cargo.toml1
-rw-r--r--components/script/dom/validitystate.rs2
-rw-r--r--components/script/lib.rs2
3 files changed, 4 insertions, 1 deletions
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index b65b1da3eb4..610ee51278c 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -42,6 +42,7 @@ hyper_serde = "0.1.4"
image = "0.10"
ipc-channel = "0.5"
js = {git = "https://github.com/servo/rust-mozjs", features = ["promises"]}
+jstraceable_derive = {path = "../jstraceable_derive"}
libc = "0.2"
log = "0.3.5"
mime = "0.2.1"
diff --git a/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs
index 21740b16bfc..c6bb0761f3c 100644
--- a/components/script/dom/validitystate.rs
+++ b/components/script/dom/validitystate.rs
@@ -10,7 +10,7 @@ use dom::element::Element;
use dom::window::Window;
// https://html.spec.whatwg.org/multipage/#validity-states
-#[derive_JSTraceable]
+#[derive(JSTraceable)]
#[derive(HeapSizeOf)]
pub enum ValidityStatus {
ValueMissing,
diff --git a/components/script/lib.rs b/components/script/lib.rs
index 96e9cb29731..78e28f24fb0 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -54,6 +54,8 @@ extern crate image;
extern crate ipc_channel;
#[macro_use]
extern crate js;
+#[macro_use]
+extern crate jstraceable_derive;
extern crate libc;
#[macro_use]
extern crate log;