# Stack trace-friendly debug info for macros

**URL:** <https://internals.rust-lang.org/t/stack-trace-friendly-debug-info-for-macros/5370>\
**Category:** Uncategorized\
**Created:** [June 7, 2017, 11:12am UTC](https://internals.rust-lang.org/t/stack-trace-friendly-debug-info-for-macros/5370 "2017-06-07T11:12:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ixrec](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ixrec/32/6754_2.png) [@Ixrec](https://internals.rust-lang.org/u/Ixrec)\
**Post date:** [June 7, 2017, 6:56pm UTC](https://internals.rust-lang.org/t/stack-trace-friendly-debug-info-for-macros/5370/2 "2017-06-07T18:56:40Z")

</div>

This feels very similar to the problem where .unwrap() panics start their stack trace with implementation details of unwrap(): [Better panic location reporting for `unwrap()` and friends](https://internals.rust-lang.org/t/better-panic-location-reporting-for-unwrap-and-friends/5042)

I don’t think it’s possible to solve both of these problems in general without some kind of explicit annotation, so I’m wondering if we can have a single attribute like #[hide\_impl\_in\_panic\_stacks] that “just works” for both macros and methods.

---

_[View the full topic](https://internals.rust-lang.org/t/stack-trace-friendly-debug-info-for-macros/5370)._
