From d46dbfc7d3767e548cd111a8d172d5732a35782d Mon Sep 17 00:00:00 2001 From: dianqk Date: Sat, 17 Jan 2026 20:31:54 +0800 Subject: [PATCH] Refine dummy_span.rs test --- tests/debuginfo/dummy_span.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/debuginfo/dummy_span.rs b/tests/debuginfo/dummy_span.rs index 6cf79c46d9a9e..c7b74068db97b 100644 --- a/tests/debuginfo/dummy_span.rs +++ b/tests/debuginfo/dummy_span.rs @@ -1,13 +1,11 @@ //@ min-lldb-version: 310 //@ compile-flags:-g -// FIXME: Investigate why test fails without SimplifyComparisonIntegral pass. -//@ compile-flags: -Zmir-enable-passes=+SimplifyComparisonIntegral //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -//@ gdb-command:run 7 +//@ gdb-command:run //@ gdb-command:next //@ gdb-command:next @@ -17,7 +15,7 @@ // === LLDB TESTS ================================================================================== -//@ lldb-command:run 7 +//@ lldb-command:run //@ lldb-command:next //@ lldb-command:next @@ -30,10 +28,15 @@ use std::env; use std::num::ParseIntError; +struct Foo; + +impl Drop for Foo { + fn drop(&mut self) {} +} + fn main() -> Result<(), ParseIntError> { - let args = env::args(); - let number_str = args.skip(1).next().unwrap(); - let number = number_str.parse::()?; + let foo = Foo; + let number = Ok(7)?; zzz(); // #break if number % 7 == 0 { // This generates code with a dummy span for @@ -41,7 +44,6 @@ fn main() -> Result<(), ParseIntError> { // test will not test what it wants to test. return Ok(()); // #loc1 } - println!("{}", number); Ok(()) } // #loc2