diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-23 15:00:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-23 15:00:20 +0100 |
| commit | 9418f69446a10ae3910266bddfe75621fc819209 (patch) | |
| tree | e9ba17c3132f380623f3751240971fe1688fd624 /compiler/rustc_codegen_llvm/src | |
| parent | fd8a8c1a7ec8961f3879a4ed8e9259f19cc0c975 (diff) | |
| parent | 44d185b0d00c8ba228aafa789a39b77d7fd11daf (diff) | |
| download | rust-9418f69446a10ae3910266bddfe75621fc819209.tar.gz rust-9418f69446a10ae3910266bddfe75621fc819209.zip | |
Rollup merge of #122922 - kpreid:print-async, r=compiler-errors
-Zprint-type-sizes: print the types of awaitees and unnamed coroutine locals. This should assist comprehending the size of coroutines. In particular, whenever a future is suspended while awaiting another future, the latter is given the special name `__awaitee`, and now the type of the awaited future will be printed, allowing identifying caller/callee — er, I mean, poller/pollee — relationships. It would be possible to include the type name in more cases, but I thought that that might be overly verbose (`print-type-sizes` is already a lot of text) and ordinary named fields or variables are easier for readers to discover the types of. This change will also synergize with my other PR #122923 which changes type printing to print the path of the `async fn` instead of the span. Implementation note: I'm not sure if `Symbol::intern` is appropriate for this application, but it was the obvious way to not have to remove the `Copy` implementation from `FieldInfo`, or add a `'tcx` lifetime, while avoiding keeping a lot of possibly redundant strings in memory. I don't know what the proper tradeoff to make here is (though presumably it is not too important for a `-Z` debugging option).
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
