Skip to content

Commit 26aff84

Browse files
committed
Auto merge of rust-lang#139724 - ChrisDenton:rollup-zhcdtzh, r=ChrisDenton
Rollup of 8 pull requests Successful merges: - rust-lang#139163 (indirect-const-stabilize the `exact_div` intrinsic) - rust-lang#139276 (Revert "Disable `f16` on Aarch64 without `neon`") - rust-lang#139315 (Switch `time` to `jiff` for time formatting in ICE dumps) - rust-lang#139382 (Update windows-bindgen to 0.61.0) - rust-lang#139688 (rustdoc-search: add unbox flag to Result aliases) - rust-lang#139701 (docs: clarify uint exponent for `is_power_of_two`) - rust-lang#139705 (Removed outdated ui test suite README, give reasons for disabled tests) - rust-lang#139713 (Fix typo in documentation) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ae06b79 + 739bf9b commit 26aff84

File tree

29 files changed

+349
-160
lines changed

29 files changed

+349
-160
lines changed

Diff for: Cargo.lock

+5-55
Original file line numberDiff line numberDiff line change
@@ -931,15 +931,6 @@ dependencies = [
931931
"winapi",
932932
]
933933

934-
[[package]]
935-
name = "deranged"
936-
version = "0.4.0"
937-
source = "registry+https://github.com/rust-lang/crates.io-index"
938-
checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
939-
dependencies = [
940-
"powerfmt",
941-
]
942-
943934
[[package]]
944935
name = "derive-where"
945936
version = "1.2.7"
@@ -2425,12 +2416,6 @@ dependencies = [
24252416
"num-traits",
24262417
]
24272418

2428-
[[package]]
2429-
name = "num-conv"
2430-
version = "0.1.0"
2431-
source = "registry+https://github.com/rust-lang/crates.io-index"
2432-
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
2433-
24342419
[[package]]
24352420
name = "num-integer"
24362421
version = "0.1.46"
@@ -2808,12 +2793,6 @@ dependencies = [
28082793
"portable-atomic",
28092794
]
28102795

