1 // This test makes sure that the LLDB pretty printer does not throw an exception
2 // for nested closures and generators.
4 // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
5 // min-system-llvm-version: 8.0
6 // min-gdb-version: 8.2
7 // ignore-tidy-linelength
11 // === GDB TESTS ===================================================================================
15 // gdb-command:print g
16 // gdb-check:$1 = issue_57822::main::closure-1 (issue_57822::main::closure-0 (1))
18 // gdb-command:print b
19 // gdb-check:$2 = issue_57822::main::generator-3 {__0: issue_57822::main::generator-2 {__0: 2, <<variant>>: {[...]}}, <<variant>>: {[...]}}
21 // === LLDB TESTS ==================================================================================
25 // lldb-command:print g
26 // lldbg-check:(issue_57822::main::closure-1) $0 = closure-1(closure-0(1))
28 // lldb-command:print b
29 // lldbg-check:(issue_57822::main::generator-3) $1 = generator-3(generator-2(2))
31 #![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
32 #![omit_gdb_pretty_printer_section]
34 use std::ops::Generator;
48 Pin::new(&mut a).resume(());