about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-06-17 10:52:37 +0000
committerLzu Tao <taolzu@gmail.com>2019-06-17 10:52:46 +0000
commit7d69d4ced23c446d6af341e3f9dc031a302150fc (patch)
tree1d59692c2766091896112e5c4dac1b4f5c8fb02f /src/librustc_errors
parent70456a6cbd67c0547d22997007afaaed0819767e (diff)
downloadrust-7d69d4ced23c446d6af341e3f9dc031a302150fc.tar.gz
rust-7d69d4ced23c446d6af341e3f9dc031a302150fc.zip
Make use of `ptr::null(_mut)` instead of casting zero
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/lock.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/lock.rs b/src/librustc_errors/lock.rs
index f731791efe6..25a27d2cbd8 100644
--- a/src/librustc_errors/lock.rs
+++ b/src/librustc_errors/lock.rs
@@ -64,7 +64,7 @@ pub fn acquire_global_lock(name: &str) -> Box<dyn Any> {
         //
         // This will silently create one if it doesn't already exist, or it'll
         // open up a handle to one if it already exists.
-        let mutex = CreateMutexA(0 as *mut _, 0, cname.as_ptr() as *const u8);
+        let mutex = CreateMutexA(std::ptr::null_mut(), 0, cname.as_ptr() as *const u8);
         if mutex.is_null() {
             panic!("failed to create global mutex named `{}`: {}",
                    name,