2811-
[[package]]
2812-
name = "powerfmt"
2813-
version = "0.2.0"
2814-
source = "registry+https://github.com/rust-lang/crates.io-index"
2815-
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
2816-
28172796
[[package]]
28182797
name = "ppv-lite86"
28192798
version = "0.2.21"
@@ -3616,6 +3595,7 @@ name = "rustc_driver_impl"
36163595
version = "0.0.0"
36173596
dependencies = [
36183597
"ctrlc",
3598+
"jiff",
36193599
"libc",
36203600
"rustc_abi",
36213601
"rustc_ast",
@@ -3662,7 +3642,6 @@ dependencies = [
36623642
"rustc_ty_utils",
36633643
"serde_json",
36643644
"shlex",
3665-
"time",
36663645
"tracing",
36673646
"windows 0.59.0",
36683647
]
@@ -5356,37 +5335,6 @@ dependencies = [
53565335
"libc",
53575336
]
53585337

5359-
[[package]]
5360-
name = "time"
5361-
version = "0.3.41"
5362-
source = "registry+https://github.com/rust-lang/crates.io-index"
5363-
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
5364-
dependencies = [
5365-
"deranged",
5366-
"itoa",
5367-
"num-conv",
5368-
"powerfmt",
5369-
"serde",
5370-
"time-core",
5371-
"time-macros",
5372-
]
5373-
5374-
[[package]]
5375-
name = "time-core"
5376-
version = "0.1.4"
5377-
source = "registry+https://github.com/rust-lang/crates.io-index"
5378-
checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
5379-
5380-
[[package]]
5381-
name = "time-macros"
5382-
version = "0.2.22"
5383-
source = "registry+https://github.com/rust-lang/crates.io-index"
5384-
checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
5385-
dependencies = [
5386-
"num-conv",
5387-
"time-core",
5388-
]
5389-
53905338
[[package]]
53915339
name = "tinystr"
53925340
version = "0.7.6"
@@ -6111,11 +6059,13 @@ dependencies = [
61116059

61126060
[[package]]
61136061
name = "windows-bindgen"
6114-
version = "0.59.0"
6062+
version = "0.61.0"
61156063
source = "registry+https://github.com/rust-lang/crates.io-index"
6116-
checksum = "9b7fb600834d7e868f6e5bb748a86101427330fafbf9485c331b9d5f562d54a5"
6064+
checksum = "ac1c59c20569610dd9ed784d5f003fb493ec57b4cf39d974eb03a84bb7156c90"
61176065
dependencies = [
61186066
"rayon",
6067+
"serde",
6068+
"serde_json",
61196069
]
61206070

61216071
[[package]]

Diff for: compiler/rustc_driver_impl/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.0.0"
44
edition = "2024"
55

66
[dependencies]
7+
jiff = { version = "0.2.5", default-features = false, features = ["std"] }
78
# tidy-alphabetical-start
89
rustc_abi = { path = "../rustc_abi" }
910
rustc_ast = { path = "../rustc_ast" }
@@ -50,7 +51,6 @@ rustc_trait_selection = { path = "../rustc_trait_selection" }
5051
rustc_ty_utils = { path = "../rustc_ty_utils" }
5152
serde_json = "1.0.59"
5253
shlex = "1.0"
53-
time = { version = "0.3.36", default-features = false, features = ["alloc", "formatting", "macros"] }
5454
tracing = { version = "0.1.35" }
5555
# tidy-alphabetical-end
5656

Diff for: compiler/rustc_driver_impl/src/lib.rs

+3-10
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::path::{Path, PathBuf};
3030
use std::process::{self, Command, Stdio};
3131
use std::sync::OnceLock;
3232
use std::sync::atomic::{AtomicBool, Ordering};
33-
use std::time::{Instant, SystemTime};
33+
use std::time::Instant;
3434
use std::{env, str};
3535

3636
use rustc_ast as ast;
@@ -66,8 +66,6 @@ use rustc_span::FileName;
6666
use rustc_span::def_id::LOCAL_CRATE;
6767
use rustc_target::json::ToJson;
6868
use rustc_target::spec::{Target, TargetTuple};
69-
use time::OffsetDateTime;
70-
use time::macros::format_description;
7169
use tracing::trace;
7270

7371
#[allow(unused_macros)]
@@ -1301,13 +1299,8 @@ fn ice_path_with_config(config: Option<&UnstableOptions>) -> &'static Option<Pat
13011299
.or_else(|| std::env::current_dir().ok())
13021300
.unwrap_or_default(),
13031301
};
1304-
let now: OffsetDateTime = SystemTime::now().into();
1305-
let file_now = now
1306-
.format(
1307-
// Don't use a standard datetime format because Windows doesn't support `:` in paths
1308-
&format_description!("[year]-[month]-[day]T[hour]_[minute]_[second]"),
1309-
)
1310-
.unwrap_or_default();
1302+
// Don't use a standard datetime format because Windows doesn't support `:` in paths
1303+
let file_now = jiff::Zoned::now().strftime("%Y-%m-%dT%H_%M_%S");
13111304
let pid = std::process::id();
13121305
path.push(format!("rustc-ice-{file_now}-{pid}.txt"));
13131306
Some(path)

Diff for: compiler/rustc_passes/src/check_attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
11091109
ItemKind::Trait(_, _, _, generics, _, items)
11101110
if generics.params.len() != 0
11111111
|| items.iter().any(|item| matches!(item.kind, AssocItemKind::Type)) => {}
1112+
ItemKind::TyAlias(_, _, generics) if generics.params.len() != 0 => {}
11121113
_ => {
11131114
self.dcx().emit_err(errors::DocSearchUnboxInvalid { span: meta.span() });
11141115
}

Diff for: library/alloc/src/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
//! parameters (corresponding to `format_spec` in [the syntax](#syntax)). These
110110
//! parameters affect the string representation of what's being formatted.
111111
//!
112-
//! The colon `:` in format syntax divides indentifier of the input data and
112+
//! The colon `:` in format syntax divides identifier of the input data and
113113
//! the formatting options, the colon itself does not change anything, only
114114
//! introduces the options.
115115
//!

Diff for: library/core/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2737,6 +2737,7 @@ pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>,
27372737
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
27382738
///
27392739
/// This intrinsic does not have a stable counterpart.
2740+
#[rustc_intrinsic_const_stable_indirect]
27402741
#[rustc_nounwind]
27412742
#[rustc_intrinsic]
27422743
pub const unsafe fn exact_div<T: Copy>(x: T, y: T) -> T;

Diff for: library/core/src/num/uint_macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3343,7 +3343,7 @@ macro_rules! uint_impl {
33433343
}
33443344
}
33453345

3346-
/// Returns `true` if and only if `self == 2^k` for some `k`.
3346+
/// Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.
33473347
///
33483348
/// # Examples
33493349
///

