Make usage of unstable feature on_unimplemented optional.

This commit is contained in:
Simon Sapin 2017-10-14 18:57:28 +02:00
parent 5a5b7d7f39
commit bffec1c1a1
4 changed files with 5 additions and 2 deletions

View file

@ -13,6 +13,7 @@ path = "lib.rs"
[features]
debugmozjs = ['js/debugmozjs']
unstable = []
[build-dependencies]
cmake = "0.1"

View file

@ -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

View file

@ -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)]

View file

@ -23,6 +23,7 @@ unstable = [
"gfx/unstable",
"msg/unstable",
"profile/unstable",
"script/unstable",
]
[dependencies]