Make instance an option in CostChecker.
This commit is contained in:
parent
8252ad02c4
commit
3cb0c2e385
2 changed files with 15 additions and 10 deletions
|
@ -475,7 +475,8 @@ impl<'tcx> Inliner<'tcx> {
|
|||
|
||||
// FIXME: Give a bonus to functions with only a single caller
|
||||
|
||||
let mut checker = CostChecker::new(self.tcx, self.param_env, callsite.callee, callee_body);
|
||||
let mut checker =
|
||||
CostChecker::new(self.tcx, self.param_env, Some(callsite.callee), callee_body);
|
||||
|
||||
// Traverse the MIR manually so we can account for the effects of inlining on the CFG.
|
||||
let mut work_list = vec![START_BLOCK];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue