Rollup merge of #104593 - compiler-errors:rpitit-object-safety-spans, r=fee1-dead
Improve spans for RPITIT object-safety errors
No reason why we can't point at the `impl Trait` that causes the object-safety violation.
Also [drive-by: Add is_async fn to hir::IsAsync](c4165f3a96
), which touches clippy too.
This commit is contained in:
commit
c571b2a964
11 changed files with 86 additions and 27 deletions
|
@ -62,7 +62,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
|
|||
}
|
||||
|
||||
fn is_async(&self) -> bool {
|
||||
self.tcx.asyncness(self.def_id()) == hir::IsAsync::Async
|
||||
self.tcx.asyncness(self.def_id()).is_async()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue