about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorWesley Wiser <wwiser@gmail.com>2018-03-22 22:25:57 -0400
committerWesley Wiser <wwiser@gmail.com>2018-03-28 08:30:09 -0400
commit49fd71bea7bd3d8d11818503ca048227ffa1e758 (patch)
tree3d9df20cc1247b5e409ca733f189a3ba083a404c /src/liballoc/string.rs
parent482a913fb337855072a53c0d602cd19947f45285 (diff)
downloadrust-49fd71bea7bd3d8d11818503ca048227ffa1e758.tar.gz
rust-49fd71bea7bd3d8d11818503ca048227ffa1e758.zip
[incremental] Don't panic if decoding the cache fails
If the cached data can't be loaded from disk, just issue a warning to
the user so they know why compilation is taking longer than usual but
don't fail the entire compilation since we can recover by ignorning the
on disk cache.

In the same way, if the disk cache can't be deserialized (because it has
been corrupted for some reason), report the issue as a warning and
continue without failing the compilation. `Decodable::decode()` tends to
panic with various errors like "entered unreachable code" or "index out
of range" if the input data is corrupted. Work around this by catching
panics from the `decode()` calls when joining the thread and continuing
without the cached data.

Fixes #48847
Diffstat (limited to 'src/liballoc/string.rs')
0 files changed, 0 insertions, 0 deletions