Make FunctionArgumentObligation also use the "no allocation for misc" trick

This commit is contained in:
Oli Scherer 2022-05-10 11:26:53 +00:00
parent 1b51e1ad20
commit 213c17486e
2 changed files with 17 additions and 7 deletions

View file

@ -1652,7 +1652,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
debug!("maybe_note_obligation_cause_for_async_await: code={:?}", code);
match code {
ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } => {
next_code = Some(parent_code.as_ref());
next_code = Some(parent_code);
}
ObligationCauseCode::ImplDerivedObligation(cause) => {
let ty = cause.derived.parent_trait_pred.skip_binder().self_ty();