diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index 926d8538cb8..bf01221d109 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -14,7 +14,7 @@ //! They are therefore not exactly analogous to constructs like Skia pictures, which consist of //! low-level drawing primitives. -#![deny(unsafe_blocks)] +#![deny(unsafe_code)] use display_list::optimizer::DisplayListOptimizer; use paint_context::{PaintContext, ToAzureRect}; diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 3fe671fc888..2bd53bd699b 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -6,10 +6,9 @@ #![feature(box_syntax)] #![feature(collections)] #![feature(core)] -#![feature(hash)] #![feature(int_uint)] -#![cfg_attr(any(target_os="linux", target_os = "android"), feature(io))] -#![cfg_attr(any(target_os="linux", target_os = "android"), feature(path))] +#![cfg_attr(any(target_os="linux", target_os = "android"), feature(old_io))] +#![cfg_attr(any(target_os="linux", target_os = "android"), feature(old_path))] #![feature(plugin)] #![feature(rustc_private)] #![feature(std_misc)] diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs index b21e861a8f8..db281e1acac 100644 --- a/components/gfx/paint_task.rs +++ b/components/gfx/paint_task.rs @@ -439,7 +439,7 @@ impl WorkerThreadProxy { font_cache_task, time_profiler_chan); worker_thread.main(); - }); + }).unwrap(); WorkerThreadProxy { receiver: from_worker_receiver, sender: to_worker_sender, diff --git a/components/gfx/platform/freetype/font_list.rs b/components/gfx/platform/freetype/font_list.rs index 1b835339e31..5b1d309b31e 100644 --- a/components/gfx/platform/freetype/font_list.rs +++ b/components/gfx/platform/freetype/font_list.rs @@ -59,7 +59,7 @@ pub fn get_variations_for_family(family_name: &str, mut callback: F) let font_set_array_ptr = &mut font_set; let pattern = FcPatternCreate(); assert!(!pattern.is_null()); - let family_name_c = CString::from_slice(family_name.as_bytes()); + let family_name_c = CString::new(family_name).unwrap(); let family_name = family_name_c.as_ptr(); let ok = FcPatternAddString(pattern, FC_FAMILY.as_ptr() as *mut c_char, family_name as *mut FcChar8); assert!(ok != 0); @@ -102,7 +102,7 @@ pub fn get_variations_for_family(family_name: &str, mut callback: F) } pub fn get_system_default_family(generic_name: &str) -> Option { - let generic_name_c = CString::from_slice(generic_name.as_bytes()); + let generic_name_c = CString::new(generic_name).unwrap(); let generic_name_ptr = generic_name_c.as_ptr(); unsafe {