Skip to content

Commit 74ff006

Browse files
Rollup merge of #147426 - Enselic:better-stepping, r=saethlin
tests/debuginfo/basic-stepping.rs: Add revisions `default-mir-passes`, `no-SingleUseConsts-mir-pass` To prevent regressions our test must cover the code both inside and outside of the `SingleUseConsts` MIR pass. Use revisions for that. We know this use case is sensitive to regressions because it already happened at least once. See #33013 (comment). CC #130896
2 parents 625b63f + 622572f commit 74ff006

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

tests/debuginfo/basic-stepping.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
//@ ignore-aarch64: Doesn't work yet.
66
//@ ignore-loongarch64: Doesn't work yet.
77
//@ ignore-riscv64: Doesn't work yet.
8-
//@ compile-flags: -g
98
//@ ignore-backends: gcc
109

10+
// Debugger tests need debuginfo
11+
//@ compile-flags: -g
12+
13+
// FIXME(#128945): SingleUseConsts shouldn't need to be disabled.
14+
//@ revisions: default-mir-passes no-SingleUseConsts-mir-pass
15+
//@ [no-SingleUseConsts-mir-pass] compile-flags: -Zmir-enable-passes=-SingleUseConsts
16+
1117
//@ gdb-command: run
1218
// FIXME(#97083): Should we be able to break on initialization of zero-sized types?
1319
// FIXME(#97083): Right now the first breakable line is:
1420
//@ gdb-check: let mut c = 27;
1521
//@ gdb-command: next
1622
//@ gdb-check: let d = c = 99;
1723
//@ gdb-command: next
18-
// FIXME(#33013): gdb-check: let e = "hi bob";
19-
// FIXME(#33013): gdb-command: next
20-
// FIXME(#33013): gdb-check: let f = b"hi bob";
21-
// FIXME(#33013): gdb-command: next
22-
// FIXME(#33013): gdb-check: let g = b'9';
23-
// FIXME(#33013): gdb-command: next
24+
//@ [no-SingleUseConsts-mir-pass] gdb-check: let e = "hi bob";
25+
//@ [no-SingleUseConsts-mir-pass] gdb-command: next
26+
//@ [no-SingleUseConsts-mir-pass] gdb-check: let f = b"hi bob";
27+
//@ [no-SingleUseConsts-mir-pass] gdb-command: next
28+
//@ [no-SingleUseConsts-mir-pass] gdb-check: let g = b'9';
29+
//@ [no-SingleUseConsts-mir-pass] gdb-command: next
2430
//@ gdb-check: let h = ["whatever"; 8];
2531
//@ gdb-command: next
2632
//@ gdb-check: let i = [1,2,3,4];

0 commit comments

Comments
 (0)