diff options
-rw-r--r-- | components/canvas/lib.rs | 2 | ||||
-rw-r--r-- | components/canvas/webgl_paint_thread.rs | 1 | ||||
-rw-r--r-- | components/canvas_traits/lib.rs | 2 | ||||
-rw-r--r-- | components/gfx/lib.rs | 4 | ||||
-rw-r--r-- | components/gfx/paint_context.rs | 1 | ||||
-rw-r--r-- | components/gfx/paint_thread.rs | 1 | ||||
-rw-r--r-- | components/gfx_traits/lib.rs | 2 | ||||
-rw-r--r-- | components/layout_traits/lib.rs | 2 | ||||
-rw-r--r-- | components/msg/lib.rs | 2 | ||||
-rw-r--r-- | components/plugins/lib.rs | 2 | ||||
-rw-r--r-- | components/profile/lib.rs | 4 | ||||
-rw-r--r-- | components/profile_traits/lib.rs | 2 | ||||
-rw-r--r-- | components/range/lib.rs | 2 | ||||
-rw-r--r-- | components/script_traits/lib.rs | 2 | ||||
-rw-r--r-- | components/style/lib.rs | 2 | ||||
-rw-r--r-- | components/util/lib.rs | 11 | ||||
-rw-r--r-- | components/webdriver_server/lib.rs | 2 |
17 files changed, 44 insertions, 0 deletions
diff --git a/components/canvas/lib.rs b/components/canvas/lib.rs index 5ee82053005..319cba265e8 100644 --- a/components/canvas/lib.rs +++ b/components/canvas/lib.rs @@ -5,6 +5,8 @@ #![feature(plugin)] #![plugin(plugins)] +#![deny(unsafe_code)] + extern crate azure; extern crate canvas_traits; extern crate core; diff --git a/components/canvas/webgl_paint_thread.rs b/components/canvas/webgl_paint_thread.rs index 271ba0e2052..f1bce9343bf 100644 --- a/components/canvas/webgl_paint_thread.rs +++ b/components/canvas/webgl_paint_thread.rs @@ -153,6 +153,7 @@ impl WebGLPaintThread { unimplemented!() } + #[allow(unsafe_code)] fn recreate(&mut self, size: Size2D<i32>) -> Result<(), &'static str> { match self.data { WebGLPaintTaskData::Servo(ref mut context) => { diff --git a/components/canvas_traits/lib.rs b/components/canvas_traits/lib.rs index 8d6769da02a..87f1f8c7e41 100644 --- a/components/canvas_traits/lib.rs +++ b/components/canvas_traits/lib.rs @@ -8,6 +8,8 @@ #![feature(plugin)] #![plugin(heapsize_plugin, plugins, serde_macros)] +#![deny(unsafe_code)] + extern crate azure; extern crate core; extern crate cssparser; diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index ccc1f871364..45b164cbe88 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -18,6 +18,8 @@ #![plugin(plugins)] #![plugin(serde_macros)] +#![deny(unsafe_code)] + extern crate alloc; extern crate app_units; extern crate azure; @@ -98,7 +100,9 @@ pub mod font_template; pub mod paint_thread; // Platform-specific implementations. +#[allow(unsafe_code)] pub mod platform; // Text +#[allow(unsafe_code)] pub mod text; diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs index e020336429d..9fded4e8651 100644 --- a/components/gfx/paint_context.rs +++ b/components/gfx/paint_context.rs @@ -1774,6 +1774,7 @@ trait ScaledFontExtensionMethods { } impl ScaledFontExtensionMethods for ScaledFont { + #[allow(unsafe_code)] fn draw_text(&self, draw_target: &DrawTarget, run: &TextRun, diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs index b427ae70ea3..a0088fe5313 100644 --- a/components/gfx/paint_thread.rs +++ b/components/gfx/paint_thread.rs @@ -450,6 +450,7 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static { }, ConstellationMsg::Failure(failure_msg), c); } + #[allow(unsafe_code)] fn start(&mut self) { debug!("PaintThread: beginning painting loop"); diff --git a/components/gfx_traits/lib.rs b/components/gfx_traits/lib.rs index c3cda7c1bb9..b7af8286af0 100644 --- a/components/gfx_traits/lib.rs +++ b/components/gfx_traits/lib.rs @@ -8,6 +8,8 @@ #![crate_name = "gfx_traits"] #![crate_type = "rlib"] +#![deny(unsafe_code)] + extern crate azure; extern crate euclid; extern crate heapsize; diff --git a/components/layout_traits/lib.rs b/components/layout_traits/lib.rs index 2be15566199..f06dc14392d 100644 --- a/components/layout_traits/lib.rs +++ b/components/layout_traits/lib.rs @@ -5,6 +5,8 @@ #![feature(custom_derive, plugin)] #![plugin(serde_macros)] +#![deny(unsafe_code)] + extern crate gfx; extern crate ipc_channel; extern crate msg; diff --git a/components/msg/lib.rs b/components/msg/lib.rs index 93a513ef742..0f2a16228a1 100644 --- a/components/msg/lib.rs +++ b/components/msg/lib.rs @@ -5,6 +5,8 @@ #![feature(custom_attribute, custom_derive, plugin)] #![plugin(heapsize_plugin, serde_macros, plugins)] +#![deny(unsafe_code)] + #[macro_use] extern crate bitflags; extern crate euclid; diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs index 7534b6e5f37..b949d516b52 100644 --- a/components/plugins/lib.rs +++ b/components/plugins/lib.rs @@ -15,6 +15,8 @@ #![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private, slice_patterns)] +#![deny(unsafe_code)] + #[cfg(feature = "clippy")] extern crate clippy; #[macro_use] diff --git a/components/profile/lib.rs b/components/profile/lib.rs index b6fa7e57a34..53b7fa0ae2b 100644 --- a/components/profile/lib.rs +++ b/components/profile/lib.rs @@ -8,6 +8,8 @@ #![feature(plugin)] #![plugin(plugins)] +#![deny(unsafe_code)] + #[cfg(not(target_os = "windows"))] extern crate alloc_jemalloc; extern crate hbs_pow; @@ -24,6 +26,8 @@ extern crate task_info; extern crate time as std_time; extern crate util; +#[allow(unsafe_code)] mod heartbeats; +#[allow(unsafe_code)] pub mod mem; pub mod time; diff --git a/components/profile_traits/lib.rs b/components/profile_traits/lib.rs index 26ae6be4338..ed404df1458 100644 --- a/components/profile_traits/lib.rs +++ b/components/profile_traits/lib.rs @@ -10,6 +10,8 @@ #![feature(custom_derive, plugin)] #![plugin(plugins, serde_macros)] +#![deny(unsafe_code)] + extern crate ipc_channel; extern crate serde; diff --git a/components/range/lib.rs b/components/range/lib.rs index 1d006370149..b598f638d09 100644 --- a/components/range/lib.rs +++ b/components/range/lib.rs @@ -10,6 +10,8 @@ #![plugin(heapsize_plugin)] #![plugin(serde_macros)] +#![deny(unsafe_code)] + extern crate heapsize; extern crate num as num_lib; extern crate rustc_serialize; diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index f0e115664af..9b69525d205 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -9,6 +9,7 @@ #![feature(custom_derive, plugin)] #![plugin(heapsize_plugin, plugins, serde_macros)] #![deny(missing_docs)] +#![deny(unsafe_code)] extern crate app_units; extern crate canvas_traits; @@ -59,6 +60,7 @@ pub use script_msg::{LayoutMsg, ScriptMsg}; /// `from_untrusted_node_address` before they can be used, because we do not trust layout. #[derive(Copy, Clone, Debug)] pub struct UntrustedNodeAddress(pub *const c_void); +#[allow(unsafe_code)] unsafe impl Send for UntrustedNodeAddress {} /// Messages sent to the layout thread from the constellation and/or compositor. diff --git a/components/style/lib.rs b/components/style/lib.rs index 3d9f7f14014..a696b882d43 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -14,6 +14,8 @@ #![plugin(plugins)] #![plugin(serde_macros)] +#![deny(unsafe_code)] + #![recursion_limit = "500"] // For match_ignore_ascii_case in PropertyDeclaration::parse extern crate app_units; diff --git a/components/util/lib.rs b/components/util/lib.rs index 93cb5de4cc1..d5c97402781 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -15,6 +15,8 @@ #![plugin(heapsize_plugin, plugins, serde_macros)] +#![deny(unsafe_code)] + extern crate alloc; extern crate app_units; #[macro_use] @@ -46,16 +48,23 @@ extern crate uuid; use std::sync::Arc; pub mod cache; +#[allow(unsafe_code)] pub mod debug_utils; pub mod geometry; +#[allow(unsafe_code)] pub mod ipc; pub mod linked_list; #[cfg(feature = "non-geckolib")] +#[allow(unsafe_code)] pub mod non_geckolib; +#[allow(unsafe_code)] pub mod opts; +#[allow(unsafe_code)] pub mod prefs; pub mod print_tree; +#[allow(unsafe_code)] pub mod resource_files; +#[allow(unsafe_code)] pub mod str; pub mod thread; pub mod thread_state; @@ -63,8 +72,10 @@ pub mod threadpool; pub mod tid; pub mod time; pub mod vec; +#[allow(unsafe_code)] pub mod workqueue; +#[allow(unsafe_code)] pub fn breakpoint() { unsafe { ::std::intrinsics::breakpoint() }; } diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 41df5773667..90752f28686 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -8,6 +8,8 @@ #![feature(plugin)] #![plugin(plugins)] +#![deny(unsafe_code)] + extern crate compositing; extern crate hyper; extern crate image; |