Skip to content

Commit 0149a43

Browse files
authored
Rollup merge of rust-lang#139315 - clubby789:deranged-bump, r=Mark-Simulacrum
Switch `time` to `jiff` for time formatting in ICE dumps Due to jhpratt/deranged#21, Clippy, R-A and Miri currently fail to build if we bump to 0.4.1, pulled in via `time`. ~~Add some specific type annotations so we don't have to just pin it.~~ ~~I can open 3 PRs to the tool repos if preferred, but I thought it might be easier to do this than to pin the transitive dep and go back and remove it once the changes are synced back.~~
2 parents 0ea345a + 41fcdab commit 0149a43

File tree

5 files changed

+8
-72
lines changed

5 files changed

+8
-72
lines changed

Diff for: Cargo.lock

+1-53
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"

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: src/bootstrap/src/utils/proc_macro_deps.rs

-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ pub static CRATES: &[&str] = &[
3232
"mime_guess",
3333
"minimal-lexical",
3434
"nom",
35-
"num-conv",
3635
"once_cell",
3736
"pest",
3837
"pest_generator",
@@ -50,7 +49,6 @@ pub static CRATES: &[&str] = &[
5049
"syn",
5150
"synstructure",
5251
"thiserror",
53-
"time-core",
5452
"tinystr",
5553
"type-map",
5654
"typenum",

Diff for: src/tools/tidy/src/deps.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
269269
"darling_core",
270270
"darling_macro",
271271
"datafrog",
272-
"deranged",
273272
"derive-where",
274273
"derive_setters",
275274
"digest",
@@ -310,6 +309,8 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
310309
"intl_pluralrules",
311310
"itertools",
312311
"itoa",
312+
"jiff",
313+
"jiff-static",
313314
"jobserver",
314315
"lazy_static",
315316
"leb128",
@@ -327,7 +328,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
327328
"miniz_oxide",
328329
"nix",
329330
"nu-ansi-term",
330-
"num-conv",
331331
"num_cpus",
332332
"object",
333333
"odht",
@@ -340,7 +340,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
340340
"pin-project-lite",
341341
"polonius-engine",
342342
"portable-atomic", // dependency for platforms doesn't support `AtomicU64` in std
343-
"powerfmt",
343+
"portable-atomic-util",
344344
"ppv-lite86",
345345
"proc-macro-hack",
346346
"proc-macro2",
@@ -393,9 +393,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
393393
"thorin-dwp",
394394
"thread_local",
395395
"tikv-jemalloc-sys",
396-
"time",
397-
"time-core",
398-
"time-macros",
399396
"tinystr",
400397
"tinyvec",
401398
"tinyvec_macros",

0 commit comments

Comments
 (0)