From 2c2480df5d340f4c7b2deeef0177e4fd22f2b03a Mon Sep 17 00:00:00 2001 From: we Date: Mon, 19 Jan 2015 08:27:09 +0300 Subject: Replace `0 as *const/mut T` with `ptr::null/null_mut()` --- src/libstd/io/stdio.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd/io/stdio.rs') diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 9ee2f5705b8..a5664b9f013 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -40,6 +40,7 @@ use mem; use option::Option; use option::Option::{Some, None}; use ops::{Deref, DerefMut, FnOnce}; +use ptr; use result::Result::{Ok, Err}; use rt; use slice::SliceExt; @@ -238,7 +239,7 @@ pub fn stdin() -> StdinReader { // Make sure to free it at exit rt::at_exit(|| { mem::transmute::<_, Box>(STDIN); - STDIN = 0 as *const _; + STDIN = ptr::null(); }); }); -- cgit 1.4.1-3-g733a5