mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-26 20:21:59 +00:00

This especially improves the developer experience for long chains of function calls that span multiple lines, which is common with builder patterns, chains of iterator/future combinators, etc.
36 lines
721 B
Rust
36 lines
721 B
Rust
//@ 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
|
|
}
|