You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/design_docs/async_stack_traces.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -655,6 +655,7 @@ A third option is to use some kind of name based heuristics.
655
655
For example, by default we may want to only show frames in the root crate, although this may be too restrictive for large projects.
656
656
Probably the best approach here is to extend the set of options allowed for the `RUST_BACKTRACE` environment variable to make it behave more like `RUST_LOG`.
657
657
We could allow options such as `RUST_BACKTRACE="short,exclude=tokio::*"` to hide all frames from the `tokio` crate, or `RUST_BACKTRACE="short,include=my_crate::*"` to only show frames from `my_crate`.
658
+
These ideas are being prototyped in the [better-backtrace] repo.
658
659
659
660
This third option could also be implemented mostly through changes to [`_print_fmt`].
660
661
It also gives a great deal of control.
@@ -711,6 +712,9 @@ In non-interactive cases, such as printing a backtrace with some `RUST_BACKTRACE
711
712
712
713
### Generate more informative symbol names
713
714
715
+
Note that a similar renaming to what is proposed here was implemented in [#92873].
716
+
New approaches to formatting based on these symbols are being explored in the [better-backtrace] repo.
717
+
714
718
Currently `async` functions result in a function name like `foo::generator$0`.
715
719
This can be confusing to users, since it leaks implementation details about `async` functions.
716
720
We probably have a lot of flexibility in the generated names, so `rustc` could encode more information about where this symbol came from.
@@ -752,6 +756,8 @@ For the block suffixes, we could potentially encode the line number or the block
0 commit comments