diff --git a/Cargo.lock b/Cargo.lock
index 8b09aa246..e774b5db0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -262,7 +262,7 @@ dependencies = [
"glob",
"hex",
"hmac",
- "home 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "home 0.5.4",
"http-auth",
"humantime 2.1.0",
"ignore",
@@ -305,7 +305,7 @@ dependencies = [
"unicode-xid",
"url",
"walkdir",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -342,7 +342,7 @@ name = "cargo-credential-wincred"
version = "0.2.0"
dependencies = [
"cargo-credential",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -388,7 +388,7 @@ dependencies = [
"time",
"toml",
"url",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -408,7 +408,7 @@ dependencies = [
"shell-escape",
"tempfile",
"walkdir",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -1546,7 +1546,7 @@ dependencies = [
"bstr",
"gix-features",
"gix-path",
- "home 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "home 0.5.4",
"thiserror",
"url",
]
@@ -1690,13 +1690,6 @@ dependencies = [
"digest",
]
-[[package]]
-name = "home"
-version = "0.5.4"
-dependencies = [
- "windows-sys 0.45.0",
-]
-
[[package]]
name = "home"
version = "0.5.4"
@@ -1706,6 +1699,13 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "home"
+version = "0.5.5"
+dependencies = [
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "http-auth"
version = "0.1.8"
diff --git a/Cargo.toml b/Cargo.toml
index c32b2d667..54e2aaec1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -95,7 +95,7 @@ openssl = { version = "0.10.50", optional = true }
fwdansi = "1.1.0"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.45"
+version = "0.48"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem",
diff --git a/crates/cargo-test-support/Cargo.toml b/crates/cargo-test-support/Cargo.toml
index 91e6e4e34..a3a83148b 100644
--- a/crates/cargo-test-support/Cargo.toml
+++ b/crates/cargo-test-support/Cargo.toml
@@ -29,4 +29,4 @@ toml = "0.7.0"
url = "2.2.2"
[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.45.0", features = ["Win32_Storage_FileSystem"] }
+windows-sys = { version = "0.48.0", features = ["Win32_Storage_FileSystem"] }
diff --git a/crates/cargo-util/Cargo.toml b/crates/cargo-util/Cargo.toml
index 7427ceb1a..9ee935ca1 100644
--- a/crates/cargo-util/Cargo.toml
+++ b/crates/cargo-util/Cargo.toml
@@ -25,4 +25,4 @@ core-foundation = { version = "0.9.0", features = ["mac_os_10_7_support"] }
[target.'cfg(windows)'.dependencies]
miow = "0.5.0"
-windows-sys = { version = "0.45.0", features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
+windows-sys = { version = "0.48.0", features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
diff --git a/crates/home/CHANGELOG.md b/crates/home/CHANGELOG.md
index 7674667c9..0ceed6bcd 100644
--- a/crates/home/CHANGELOG.md
+++ b/crates/home/CHANGELOG.md
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
+## Unreleased
+- The `home` crate has migrated to the repository.
+ [#11359](https://github.com/rust-lang/cargo/pull/11359)
+- Replaced the winapi dependency with windows-sys.
+ [#11656](https://github.com/rust-lang/cargo/pull/11656)
## [0.5.4] - 2022-10-10
- Add `_with_env` variants of functions to support in-process threaded tests for
@@ -38,7 +42,6 @@ Use Rust 1.36.0 as minimum Rust version.
### Removed
- Remove support for `multirust` folder used in old version of `rustup`.
-[Unreleased]: https://github.com/brson/home/compare/v0.5.4...HEAD
[0.5.4]: https://github.com/brson/home/compare/v0.5.3...v0.5.4
[0.5.3]: https://github.com/brson/home/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/brson/home/compare/v0.5.1...v0.5.2
diff --git a/crates/home/Cargo.toml b/crates/home/Cargo.toml
index 2c5b92bcb..90211c28d 100644
--- a/crates/home/Cargo.toml
+++ b/crates/home/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "home"
-version = "0.5.4" # also update `html_root_url` in `src/lib.rs`
+version = "0.5.5" # also update `html_root_url` in `src/lib.rs`
authors = ["Brian Anderson "]
documentation = "https://docs.rs/home"
edition = "2018"
@@ -17,4 +17,4 @@ repository = "https://github.com/rust-lang/cargo"
description = "Shared definitions of home directories."
[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.45.0", features = ["Win32_Foundation", "Win32_UI_Shell"] }
+windows-sys = { version = "0.48.0", features = ["Win32_Foundation", "Win32_UI_Shell"] }
diff --git a/crates/home/src/lib.rs b/crates/home/src/lib.rs
index 306026e40..a8af963f3 100644
--- a/crates/home/src/lib.rs
+++ b/crates/home/src/lib.rs
@@ -25,7 +25,7 @@
//!
//! [discussion]: https://github.com/rust-lang/rust/pull/46799#issuecomment-361156935
-#![doc(html_root_url = "https://docs.rs/home/0.5.4")]
+#![doc(html_root_url = "https://docs.rs/home/0.5.5")]
#![deny(rust_2018_idioms)]
pub mod env;
diff --git a/credential/cargo-credential-wincred/Cargo.toml b/credential/cargo-credential-wincred/Cargo.toml
index 83c38e80d..64f349638 100644
--- a/credential/cargo-credential-wincred/Cargo.toml
+++ b/credential/cargo-credential-wincred/Cargo.toml
@@ -8,4 +8,4 @@ description = "A Cargo credential process that stores tokens with Windows Creden
[dependencies]
cargo-credential = { version = "0.2.0", path = "../cargo-credential" }
-windows-sys = { version = "0.45", features = ["Win32_Foundation", "Win32_Security_Credentials"] }
+windows-sys = { version = "0.48", features = ["Win32_Foundation", "Win32_Security_Credentials"] }
diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs
index fdae617c4..f74bde257 100644
--- a/src/cargo/core/shell.rs
+++ b/src/cargo/core/shell.rs
@@ -563,13 +563,13 @@ mod imp {
use windows_sys::core::PCSTR;
use windows_sys::Win32::Foundation::CloseHandle;
use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE;
+ use windows_sys::Win32::Foundation::{GENERIC_READ, GENERIC_WRITE};
use windows_sys::Win32::Storage::FileSystem::{
CreateFileA, FILE_SHARE_READ, FILE_SHARE_WRITE, OPEN_EXISTING,
};
use windows_sys::Win32::System::Console::{
GetConsoleScreenBufferInfo, GetStdHandle, CONSOLE_SCREEN_BUFFER_INFO, STD_ERROR_HANDLE,
};
- use windows_sys::Win32::System::SystemServices::{GENERIC_READ, GENERIC_WRITE};
pub(super) use super::{default_err_erase_line as err_erase_line, TtyWidth};