diff options
| author | klensy <klensy@users.noreply.github.com> | 2024-11-02 15:20:11 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2024-11-03 15:51:39 +0300 |
| commit | bc1d8e72e793c61c4c22867e0802835178b8a309 (patch) | |
| tree | 949de75371e5e6d33321e51e30b64ce93ef0ab17 /compiler/rustc_driver_impl/src | |
| parent | be3a635fe777d4aac653994749ad47e650e71c1e (diff) | |
| download | rust-bc1d8e72e793c61c4c22867e0802835178b8a309.tar.gz rust-bc1d8e72e793c61c4c22867e0802835178b8a309.zip | |
make time format parsing compiletime
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 4362007d4ba..d2c4335cf2b 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -64,6 +64,7 @@ use rustc_span::source_map::FileLoader; use rustc_target::json::ToJson; use rustc_target::spec::{Target, TargetTuple}; use time::OffsetDateTime; +use time::macros::format_description; use tracing::trace; #[allow(unused_macros)] @@ -1356,8 +1357,7 @@ fn ice_path_with_config(config: Option<&UnstableOptions>) -> &'static Option<Pat let file_now = now .format( // Don't use a standard datetime format because Windows doesn't support `:` in paths - &time::format_description::parse("[year]-[month]-[day]T[hour]_[minute]_[second]") - .unwrap(), + &format_description!("[year]-[month]-[day]T[hour]_[minute]_[second]"), ) .unwrap_or_default(); let pid = std::process::id(); |
