]> git.lizzy.rs Git - rust.git/commitdiff
fix warnings
authorCorey Richardson <corey@octayn.net>
Fri, 17 May 2013 01:53:54 +0000 (21:53 -0400)
committerCorey Richardson <corey@octayn.net>
Fri, 17 May 2013 01:53:54 +0000 (21:53 -0400)
src/libcore/rt/stack.rs
src/libcore/rt/uv/mod.rs
src/librustc/util/enum_set.rs

index 3a4e9307d3b5069ba83b7115fa56a593dafa698d..061d7dab9a1624c1ff95b292222d9b014c7b2fe2 100644 (file)
@@ -31,9 +31,7 @@ fn new(size: uint) -> StackSegment {
 
     /// Point one word beyond the high end of the allocated stack
     fn end(&self) -> *uint {
-        unsafe {
-            vec::raw::to_ptr(self.buf).offset(self.buf.len()) as *uint
-        }
+        vec::raw::to_ptr(self.buf).offset(self.buf.len()) as *uint
     }
 }
 
index 6499f0a3efdcf92e5aac820ee21dba196381829f..1d93b3273953c9096a2240cecbcfb82849169032 100644 (file)
@@ -362,7 +362,7 @@ fn test_slice_to_uv_buf() {
 
 /// Borrow a slice to a Buf
 pub fn slice_to_uv_buf(v: &[u8]) -> Buf {
-    let data = unsafe { vec::raw::to_ptr(v) };
+    let data = vec::raw::to_ptr(v);
     unsafe { uvll::buf_init(data, v.len()) }
 }
 
index 801561350ae44a4b6a6852194db932506de794bb..2e6c4ee3eaa8e82d377a3271a560faac2ebc7077 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 use core;
 
 #[deriving(Eq, IterBytes)]