File tree 4 files changed +41
-19
lines changed
4 files changed +41
-19
lines changed Original file line number Diff line number Diff line change @@ -611,6 +611,16 @@ dependencies = [
611
611
" tracing-tree" ,
612
612
]
613
613
614
+ [[package ]]
615
+ name = " chrono"
616
+ version = " 0.2.25"
617
+ source = " registry+https://github.com/rust-lang/crates.io-index"
618
+ checksum = " 9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
619
+ dependencies = [
620
+ " num" ,
621
+ " time 0.1.43" ,
622
+ ]
623
+
614
624
[[package ]]
615
625
name = " chrono"
616
626
version = " 0.4.19"
@@ -2535,7 +2545,7 @@ checksum = "23f3e133c6d515528745ffd3b9f0c7d975ae039f0b6abb099f2168daa2afb4f9"
2535
2545
dependencies = [
2536
2546
" ammonia" ,
2537
2547
" anyhow" ,
2538
- " chrono" ,
2548
+ " chrono 0.4.19 " ,
2539
2549
" clap 3.2.20" ,
2540
2550
" clap_complete" ,
2541
2551
" elasticlunr-rs" ,
@@ -2703,6 +2713,17 @@ version = "0.3.0"
2703
2713
source = " registry+https://github.com/rust-lang/crates.io-index"
2704
2714
checksum = " 61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
2705
2715
2716
+ [[package ]]
2717
+ name = " num"
2718
+ version = " 0.1.42"
2719
+ source = " registry+https://github.com/rust-lang/crates.io-index"
2720
+ checksum = " 4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
2721
+ dependencies = [
2722
+ " num-integer" ,
2723
+ " num-iter" ,
2724
+ " num-traits" ,
2725
+ ]
2726
+
2706
2727
[[package ]]
2707
2728
name = " num-integer"
2708
2729
version = " 0.1.43"
@@ -2713,6 +2734,17 @@ dependencies = [
2713
2734
" num-traits" ,
2714
2735
]
2715
2736
2737
+ [[package ]]
2738
+ name = " num-iter"
2739
+ version = " 0.1.43"
2740
+ source = " registry+https://github.com/rust-lang/crates.io-index"
2741
+ checksum = " 7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
2742
+ dependencies = [
2743
+ " autocfg" ,
2744
+ " num-integer" ,
2745
+ " num-traits" ,
2746
+ ]
2747
+
2716
2748
[[package ]]
2717
2749
name = " num-traits"
2718
2750
version = " 0.2.12"
@@ -3916,6 +3948,7 @@ name = "rustc_driver"
3916
3948
version = " 0.0.0"
3917
3949
dependencies = [
3918
3950
" backtrace" ,
3951
+ " chrono 0.2.25" ,
3919
3952
" libc" ,
3920
3953
" rustc_ast" ,
3921
3954
" rustc_ast_pretty" ,
@@ -3942,7 +3975,6 @@ dependencies = [
3942
3975
" rustc_span" ,
3943
3976
" rustc_target" ,
3944
3977
" serde_json" ,
3945
- " time 0.3.17" ,
3946
3978
" tracing" ,
3947
3979
" winapi" ,
3948
3980
]
@@ -5252,7 +5284,7 @@ version = "0.5.1"
5252
5284
source = " registry+https://github.com/rust-lang/crates.io-index"
5253
5285
checksum = " b3c02f6eb7e7b4100c272f685a9ccaccaab302324e8c7ec3e2ee72340fb29ff3"
5254
5286
dependencies = [
5255
- " chrono" ,
5287
+ " chrono 0.4.19 " ,
5256
5288
" log" ,
5257
5289
" nom" ,
5258
5290
" serde" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ crate-type = ["dylib"]
9
9
[dependencies ]
10
10
backtrace = " 0.3.66"
11
11
serde_json = " 1.0.59"
12
- time = { version = " 0.3.17 " , features = [ " std " , " formatting " ] }
12
+ chrono = " 0.2 "
13
13
tracing = { version = " 0.1.35" }
14
14
rustc_log = { path = " ../rustc_log" }
15
15
rustc_middle = { path = " ../rustc_middle" }
Original file line number Diff line number Diff line change @@ -1185,16 +1185,7 @@ pub fn catch_with_exit_code(f: impl FnOnce() -> interface::Result<()>) -> i32 {
1185
1185
}
1186
1186
1187
1187
struct IceError ;
1188
- impl From < time:: error:: InvalidFormatDescription > for IceError {
1189
- fn from ( _: time:: error:: InvalidFormatDescription ) -> IceError {
1190
- IceError
1191
- }
1192
- }
1193
- impl From < time:: error:: Format > for IceError {
1194
- fn from ( _: time:: error:: Format ) -> IceError {
1195
- IceError
1196
- }
1197
- }
1188
+
1198
1189
impl From < std:: io:: Error > for IceError {
1199
1190
fn from ( _: std:: io:: Error ) -> IceError {
1200
1191
IceError
@@ -1203,11 +1194,9 @@ impl From<std::io::Error> for IceError {
1203
1194
1204
1195
fn write_ice_to_disk ( info : & panic:: PanicInfo < ' _ > ) -> Result < String , IceError > {
1205
1196
let capture = backtrace:: Backtrace :: force_capture ( ) ;
1206
- let now = time:: OffsetDateTime :: now_utc ( ) ;
1207
- let format = time:: format_description:: parse ( "[year]-[month]-[day]_[hour]:[minute]:[second]" ) ?;
1208
- let file_now = now. format ( & format) ?;
1209
- let format = time:: format_description:: parse ( "[year]-[month]-[day] [hour]:[minute]:[second]" ) ?;
1210
- let now = now. format ( & format) ?;
1197
+ let now = chrono:: UTC :: now ( ) ;
1198
+ let file_now = now. format ( "%Y-%m-%d_%H:%M:%S" ) ;
1199
+ let now = now. format ( "%Y-%m-%d %H:%M:%S" ) ;
1211
1200
let path = format ! ( "rustc-ice-context-{file_now}.txt" ) ;
1212
1201
let mut file = std:: fs:: File :: create ( & path) ?;
1213
1202
writeln ! (
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
96
96
"arrayvec" ,
97
97
"atty" ,
98
98
"autocfg" ,
99
+ "backtrace" ,
99
100
"bitflags" ,
100
101
"block-buffer" ,
101
102
"bumpalo" , // Included in Cargo's dep graph but only activated on wasm32-*-unknown.
You can’t perform that action at this time.
0 commit comments