Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions tests/debuginfo/dummy_span.rs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,7 +15,7 @@

// === LLDB TESTS ==================================================================================

//@ lldb-command:run 7
//@ lldb-command:run

//@ lldb-command:next
//@ lldb-command:next
Expand All @@ -30,18 +28,22 @@
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::<i32>()?;
let foo = Foo;
let number = Ok(7)?;
zzz(); // #break
if number % 7 == 0 {
// This generates code with a dummy span for
// some reason. If that ever changes this
// test will not test what it wants to test.
return Ok(()); // #loc1
}
println!("{}", number);
Ok(())
} // #loc2

Expand Down
Loading