Skip to content

Commit 8270452

Browse files
committed
Auto merge of rust-lang#141208 - fmease:rollup-zdzvg6u, r=fmease
Rollup of 6 pull requests Successful merges: - rust-lang#127013 (Add `f16` formatting and parsing) - rust-lang#140154 (Cygwin support in rustc) - rust-lang#140628 (std: stop using TLS in signal handler) - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc) - rust-lang#140994 (replace `cc_detect::cc2ar` with `cc::try_get_archiver`) - rust-lang#141127 (bump windows crate for compiler,bootstrap and tools) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ae3b909 + 4c5ddec commit 8270452

File tree

46 files changed

+921
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+921
-432
lines changed

Cargo.lock

+14-57
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ dependencies = [
738738
"tracing-subscriber",
739739
"unified-diff",
740740
"walkdir",
741-
"windows 0.59.0",
741+
"windows",
742742
]
743743

744744
[[package]]
@@ -1587,7 +1587,7 @@ dependencies = [
15871587
"js-sys",
15881588
"log",
15891589
"wasm-bindgen",
1590-
"windows-core 0.61.0",
1590+
"windows-core",
15911591
]
15921592

15931593
[[package]]
@@ -3493,7 +3493,7 @@ dependencies = [
34933493
"thorin-dwp",
34943494
"tracing",
34953495
"wasm-encoder 0.219.2",
3496-
"windows 0.59.0",
3496+
"windows",
34973497
]
34983498

34993499
[[package]]
@@ -3552,7 +3552,7 @@ dependencies = [
35523552
"tempfile",
35533553
"thin-vec",
35543554
"tracing",
3555-
"windows 0.59.0",
3555+
"windows",
35563556
]
35573557

35583558
[[package]]
@@ -3615,7 +3615,7 @@ dependencies = [
36153615
"shlex",
36163616
"stable_mir",
36173617
"tracing",
3618-
"windows 0.59.0",
3618+
"windows",
36193619
]
36203620

36213621
[[package]]
@@ -3670,7 +3670,7 @@ dependencies = [
36703670
"termcolor",
36713671
"termize",
36723672
"tracing",
3673-
"windows 0.59.0",
3673+
"windows",
36743674
]
36753675

36763676
[[package]]
@@ -4415,7 +4415,7 @@ dependencies = [
44154415
"smallvec",
44164416
"termize",
44174417
"tracing",
4418-
"windows 0.59.0",
4418+
"windows",
44194419
]
44204420

44214421
[[package]]
@@ -5102,7 +5102,7 @@ dependencies = [
51025102
"libc",
51035103
"objc2-core-foundation",
51045104
"objc2-io-kit",
5105-
"windows 0.61.1",
5105+
"windows",
51065106
]
51075107

51085108
[[package]]
@@ -6002,24 +6002,14 @@ version = "0.4.0"
60026002
source = "registry+https://github.com/rust-lang/crates.io-index"
60036003
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
60046004

6005-
[[package]]
6006-
name = "windows"
6007-
version = "0.59.0"
6008-
source = "registry+https://github.com/rust-lang/crates.io-index"
6009-
checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1"
6010-
dependencies = [
6011-
"windows-core 0.59.0",
6012-
"windows-targets 0.53.0",
6013-
]
6014-
60156005
[[package]]
60166006
name = "windows"
60176007
version = "0.61.1"
60186008
source = "registry+https://github.com/rust-lang/crates.io-index"
60196009
checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
60206010
dependencies = [
60216011
"windows-collections",
6022-
"windows-core 0.61.0",
6012+
"windows-core",
60236013
"windows-future",
60246014
"windows-link",
60256015
"windows-numerics",
@@ -6042,20 +6032,7 @@ version = "0.2.0"
60426032
source = "registry+https://github.com/rust-lang/crates.io-index"
60436033
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
60446034
dependencies = [
6045-
"windows-core 0.61.0",
6046-
]
6047-
6048-
[[package]]
6049-
name = "windows-core"
6050-
version = "0.59.0"
6051-
source = "registry+https://github.com/rust-lang/crates.io-index"
6052-
checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce"
6053-
dependencies = [
6054-
"windows-implement 0.59.0",
6055-
"windows-interface",
6056-
"windows-result",
6057-
"windows-strings 0.3.1",
6058-
"windows-targets 0.53.0",
6035+
"windows-core",
60596036
]
60606037

60616038
[[package]]
@@ -6064,11 +6041,11 @@ version = "0.61.0"
60646041
source = "registry+https://github.com/rust-lang/crates.io-index"
60656042
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
60666043
dependencies = [
6067-
"windows-implement 0.60.0",
6044+
"windows-implement",
60686045
"windows-interface",
60696046
"windows-link",
60706047
"windows-result",
6071-
"windows-strings 0.4.0",
6048+
"windows-strings",
60726049
]
60736050

60746051
[[package]]
@@ -6077,21 +6054,10 @@ version = "0.2.0"
60776054
source = "registry+https://github.com/rust-lang/crates.io-index"
60786055
checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
60796056
dependencies = [
6080-
"windows-core 0.61.0",
6057+
"windows-core",
60816058
"windows-link",
60826059
]
60836060

6084-
[[package]]
6085-
name = "windows-implement"
6086-
version = "0.59.0"
6087-
source = "registry+https://github.com/rust-lang/crates.io-index"
6088-
checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
6089-
dependencies = [
6090-
"proc-macro2",
6091-
"quote",
6092-
"syn 2.0.101",
6093-
]
6094-
60956061
[[package]]
60966062
name = "windows-implement"
60976063
version = "0.60.0"
@@ -6126,7 +6092,7 @@ version = "0.2.0"
61266092
source = "registry+https://github.com/rust-lang/crates.io-index"
61276093
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
61286094
dependencies = [
6129-
"windows-core 0.61.0",
6095+
"windows-core",
61306096
"windows-link",
61316097
]
61326098

@@ -6139,15 +6105,6 @@ dependencies = [
61396105
"windows-link",
61406106
]
61416107

6142-
[[package]]
6143-
name = "windows-strings"
6144-
version = "0.3.1"
6145-
source = "registry+https://github.com/rust-lang/crates.io-index"
6146-
checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
6147-
dependencies = [
6148-
"windows-link",
6149-
]
6150-
61516108
[[package]]
61526109
name = "windows-strings"
61536110
version = "0.4.0"

compiler/rustc_codegen_ssa/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ default-features = false
5858
features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write", "wasm"]
5959

6060
[target.'cfg(windows)'.dependencies.windows]
61-
version = "0.59.0"
61+
version = "0.61.0"
6262
features = ["Win32_Globalization"]

compiler/rustc_data_structures/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ features = ["nightly"] # for may_dangle
3838
version = "0.12"
3939

4040
[target.'cfg(windows)'.dependencies.windows]
41-
version = "0.59.0"
41+
version = "0.61.0"
4242
features = [
4343
"Win32_Foundation",
4444
"Win32_Storage_FileSystem",

compiler/rustc_driver_impl/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ libc = "0.2"
6060
# tidy-alphabetical-end
6161

6262
[target.'cfg(windows)'.dependencies.windows]
63-
version = "0.59.0"
63+
version = "0.61.0"
6464
features = [
6565
"Win32_System_Diagnostics_Debug",
6666
]

compiler/rustc_errors/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tracing = "0.1"
3333
# tidy-alphabetical-end
3434

3535
[target.'cfg(windows)'.dependencies.windows]
36-
version = "0.59.0"
36+
version = "0.61.0"
3737
features = [
3838
"Win32_Foundation",
3939
"Win32_Security",

compiler/rustc_llvm/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ fn main() {
255255
} else if target.contains("haiku")
256256
|| target.contains("darwin")
257257
|| (is_crossed && (target.contains("dragonfly") || target.contains("solaris")))
258+
|| target.contains("cygwin")
258259
{
259260
println!("cargo:rustc-link-lib=z");
260261
} else if target.contains("netbsd") {

compiler/rustc_pattern_analysis/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![allow(rustc::diagnostic_outside_of_impl)]
77
#![allow(rustc::untranslatable_diagnostic)]
88
#![allow(unused_crate_dependencies)]
9-
#![cfg_attr(all(feature = "rustc", bootstrap), feature(let_chains))]
109
// tidy-alphabetical-end
1110

1211
pub mod constructor;

compiler/rustc_session/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ libc = "0.2"
3333
# tidy-alphabetical-end
3434

3535
[target.'cfg(windows)'.dependencies.windows]
36-
version = "0.59.0"
36+
version = "0.61.0"
3737
features = [
3838
"Win32_Foundation",
3939
"Win32_System_LibraryLoader",

compiler/rustc_session/src/filesearch.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ fn current_dll_path() -> Result<PathBuf, String> {
7878
if libc::dladdr(addr, &mut info) == 0 {
7979
return Err("dladdr failed".into());
8080
}
81-
if info.dli_fname.is_null() {
82-
return Err("dladdr returned null pointer".into());
83-
}
84-
let bytes = CStr::from_ptr(info.dli_fname).to_bytes();
81+
#[cfg(target_os = "cygwin")]
82+
let fname_ptr = info.dli_fname.as_ptr();
83+
#[cfg(not(target_os = "cygwin"))]
84+
let fname_ptr = {
85+
if info.dli_fname.is_null() {
86+
return Err("dladdr returned null pointer".into());
87+
}
88+
info.dli_fname
89+
};
90+
let bytes = CStr::from_ptr(fname_ptr).to_bytes();
8591
let os = OsStr::from_bytes(bytes);
8692
Ok(PathBuf::from(os))
8793
}

library/core/src/fmt/float.rs

+36
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ macro_rules! impl_general_format {
2020
}
2121
}
2222

23+
#[cfg(target_has_reliable_f16)]
24+
impl_general_format! { f16 }
2325
impl_general_format! { f32 f64 }
2426

2527
// Don't inline this so callers don't use the stack space this function
@@ -231,6 +233,13 @@ macro_rules! floating {
231233

232234
floating! { f32 f64 }
233235

236+
#[cfg(target_has_reliable_f16)]
237+
floating! { f16 }
238+
239+
// FIXME(f16_f128): A fallback is used when the backend+target does not support f16 well, in order
240+
// to avoid ICEs.
241+
242+
#[cfg(not(target_has_reliable_f16))]
234243
#[stable(feature = "rust1", since = "1.0.0")]
235244
impl Debug for f16 {
236245
#[inline]
@@ -239,6 +248,33 @@ impl Debug for f16 {
239248
}
240249
}
241250

251+
#[cfg(not(target_has_reliable_f16))]
252+
#[stable(feature = "rust1", since = "1.0.0")]
253+
impl Display for f16 {
254+
#[inline]
255+
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
256+
Debug::fmt(self, fmt)
257+
}
258+
}
259+
260+
#[cfg(not(target_has_reliable_f16))]
261+
#[stable(feature = "rust1", since = "1.0.0")]
262+
impl LowerExp for f16 {
263+
#[inline]
264+
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
265+
Debug::fmt(self, fmt)
266+
}
267+
}
268+
269+
#[cfg(not(target_has_reliable_f16))]
270+
#[stable(feature = "rust1", since = "1.0.0")]
271+
impl UpperExp for f16 {
272+
#[inline]
273+
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
274+
Debug::fmt(self, fmt)
275+
}
276+
}
277+
242278
#[stable(feature = "rust1", since = "1.0.0")]
243279
impl Debug for f128 {
244280
#[inline]

library/core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
#![feature(bstr)]
102102
#![feature(bstr_internals)]
103103
#![feature(cfg_match)]
104+
#![feature(cfg_target_has_reliable_f16_f128)]
104105
#![feature(const_carrying_mul_add)]
105106
#![feature(const_eval_select)]
106107
#![feature(core_intrinsics)]

0 commit comments

Comments
 (0)