aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/script/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/script/lib.rs')
-rw-r--r--tests/unit/script/lib.rs22
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/unit/script/lib.rs b/tests/unit/script/lib.rs
index 21b89a304c5..6d724db5358 100644
--- a/tests/unit/script/lib.rs
+++ b/tests/unit/script/lib.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-extern crate euclid;
-extern crate msg;
-extern crate script;
-extern crate servo_url;
-extern crate style;
+#[cfg(test)] extern crate euclid;
+#[cfg(test)] extern crate msg;
+#[cfg(test)] extern crate script;
+#[cfg(test)] extern crate servo_url;
+#[cfg(test)] extern crate style;
#[cfg(test)] mod origin;
#[cfg(all(test, target_pointer_width = "64"))] mod size_of;
@@ -15,3 +15,15 @@ extern crate style;
#[cfg(test)] mod htmlareaelement;
#[cfg(test)] mod htmlimageelement;
+/**
+```compile_fail,E0277
+extern crate script;
+
+fn cloneable<T: Clone>() {}
+
+fn main() {
+ cloneable::<script::test::TrustedPromise>();
+}
+```
+*/
+pub fn trustedpromise_does_not_impl_clone() {}