Created
July 21, 2022 13:18
-
-
Save davidtwco/372742650b4ac207e7c9c320ca50aa0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ignore-lldb | |
// Regression test that functions which start with a macro invocation have line information which | |
// start from the first line. | |
// compile-flags:-g -Zdebug-macros | |
// === GDB TESTS =================================================================================== | |
// gdb-command:run | |
// gdb-command:next | |
// gdb-command:frame | |
// gdb-check:[...]#loc1[...] | |
// gdb-command:continue | |
fn one() { | |
println!("one"); | |
} | |
fn two() { | |
println!("two"); | |
} | |
fn three() { | |
println!("three"); | |
} | |
macro_rules! outer { | |
($b:block) => { | |
one(); // #loc1 | |
inner!(); | |
$b | |
}; | |
} | |
macro_rules! inner { | |
() => { | |
two(); | |
}; | |
} | |
fn main() { | |
outer!({ | |
three(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment