Deny unsafe code in more crates.

This commit is contained in:
Ms2ger 2016-03-18 14:43:03 +01:00
parent c90a1b9b1c
commit 08083f1c9d
17 changed files with 44 additions and 0 deletions

View file

@ -5,6 +5,8 @@
#![feature(plugin)]
#![plugin(plugins)]
#![deny(unsafe_code)]
extern crate azure;
extern crate canvas_traits;
extern crate core;

View file

@ -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) => {

View file

@ -8,6 +8,8 @@
#![feature(plugin)]
#![plugin(heapsize_plugin, plugins, serde_macros)]
#![deny(unsafe_code)]
extern crate azure;
extern crate core;
extern crate cssparser;

View file

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

View file

@ -1774,6 +1774,7 @@ trait ScaledFontExtensionMethods {
}
impl ScaledFontExtensionMethods for ScaledFont {
#[allow(unsafe_code)]
fn draw_text(&self,
draw_target: &DrawTarget,
run: &TextRun,

View file

@ -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");

View file

@ -8,6 +8,8 @@
#![crate_name = "gfx_traits"]
#![crate_type = "rlib"]
#![deny(unsafe_code)]
extern crate azure;
extern crate euclid;
extern crate heapsize;

View file

@ -5,6 +5,8 @@
#![feature(custom_derive, plugin)]
#![plugin(serde_macros)]
#![deny(unsafe_code)]
extern crate gfx;
extern crate ipc_channel;
extern crate msg;

View file

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

View file

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

View file

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

View file

@ -10,6 +10,8 @@
#![feature(custom_derive, plugin)]
#![plugin(plugins, serde_macros)]
#![deny(unsafe_code)]
extern crate ipc_channel;
extern crate serde;

View file

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

View file

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

View file

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

View file

@ -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() };
}

View file

@ -8,6 +8,8 @@
#![feature(plugin)]
#![plugin(plugins)]
#![deny(unsafe_code)]
extern crate compositing;
extern crate hyper;
extern crate image;