diff options
| author | Pi Lanningham <pi.lanningham@gmail.com> | 2019-11-05 15:42:34 +0000 |
|---|---|---|
| committer | Pi Lanningham <pi.lanningham@gmail.com> | 2019-11-05 15:42:34 +0000 |
| commit | 15ccad399f5b157ccf4039d71dcb9b5aeec928da (patch) | |
| tree | b75b89aa92008ade0daae589d7f69564c4c366e2 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 7985510e37b91cab66a808ef6b3e4110e369dc9e (diff) | |
| download | rust-15ccad399f5b157ccf4039d71dcb9b5aeec928da.tar.gz rust-15ccad399f5b157ccf4039d71dcb9b5aeec928da.zip | |
Detect if item.span is in a macro, and fall back
If item.span is part of a macro invocation, this has several downstream implications. To name two that were found while working on this: - The dead-code error gets annotated with a "in this macro invocation" - Some errors get canceled if they refer to remote crates Ideally, we should annotate item.ident.span with the same macro info, but this is a larger change (see: #66095), so for now we just fall back to the old behavior if this item was generated by a macro. I use span.macro_backtrace().len() to detect if it's part of a macro, because that (among other things) is what is used by the code which adds the "in this macro invocation" annotations mentioned above.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
