Rollup merge of #111899 - nnethercote:cgu-cleanups, r=wesleywiser
CGU cleanups Some code clarity improvements I found when reading this code closely. r? ``@wesleywiser``
This commit is contained in:
commit
78cc117f7b
4 changed files with 169 additions and 206 deletions
|
@ -334,10 +334,7 @@ impl<'tcx> CodegenUnit<'tcx> {
|
|||
}
|
||||
|
||||
pub fn modify_size_estimate(&mut self, delta: usize) {
|
||||
assert!(self.size_estimate.is_some());
|
||||
if let Some(size_estimate) = self.size_estimate {
|
||||
self.size_estimate = Some(size_estimate + delta);
|
||||
}
|
||||
*self.size_estimate.as_mut().unwrap() += delta;
|
||||
}
|
||||
|
||||
pub fn contains_item(&self, item: &MonoItem<'tcx>) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue