parent
d4ad1cfc63
commit
f93cbedade
3 changed files with 49 additions and 3 deletions
|
@ -245,9 +245,10 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
if let ObligationCauseCode::WellFormed(Some(wf_loc)) =
|
||||
root_obligation.cause.code.peel_derives()
|
||||
{
|
||||
if let Some(cause) =
|
||||
self.tcx.diagnostic_hir_wf_check((obligation.predicate, wf_loc.clone()))
|
||||
{
|
||||
if let Some(cause) = self.tcx.diagnostic_hir_wf_check((
|
||||
tcx.erase_regions(obligation.predicate),
|
||||
wf_loc.clone(),
|
||||
)) {
|
||||
obligation.cause = cause;
|
||||
span = obligation.cause.span;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue