save-analysis: cope with lack of method data after a type error

Fixes #39957
This commit is contained in:
Nick Cameron 2017-03-08 15:06:53 +13:00 committed by Alex Crichton
parent f573db4f80
commit e5d1b9ca39
1 changed files with 4 additions and 1 deletions

View File

@ -387,7 +387,10 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
}
}
None => {
span_bug!(span, "Could not find container for method {}", id);
debug!("Could not find container for method {} at {:?}", id, span);
// This is not necessarily a bug, if there was a compilation error, the tables
// we need might not exist.
return None;
}
},
};