1 // This test makes sure that the LLDB pretty printer does not throw an exception
2 // for nested closures and generators.
4 // Require a gdb that can read DW_TAG_variant_part.
5 // min-gdb-version: 8.2
6 // ignore-tidy-linelength
10 // === GDB TESTS ===================================================================================
14 // gdb-command:print g
15 // gdb-check:$1 = issue_57822::main::closure-1 (issue_57822::main::closure-0 (1))
17 // gdb-command:print b
18 // gdb-check:$2 = issue_57822::main::generator-3 {__0: issue_57822::main::generator-2 {__0: 2, <<variant>>: {[...]}}, <<variant>>: {[...]}}
20 // === LLDB TESTS ==================================================================================
24 // lldb-command:print g
25 // lldbg-check:(issue_57822::main::closure-1) $0 = { 0 = { 0 = 1 } }
27 // lldb-command:print b
28 // lldbg-check:(issue_57822::main::generator-3) $1 = { 0 = { 0 = 2 } }
30 #![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
31 #![omit_gdb_pretty_printer_section]
33 use std::ops::Generator;
47 Pin::new(&mut a).resume(());