Adjust HostEffect error spans correctly to point at args
This commit is contained in:
parent
17c6efa978
commit
30afeb0357
36 changed files with 361 additions and 136 deletions
|
@ -2803,6 +2803,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
}
|
||||
ObligationCauseCode::WhereClause(item_def_id, span)
|
||||
| ObligationCauseCode::WhereClauseInExpr(item_def_id, span, ..)
|
||||
| ObligationCauseCode::HostEffectInExpr(item_def_id, span, ..)
|
||||
if !span.is_dummy() =>
|
||||
{
|
||||
if let ObligationCauseCode::WhereClauseInExpr(_, _, hir_id, pos) = &cause_code {
|
||||
|
@ -2966,7 +2967,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
err.help(help);
|
||||
}
|
||||
}
|
||||
ObligationCauseCode::WhereClause(..) | ObligationCauseCode::WhereClauseInExpr(..) => {
|
||||
ObligationCauseCode::WhereClause(..)
|
||||
| ObligationCauseCode::WhereClauseInExpr(..)
|
||||
| ObligationCauseCode::HostEffectInExpr(..) => {
|
||||
// We hold the `DefId` of the item introducing the obligation, but displaying it
|
||||
// doesn't add user usable information. It always point at an associated item.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue