Commit e6ff7b1
authored
Rollup merge of rust-lang#95011 - michaelwoerister:awaitee_field, r=tmandry
async: Give predictable name to binding generated from .await expressions.
This name makes it to debuginfo and allows debuggers to identify such bindings and their captured versions in suspended async fns.
This will be useful for async stack traces, as discussed in https://internals.rust-lang.org/t/async-debugging-logical-stack-traces-setting-goals-collecting-examples/15547.
I don't know if this needs some discussion by ```@rust-lang/compiler,``` e.g. about the name of the binding (`__awaitee`) or about the fact that this PR introduces a (soft) guarantee about a compiler generated name. Although, regarding the later, I think the same reasoning applies here as it does for debuginfo in general.
r? ```@tmandry```3 files changed
Lines changed: 40 additions & 14 deletions
File tree
- compiler
- rustc_ast_lowering/src
- rustc_span/src
- src/test/codegen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
| 621 | + | |
622 | 622 | | |
623 | | - | |
| 623 | + | |
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
660 | | - | |
661 | | - | |
662 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
663 | 666 | | |
664 | 667 | | |
665 | 668 | | |
666 | 669 | | |
667 | 670 | | |
668 | | - | |
| 671 | + | |
669 | 672 | | |
670 | 673 | | |
671 | 674 | | |
672 | 675 | | |
673 | | - | |
674 | | - | |
| 676 | + | |
| 677 | + | |
675 | 678 | | |
676 | 679 | | |
677 | 680 | | |
| |||
681 | 684 | | |
682 | 685 | | |
683 | 686 | | |
684 | | - | |
| 687 | + | |
685 | 688 | | |
686 | 689 | | |
687 | 690 | | |
| |||
782 | 785 | | |
783 | 786 | | |
784 | 787 | | |
785 | | - | |
786 | | - | |
| 788 | + | |
| 789 | + | |
787 | 790 | | |
788 | 791 | | |
789 | 792 | | |
| |||
799 | 802 | | |
800 | 803 | | |
801 | 804 | | |
802 | | - | |
| 805 | + | |
803 | 806 | | |
804 | 807 | | |
805 | 808 | | |
806 | | - | |
| 809 | + | |
807 | 810 | | |
808 | 811 | | |
809 | 812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
1018 | 1019 | | |
1019 | 1020 | | |
1020 | 1021 | | |
1021 | | - | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | 1024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments