diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/conversions.rs | 5 | ||||
-rw-r--r-- | components/script/dom/bindings/root.rs | 14 | ||||
-rw-r--r-- | components/script/dom/window.rs | 5 |
3 files changed, 9 insertions, 15 deletions
diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index 161354479b6..442648fb9c8 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -69,10 +69,7 @@ pub trait IDLInterface { } /// A trait to mark an IDL interface as deriving from another one. -#[cfg_attr( - feature = "unstable", - rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.") -)] +#[rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")] pub trait DerivedFrom<T: Castable>: Castable {} impl<T: Float + ToJSValConvertible> ToJSValConvertible for Finite<T> { diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs index 228015b1275..c87c83a2469 100644 --- a/components/script/dom/bindings/root.rs +++ b/components/script/dom/bindings/root.rs @@ -330,13 +330,13 @@ impl<T: DomObject> Deref for Dom<T> { unsafe impl<T: DomObject> JSTraceable for Dom<T> { unsafe fn trace(&self, trc: *mut JSTracer) { - #[cfg(all(feature = "unstable", debug_assertions))] - let trace_str = format!("for {} on heap", ::std::intrinsics::type_name::<T>()); - #[cfg(all(feature = "unstable", debug_assertions))] - let trace_info = &trace_str[..]; - #[cfg(not(all(feature = "unstable", debug_assertions)))] - let trace_info = "for DOM object on heap"; - + let trace_string; + let trace_info = if cfg!(debug_assertions) { + trace_string = format!("for {} on heap", ::std::intrinsics::type_name::<T>()); + &trace_string[..] + } else { + "for DOM object on heap" + }; trace_reflector(trc, trace_info, (*self.ptr.as_ptr()).reflector()); } } diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index a1afdc34a82..596fd711599 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -938,10 +938,7 @@ impl WindowMethods for Window { #[allow(unsafe_code)] fn Trap(&self) { - #[cfg(feature = "unstable")] - unsafe { - ::std::intrinsics::breakpoint() - } + unsafe { ::std::intrinsics::breakpoint() } } #[allow(unsafe_code)] |