diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index 4aae2649843b6..b3e3381d986b7 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -84,7 +84,7 @@ fn current_dll_path() -> Result { loop { if libc::loadquery( libc::L_GETINFO, - buffer.as_mut_ptr() as *mut i8, + buffer.as_mut_ptr() as *mut u8, (std::mem::size_of::() * buffer.len()) as u32, ) >= 0 {