diff options
| author | Weihang Lo <me@weihanglo.tw> | 2025-01-24 19:08:32 -0500 |
|---|---|---|
| committer | Weihang Lo <me@weihanglo.tw> | 2025-01-24 19:08:32 -0500 |
| commit | 5f8bcec6c8e006f0b73b9bff076299f77d6c166c (patch) | |
| tree | 9d5166dddf3489a2ef0163e6089f4c1939d8d863 /compiler/rustc_data_structures/src | |
| parent | 1e9b0177da38e3f421a3b9b1942f1777d166e06a (diff) | |
| download | rust-5f8bcec6c8e006f0b73b9bff076299f77d6c166c.tar.gz rust-5f8bcec6c8e006f0b73b9bff076299f77d6c166c.zip | |
fix(bootstrap): deserialize null as `f64::NAN`
When doing optimized build through opt-dist, I've often run into errors like `invalid type: null, expected f64`. This is likely because some f64 fields might actually bet set null. Unfortunately, serde_json doesn't handle null <-> NaN well. This commit addresses it by having a custom deserialize method, so null is always be deserialized to `f64:NAN`. See: * https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/opt-dist.3A.20.60invalid.20type.3A.20null.2C.20expect.20f64.60.20failure * https://github.com/serde-rs/json/issues/202
Diffstat (limited to 'compiler/rustc_data_structures/src')
0 files changed, 0 insertions, 0 deletions
