about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-05-02 23:12:43 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-05-08 17:03:58 -0700
commit2961997f169a526ccf5a3bafd95db3e12f7e0283 (patch)
tree0b2eccbf4c588e5a4a0aa4ee7c6710f92e0d9408 /src/libcore
parentb2d1ac100fb7c7ea8716b17b8df64e43aef41f9e (diff)
downloadrust-2961997f169a526ccf5a3bafd95db3e12f7e0283.tar.gz
rust-2961997f169a526ccf5a3bafd95db3e12f7e0283.zip
libcore: Remove mutable fields from os and ptr
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/os.rs5
-rw-r--r--src/libcore/ptr.rs5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/libcore/os.rs b/src/libcore/os.rs
index 42c77a687e5..5a7f01706b4 100644
--- a/src/libcore/os.rs
+++ b/src/libcore/os.rs
@@ -352,7 +352,10 @@ pub fn fsync_fd(fd: c_int, _l: io::fsync::Level) -> c_int {
     }
 }
 
-pub struct Pipe { in: c_int, out: c_int }
+pub struct Pipe {
+    in: c_int,
+    out: c_int
+}
 
 #[cfg(unix)]
 pub fn pipe() -> Pipe {
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 85e46a0feff..1a5ff39b305 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -336,7 +336,10 @@ pub mod ptr_tests {
     #[test]
     fn test() {
         unsafe {
-            struct Pair {mut fst: int, mut snd: int};
+            struct Pair {
+                fst: int,
+                snd: int
+            };
             let mut p = Pair {fst: 10, snd: 20};
             let pptr: *mut Pair = &mut p;
             let iptr: *mut int = cast::transmute(pptr);