Fix rebase fallout

This commit is contained in:
Aaron Hill 2020-11-25 15:08:31 -05:00
parent 6a9dbd2e0e
commit 7a9aa4f980
No known key found for this signature in database
GPG key ID: B4087E510E98B164
5 changed files with 22 additions and 8 deletions

View file

@ -205,7 +205,10 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
/// If we are not in incremental compilation mode, returns `None`.
/// Otherwise, tries to load the query result cache from disk,
/// creating an empty cache if it could not be loaded.
pub fn load_query_result_cache<'a>(sess: &'a Session, definitions: &Definitions) -> Option<OnDiskCache<'a>> {
pub fn load_query_result_cache<'a>(
sess: &'a Session,
definitions: &Definitions,
) -> Option<OnDiskCache<'a>> {
if sess.opts.incremental.is_none() {
return None;
}
@ -217,7 +220,9 @@ pub fn load_query_result_cache<'a>(sess: &'a Session, definitions: &Definitions)
&query_cache_path(sess),
sess.is_nightly_build(),
) {
LoadResult::Ok { data: (bytes, start_pos) } => Some(OnDiskCache::new(sess, bytes, start_pos, definitions)),
LoadResult::Ok { data: (bytes, start_pos) } => {
Some(OnDiskCache::new(sess, bytes, start_pos, definitions))
}
_ => Some(OnDiskCache::new_empty(sess.source_map())),
}
}