diff options
| author | Martin Nordholts <enselic@gmail.com> | 2023-08-18 19:20:28 +0200 |
|---|---|---|
| committer | Martin Nordholts <enselic@gmail.com> | 2023-08-18 19:57:41 +0200 |
| commit | 64e8aea9ce6f40083445d9c161d233499ee559cd (patch) | |
| tree | 95a2a4536fe29becb96b66029cf6f5fa48aa969b /compiler/rustc_incremental | |
| parent | df8aed400b9e496062f865f4991af7606c6c1e87 (diff) | |
| download | rust-64e8aea9ce6f40083445d9c161d233499ee559cd.tar.gz rust-64e8aea9ce6f40083445d9c161d233499ee559cd.zip | |
Ignore unexpected incr-comp session dirs
Clearly the code path can be hit without the presence of a compiler bug. All it takes is mischief. See 71698. Ignore problematic directories instead of ICE:ing. `continue`ing is already done for problematic dirs in the code block above us.
Diffstat (limited to 'compiler/rustc_incremental')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/fs.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/rustc_incremental/src/persist/fs.rs b/compiler/rustc_incremental/src/persist/fs.rs index 6b894c3a69d..db8ea2bfe48 100644 --- a/compiler/rustc_incremental/src/persist/fs.rs +++ b/compiler/rustc_incremental/src/persist/fs.rs @@ -538,9 +538,13 @@ where continue; } - let timestamp = extract_timestamp_from_session_dir(&directory_name).unwrap_or_else(|e| { - bug!("unexpected incr-comp session dir: {}: {}", session_dir.display(), e) - }); + let timestamp = match extract_timestamp_from_session_dir(&directory_name) { + Ok(timestamp) => timestamp, + Err(e) => { + debug!("unexpected incr-comp session dir: {}: {}", session_dir.display(), e); + continue; + } + }; if timestamp > best_candidate.0 { best_candidate = (timestamp, Some(session_dir.clone())); |
