diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-10-14 18:57:28 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-10-16 20:20:18 +0200 |
commit | bffec1c1a1ff55f47e88a2df60bd574b57205aec (patch) | |
tree | 44d0f7c19b7bd2177ba478ad8f805e677f117887 | |
parent | 5a5b7d7f398f4da08fa53e175b7537b6e65d49c5 (diff) | |
download | servo-bffec1c1a1ff55f47e88a2df60bd574b57205aec.tar.gz servo-bffec1c1a1ff55f47e88a2df60bd574b57205aec.zip |
Make usage of unstable feature on_unimplemented optional.
-rw-r--r-- | components/script/Cargo.toml | 1 | ||||
-rw-r--r-- | components/script/dom/bindings/conversions.rs | 3 | ||||
-rw-r--r-- | components/script/lib.rs | 2 | ||||
-rw-r--r-- | components/servo/Cargo.toml | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 703f9881b46..bfed1323d57 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -13,6 +13,7 @@ path = "lib.rs" [features] debugmozjs = ['js/debugmozjs'] +unstable = [] [build-dependencies] cmake = "0.1" diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index 665a29efb3c..e27813d20f9 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -67,7 +67,8 @@ pub trait IDLInterface { } /// A trait to mark an IDL interface as deriving from another one. -#[rustc_on_unimplemented = "The IDL interface `{Self}` is not derived from `{T}`."] +#[cfg_attr(feature = "unstable", + rustc_on_unimplemented = "The IDL interface `{Self}` is not derived from `{T}`.")] pub trait DerivedFrom<T: Castable>: Castable {} // https://heycam.github.io/webidl/#es-object diff --git a/components/script/lib.rs b/components/script/lib.rs index fcb68e2420e..28f4181b934 100644 --- a/components/script/lib.rs +++ b/components/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/. */ +#![cfg_attr(feature = "unstable", feature(on_unimplemented))] #![feature(conservative_impl_trait)] #![feature(const_fn)] #![feature(core_intrinsics)] #![feature(mpsc_select)] -#![feature(on_unimplemented)] #![feature(plugin)] #![feature(proc_macro)] diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 3f7f3c82598..98093e98633 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -23,6 +23,7 @@ unstable = [ "gfx/unstable", "msg/unstable", "profile/unstable", + "script/unstable", ] [dependencies] |