about summary refs log tree commit diff
path: root/tests/debuginfo/multiline-calls.rs
blob: 724ad29729fd2c69a9b2c1ce010f13dc216dff8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//@ compile-flags:-g
//@ min-gdb-version: 16.0

// === GDB TESTS ===================================================================================

// gdb-command: run
// gdb-check:[...]#break[...]
// gdb-command: up
// gdb-check:[...]zzz[...]

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

// lldb-command:run
// lldb-check:[...]#break[...]
// lldb-command: up
// lldb-check:[...]zzz[...]

struct Foo;

impl Foo {
    fn bar(self) -> Foo {
        println!("bar");
        self
    }
    fn baz(self) -> Foo {
        println!("baz"); // #break
        self
    }
}

fn main() {
    let f = Foo;
    f.bar()              // aaa
        .baz();          // zzz
}