Skip to content

Commit

Permalink
Rollup merge of rust-lang#89415 - wesleywiser:inliner_caller_callsite…
Browse files Browse the repository at this point in the history
…_message, r=michaelwoerister

Correct caller/callsite confusion in inliner message

`callee_body` is the MIR `Body` for the `callsite.callee` so this message basically says `"Inline {bar span} into bar"` when it should say `"Inline bar into foo"`.

Extracted out of rust-lang#82280
  • Loading branch information
Manishearth authored Oct 1, 2021
2 parents d388428 + 3565e8a commit 534946c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl Inliner<'tcx> {
self.check_mir_body(callsite, callee_body, callee_attrs)?;

if !self.tcx.consider_optimizing(|| {
format!("Inline {:?} into {}", callee_body.span, callsite.callee)
format!("Inline {:?} into {:?}", callsite.callee, caller_body.source)
}) {
return Err("optimization fuel exhausted");
}
Expand Down

0 comments on commit 534946c

Please sign in to comment.