Rollup merge of #127058 - compiler-errors:tighten-async-spans, r=oli-obk
Tighten `fn_decl_span` for async blocks
Tightens the span of `async {}` blocks in diagnostics, and subsequently async closures and async fns, by actually setting the `fn_decl_span` correctly. This is kinda a follow-up on #125078, but it fixes the problem in a more general way.
I think the diagnostics are significantly improved, since we no longer have a bunch of overlapping spans. I'll point out one caveat where I think the diagnostic may get a bit more confusing, but where I don't think it matters.
r? ````@estebank```` or ````@oli-obk```` or someone else on wg-diag or compiler i dont really care lol
This commit is contained in:
commit
fb95df70a7
2 changed files with 2 additions and 2 deletions
|
|
@ -549,7 +549,7 @@ fn ident_difference_expr_with_base_location(
|
|||
| (Assign(_, _, _), Assign(_, _, _))
|
||||
| (TryBlock(_), TryBlock(_))
|
||||
| (Await(_, _), Await(_, _))
|
||||
| (Gen(_, _, _), Gen(_, _, _))
|
||||
| (Gen(_, _, _, _), Gen(_, _, _, _))
|
||||
| (Block(_, _), Block(_, _))
|
||||
| (Closure(_), Closure(_))
|
||||
| (Match(_, _, _), Match(_, _, _))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue