diff --git a/Cargo.lock b/Cargo.lock index c64f4dd8e4e..2be61a658aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,7 +339,7 @@ dependencies = [ "unicode-width", "url", "walkdir", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -353,7 +353,7 @@ dependencies = [ "snapbox", "thiserror", "time", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -387,7 +387,7 @@ name = "cargo-credential-wincred" version = "0.4.8" dependencies = [ "cargo-credential", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -435,7 +435,7 @@ dependencies = [ "toml", "url", "walkdir", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -456,7 +456,7 @@ dependencies = [ "tempfile", "tracing", "walkdir", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1963,7 +1963,7 @@ dependencies = [ name = "home" version = "0.5.11" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3894,6 +3894,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" diff --git a/Cargo.toml b/Cargo.toml index 88e5372dd51..fc47f7ade37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -108,7 +108,7 @@ unicode-xid = "0.2.4" url = "2.5.2" varisat = "0.2.2" walkdir = "2.5.0" -windows-sys = "0.52" +windows-sys = "0.59" [workspace.lints.rust] rust_2018_idioms = "warn" # TODO: could this be removed? diff --git a/crates/home/src/windows.rs b/crates/home/src/windows.rs index c9a63d97b99..bd21ad085c7 100644 --- a/crates/home/src/windows.rs +++ b/crates/home/src/windows.rs @@ -20,7 +20,12 @@ pub fn home_dir_inner() -> Option { fn home_dir_crt() -> Option { unsafe { let mut path = ptr::null_mut(); - match SHGetKnownFolderPath(&FOLDERID_Profile, KF_FLAG_DONT_VERIFY as u32, 0, &mut path) { + match SHGetKnownFolderPath( + &FOLDERID_Profile, + KF_FLAG_DONT_VERIFY as u32, + std::ptr::null_mut(), + &mut path, + ) { S_OK => { let path_slice = slice::from_raw_parts(path, wcslen(path)); let s = OsString::from_wide(&path_slice); diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index bb866a873c9..174986ee446 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -662,7 +662,7 @@ mod imp { ptr::null_mut(), OPEN_EXISTING, 0, - 0, + std::ptr::null_mut(), ); if h == INVALID_HANDLE_VALUE { return TtyWidth::NoTty;