fix(rustc_typeck): report function argument errors on matching type
Fixes #90101
This commit is contained in:
parent
84c2a8505d
commit
8520105464
33 changed files with 252 additions and 141 deletions
|
@ -1492,6 +1492,9 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } => {
|
||||
self.get_parent_trait_ref(&parent_code)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1422,6 +1422,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
while let Some(code) = next_code {
|
||||
debug!("maybe_note_obligation_cause_for_async_await: code={:?}", code);
|
||||
match code {
|
||||
ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } => {
|
||||
next_code = Some(parent_code.as_ref());
|
||||
}
|
||||
ObligationCauseCode::DerivedObligation(derived_obligation)
|
||||
| ObligationCauseCode::BuiltinDerivedObligation(derived_obligation)
|
||||
| ObligationCauseCode::ImplDerivedObligation(derived_obligation) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue