diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-11-22 16:21:11 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-11-22 16:25:17 +0100 |
commit | b1ce298d4b20065bb77f62974a4c4106e9cd91e1 (patch) | |
tree | 37b66ac10803de39e12534dbdf711601bebd7a9b /tests/unit/script | |
parent | d96f0ff6a77e309682898cc7e1905a7bd0feb3cf (diff) | |
download | servo-b1ce298d4b20065bb77f62974a4c4106e9cd91e1.tar.gz servo-b1ce298d4b20065bb77f62974a4c4106e9cd91e1.zip |
Replace compiletest suite by doc-tests with `compile_fail`
compiletest-rs use internal rustc APIs and is broken in today’s Nightly.
rustdoc however is maintained with rustc and so much less fragile.
Diffstat (limited to 'tests/unit/script')
-rw-r--r-- | tests/unit/script/Cargo.toml | 1 | ||||
-rw-r--r-- | tests/unit/script/lib.rs | 22 |
2 files changed, 17 insertions, 6 deletions
diff --git a/tests/unit/script/Cargo.toml b/tests/unit/script/Cargo.toml index 7785cced6a9..7983d119f38 100644 --- a/tests/unit/script/Cargo.toml +++ b/tests/unit/script/Cargo.toml @@ -7,7 +7,6 @@ license = "MPL-2.0" [lib] name = "script_tests" path = "lib.rs" -doctest = false [dependencies] euclid = "0.15" 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() {} |