about summary refs log tree commit diff
path: root/src/libstd/c_str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/c_str.rs')
-rw-r--r--src/libstd/c_str.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/c_str.rs b/src/libstd/c_str.rs
index d096903f9c4..33cf33848f0 100644
--- a/src/libstd/c_str.rs
+++ b/src/libstd/c_str.rs
@@ -77,7 +77,7 @@ use fmt;
 use hash;
 use mem;
 use ptr;
-use slice::{mod, ImmutableIntSlice};
+use slice::{mod, IntSliceExt};
 use str;
 use string::String;
 use core::kinds::marker;
@@ -465,7 +465,7 @@ unsafe fn with_c_str<T, F>(v: &[u8], checked: bool, f: F) -> T where
     F: FnOnce(*const libc::c_char) -> T,
 {
     let c_str = if v.len() < BUF_LEN {
-        let mut buf: [u8, .. BUF_LEN] = mem::uninitialized();
+        let mut buf: [u8; BUF_LEN] = mem::uninitialized();
         slice::bytes::copy_memory(&mut buf, v);
         buf[v.len()] = 0;
 
@@ -497,6 +497,8 @@ fn check_for_null(v: &[u8], buf: *mut libc::c_char) {
 /// External iterator for a CString's bytes.
 ///
 /// Use with the `std::iter` module.
+#[allow(raw_pointer_deriving)]
+#[deriving(Clone)]
 pub struct CChars<'a> {
     ptr: *const libc::c_char,
     marker: marker::ContravariantLifetime<'a>,