diff options
| author | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2017-12-21 00:35:19 +0200 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2017-12-21 14:25:17 +0200 |
| commit | 9be593032d24758f2c80df3e85d27f10bf4127bb (patch) | |
| tree | d9a9a47eb1613cf02a6c49e59e9fe3e01f392feb /src/test/debuginfo/shadowed-variable.rs | |
| parent | 7eb64b86ce44cc1828dd176a8b981e37ea08fc38 (diff) | |
| download | rust-9be593032d24758f2c80df3e85d27f10bf4127bb.tar.gz rust-9be593032d24758f2c80df3e85d27f10bf4127bb.zip | |
fix debuginfo scoping of let-statements
Diffstat (limited to 'src/test/debuginfo/shadowed-variable.rs')
| -rw-r--r-- | src/test/debuginfo/shadowed-variable.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/debuginfo/shadowed-variable.rs b/src/test/debuginfo/shadowed-variable.rs index 4883853f72f..bf47ebe5aa7 100644 --- a/src/test/debuginfo/shadowed-variable.rs +++ b/src/test/debuginfo/shadowed-variable.rs @@ -34,6 +34,17 @@ // gdb-check:$6 = 20 // gdb-command:continue +// gdb-command:print x +// gdb-check:$5 = 10.5 +// gdb-command:print y +// gdb-check:$6 = 20 +// gdb-command:continue + +// gdb-command:print x +// gdb-check:$5 = 11.5 +// gdb-command:print y +// gdb-check:$6 = 20 +// gdb-command:continue // === LLDB TESTS ================================================================================== @@ -57,6 +68,18 @@ // lldb-check:[...]$5 = 20 // lldb-command:continue +// lldb-command:print x +// lldb-check:[...]$4 = 10.5 +// lldb-command:print y +// lldb-check:[...]$5 = 20 +// lldb-command:continue + +// lldb-command:print x +// lldb-check:[...]$4 = 11.5 +// lldb-command:print y +// lldb-check:[...]$5 = 20 +// lldb-command:continue + #![feature(omit_gdb_pretty_printer_section)] #![omit_gdb_pretty_printer_section] @@ -77,6 +100,15 @@ fn main() { zzz(); // #break sentinel(); + + let x = { + zzz(); // #break + sentinel(); + 11.5 + }; + + zzz(); // #break + sentinel() } fn zzz() {()} |