Diff for: library/core/src/slice/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,6 @@ impl<T> [T] {
12871287
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
12881288
/// ```
12891289
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1290-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
12911290
#[inline]
12921291
#[must_use]
12931292
pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]] {
@@ -1333,7 +1332,6 @@ impl<T> [T] {
13331332
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
13341333
/// ```
13351334
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1336-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13371335
#[inline]
13381336
#[track_caller]
13391337
#[must_use]
@@ -1368,7 +1366,6 @@ impl<T> [T] {
13681366
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
13691367
/// ```
13701368
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1371-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13721369
#[inline]
13731370
#[track_caller]
13741371
#[must_use]
@@ -1448,7 +1445,6 @@ impl<T> [T] {
14481445
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
14491446
/// ```
14501447
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1451-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
14521448
#[inline]
14531449
#[must_use]
14541450
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]] {
@@ -1489,7 +1485,6 @@ impl<T> [T] {
14891485
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
14901486
/// ```
14911487
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1492-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
14931488
#[inline]
14941489
#[track_caller]
14951490
#[must_use]
@@ -1530,7 +1525,6 @@ impl<T> [T] {
15301525
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
15311526
/// ```
15321527
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1533-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
15341528
#[inline]
15351529
#[track_caller]
15361530
#[must_use]

Diff for: library/std/build.rs

-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ fn main() {
1212
.expect("CARGO_CFG_TARGET_POINTER_WIDTH was not set")
1313
.parse()
1414
.unwrap();
15-
let target_features: Vec<_> = env::var("CARGO_CFG_TARGET_FEATURE")
16-
.unwrap_or_default()
17-
.split(",")
18-
.map(ToOwned::to_owned)
19-
.collect();
2015
let is_miri = env::var_os("CARGO_CFG_MIRI").is_some();
2116

2217
println!("cargo:rustc-check-cfg=cfg(netbsd10)");
@@ -108,8 +103,6 @@ fn main() {
108103
("s390x", _) => false,
109104
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
110105
("arm64ec", _) => false,
111-
// LLVM crash <https://github.com/llvm/llvm-project/issues/129394>
112-
("aarch64", _) if !target_features.iter().any(|f| f == "neon") => false,
113106
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
114107
("x86_64", "windows") if target_env == "gnu" && target_abi != "llvm" => false,
115108
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>

Diff for: library/std/src/io/error.rs

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ use crate::{error, fmt, result, sys};
4848
/// }
4949
/// ```
5050
#[stable(feature = "rust1", since = "1.0.0")]
51+
#[cfg_attr(not(bootstrap), doc(search_unbox))]
5152
pub type Result<T> = result::Result<T, Error>;
5253

5354
/// The error type for I/O operations of the [`Read`], [`Write`], [`Seek`], and

Diff for: library/std/src/sys/fs/windows/remove_dir_all.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn open_link_no_reparse(
9595
ObjectName: &mut path_str,
9696
RootDirectory: parent.as_raw_handle(),
9797
Attributes: ATTRIBUTES.load(Ordering::Relaxed),
98-
..c::OBJECT_ATTRIBUTES::default()
98+
..c::OBJECT_ATTRIBUTES::with_length()
9999
};
100100
let share = c::FILE_SHARE_DELETE | c::FILE_SHARE_READ | c::FILE_SHARE_WRITE;
101101
let options = c::FILE_OPEN_REPARSE_POINT | options;

Diff for: library/std/src/sys/pal/windows/c.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ impl UNICODE_STRING {
4444
}
4545
}
4646

47-
impl Default for OBJECT_ATTRIBUTES {
48-
fn default() -> Self {
47+
impl OBJECT_ATTRIBUTES {
48+
pub fn with_length() -> Self {
4949
Self {
5050
Length: size_of::<Self>() as _,
5151
RootDirectory: ptr::null_mut(),

Diff for: library/std/src/sys/pal/windows/c/bindings.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
--out windows_sys.rs
22
--flat
33
--sys
4-
--no-core
4+
--no-deps
5+
--link windows_targets
56
--filter
67
!INVALID_HANDLE_VALUE
78
ABOVE_NORMAL_PRIORITY_CLASS
@@ -19,7 +20,6 @@ ALL_PROCESSOR_GROUPS
1920
ARM64_NT_NEON128
2021
BELOW_NORMAL_PRIORITY_CLASS
2122
bind
22-
BOOL
2323
BY_HANDLE_FILE_INFORMATION
2424
CALLBACK_CHUNK_FINISHED
2525
CALLBACK_STREAM_SWITCH

0 commit comments

Comments
 (0)