Closed kornelski closed 10 months ago
This crate asks rustc to compile your code with debug info enabled, debug info contains bits like this:
.Ltmp20:
.file 6 "/rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/num" "uint_macros.rs"
.loc 6 2151 21
mov rcx, r12
shr rcx, 4
.file
introduces a new rust source, .loc
refers to a previously defined rust source. There's no references to the original code as far as I can see.
In that case, could you add an option to hide lines that come from libstd?
In that case, could you add an option to hide lines that come from libstd?
I pushed limit-src
branch. Is this what you had in mind?
Yes, that is much better. Thank you!
It seems that debug info and code locations are inlined along with the code. However, often this is counter-productive, because I don't see what my code does, and where assembly came from in my crate.
For example, arithmetic operations can look like this:
and slice operations can look like this:
But I'd prefer to see locations of lines with
1 << 8
andbuf[n..]
in my crate, rather than their raw desugared guts from libstd.Is this possible? I wonder if that's a feature request for this crate, or whether that's how
rustc
works, and needs to be changed there.