Skip to content

Commit 2bedcc2

Browse files
committed
Auto merge of #151244 - dianqk:test-dummy-span, r=<try>
Refine dummy_span.rs test try-job: x86_64-gnu-llvm-20-3
2 parents 9f6cd6d + d46dbfc commit 2bedcc2

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

tests/debuginfo/dummy_span.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
//@ min-lldb-version: 310
22

33
//@ compile-flags:-g
4-
// FIXME: Investigate why test fails without SimplifyComparisonIntegral pass.
5-
//@ compile-flags: -Zmir-enable-passes=+SimplifyComparisonIntegral
64
//@ ignore-backends: gcc
75

86
// === GDB TESTS ===================================================================================
97

10-
//@ gdb-command:run 7
8+
//@ gdb-command:run
119

1210
//@ gdb-command:next
1311
//@ gdb-command:next
@@ -17,7 +15,7 @@
1715

1816
// === LLDB TESTS ==================================================================================
1917

20-
//@ lldb-command:run 7
18+
//@ lldb-command:run
2119

2220
//@ lldb-command:next
2321
//@ lldb-command:next
@@ -30,18 +28,22 @@
3028
use std::env;
3129
use std::num::ParseIntError;
3230

31+
struct Foo;
32+
33+
impl Drop for Foo {
34+
fn drop(&mut self) {}
35+
}
36+
3337
fn main() -> Result<(), ParseIntError> {
34-
let args = env::args();
35-
let number_str = args.skip(1).next().unwrap();
36-
let number = number_str.parse::<i32>()?;
38+
let foo = Foo;
39+
let number = Ok(7)?;
3740
zzz(); // #break
3841
if number % 7 == 0 {
3942
// This generates code with a dummy span for
4043
// some reason. If that ever changes this
4144
// test will not test what it wants to test.
4245
return Ok(()); // #loc1
4346
}
44-
println!("{}", number);
4547
Ok(())
4648
} // #loc2
4749

0 commit comments

Comments
 (0)