diff --git a/components/devtools/actor.rs b/components/devtools/actor.rs index a2499ec467b..b0cd26e2468 100644 --- a/components/devtools/actor.rs +++ b/components/devtools/actor.rs @@ -44,6 +44,7 @@ impl Actor + Send { /// Returns some reference to the boxed value if it is of type `T`, or /// `None` if it isn't. #[inline] + #[allow(unsafe_code)] pub fn downcast_ref(&self) -> Option<&T> { if self.is::() { unsafe { @@ -61,6 +62,7 @@ impl Actor + Send { /// Returns some mutable reference to the boxed value if it is of type `T`, or /// `None` if it isn't. #[inline] + #[allow(unsafe_code)] pub fn downcast_mut(&mut self) -> Option<&mut T> { if self.is::() { unsafe { diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs index d9335943b1e..046a6dbddc1 100644 --- a/components/devtools/lib.rs +++ b/components/devtools/lib.rs @@ -20,6 +20,7 @@ #![plugin(serde_macros)] #![allow(non_snake_case)] +#![deny(unsafe_code)] #[macro_use] extern crate log; diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs index 65bbd238dd1..2013ec79c96 100644 --- a/components/devtools_traits/lib.rs +++ b/components/devtools_traits/lib.rs @@ -10,6 +10,8 @@ #![crate_type = "rlib"] #![allow(non_snake_case)] +#![deny(unsafe_code)] + #![feature(custom_derive, plugin)] #![plugin(serde_macros)]