diff options
Diffstat (limited to 'src/librustc_llvm/lib.rs')
| -rw-r--r-- | src/librustc_llvm/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 71233ff5003..506bf4a058f 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -26,7 +26,6 @@ #![feature(box_syntax)] #![feature(collections)] -#![feature(core)] #![feature(int_uint)] #![feature(libc)] #![feature(link_args)] @@ -58,7 +57,7 @@ pub use self::Linkage::*; use std::ffi::CString; use std::cell::RefCell; -use std::{raw, mem}; +use std::{slice, mem}; use libc::{c_uint, c_ushort, uint64_t, c_int, size_t, c_char}; use libc::{c_longlong, c_ulonglong, c_void}; use debuginfo::{DIBuilderRef, DIDescriptor, @@ -2226,10 +2225,7 @@ type RustStringRepr = *mut RefCell<Vec<u8>>; pub unsafe extern "C" fn rust_llvm_string_write_impl(sr: RustStringRef, ptr: *const c_char, size: size_t) { - let slice: &[u8] = mem::transmute(raw::Slice { - data: ptr as *const u8, - len: size as uint, - }); + let slice = slice::from_raw_parts(ptr as *const u8, size as uint); let sr: RustStringRepr = mem::transmute(sr); (*sr).borrow_mut().push_all(slice); |
