-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Associate source file position with closures #10350
Comments
Are you building with -Z debug-info ? That should make source files and line numbers show up. |
This shouldn't be that hard, I don't think. gdb would just need to know to dereference the fn pointer and look for debuginfo where it points to. |
Given: foo.rs: pub fn bar(x: || -> int) -> int {
x()
} bar.rs: extern mod foo;
fn main() {
let mut y = 2;
let x = || {
42 * 7 + y
};
y = 5;
foo::bar(x);
} Compiling with |
Does someone have a non-working case? |
My bad, I followed up on the thread not realizing -Z debug-info solves the problem. Now, if there was a flag to get stack trace outside GDB... but that's another issue. Thanks and apologies for needlessly opening the issue. |
enhance [`ifs_same_cond`] to warn same immutable method calls as well fixes: rust-lang#10272 --- changelog: Enhancement: [`ifs_same_cond`]: Now also detects immutable method calls. [rust-lang#10350](rust-lang/rust-clippy#10350) <!-- changelog_checked -->
Allow the source file and line number to be shown in stack traces (e.g. in GDB). See https://mail.mozilla.org/pipermail/rust-dev/2013-November/006356.html
The text was updated successfully, but these errors were encountered: