]> git.lizzy.rs Git - rust.git/blobdiff - src/librustrt/thread.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / librustrt / thread.rs
index 43364466dbe3937913a839b6f5c38ee6c5040f97..bef799d4178aac773b12881ab799bf4be873fea1 100644 (file)
@@ -128,7 +128,7 @@ pub fn join(mut self) -> T {
         unsafe { imp::join(self.native) };
         self.joined = true;
         assert!(self.packet.is_some());
-        self.packet.take_unwrap()
+        self.packet.take().unwrap()
     }
 }
 
@@ -171,8 +171,8 @@ pub unsafe fn create(stack: uint, p: Box<proc():Send>) -> rust_thread {
         // kernel does, might as well make it explicit.  With the current
         // 20 kB red zone, that makes for a 64 kB minimum stack.
         let stack_size = (cmp::max(stack, RED_ZONE) + 0xfffe) & (-0xfffe - 1);
-        let ret = CreateThread(ptr::mut_null(), stack_size as libc::size_t,
-                               super::thread_start, arg, 0, ptr::mut_null());
+        let ret = CreateThread(ptr::null_mut(), stack_size as libc::size_t,
+                               super::thread_start, arg, 0, ptr::null_mut());
 
         if ret as uint == 0 {
             // be sure to not leak the closure
@@ -198,7 +198,7 @@ pub unsafe fn yield_now() {
         SwitchToThread();
     }
 
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     extern "system" {
         fn CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES,
                         dwStackSize: SIZE_T,
@@ -268,7 +268,7 @@ pub unsafe fn create(stack: uint, p: Box<proc():Send>) -> rust_thread {
     }
 
     pub unsafe fn join(native: rust_thread) {
-        assert_eq!(pthread_join(native, ptr::mut_null()), 0);
+        assert_eq!(pthread_join(native, ptr::null_mut()), 0);
     }
 
     pub unsafe fn detach(native: rust_thread) {