about summary refs log tree commit diff
path: root/src/libstd/sys/unix
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-25 04:55:57 +0000
committerbors <bors@rust-lang.org>2017-12-25 04:55:57 +0000
commita6fc84440f3353b1090dc52d7859136880db89ec (patch)
treeae9034dfdbd3fa7ad9b228758573a9d5b1f2b584 /src/libstd/sys/unix
parentae65dcc30f421fd91b9e2d67cf77c86bfb20ee3a (diff)
parent60e66290451644e81323daa7cf03c337a6569c83 (diff)
downloadrust-a6fc84440f3353b1090dc52d7859136880db89ec.tar.gz
rust-a6fc84440f3353b1090dc52d7859136880db89ec.zip
Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1
Convert warning about `*const _` to a future-compat lint

#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.

fixes #46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1
Diffstat (limited to 'src/libstd/sys/unix')
-rw-r--r--src/libstd/sys/unix/os.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 4f33a2b12fe..a46e855b4a6 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -453,7 +453,7 @@ pub fn getenv(k: &OsStr) -> io::Result<Option<OsString>> {
     let k = CString::new(k.as_bytes())?;
     unsafe {
         ENV_LOCK.lock();
-        let s = libc::getenv(k.as_ptr()) as *const _;
+        let s = libc::getenv(k.as_ptr()) as *const libc::c_char;
         let ret = if s.is_null() {
             None
         } else {