summaryrefslogtreecommitdiffstats
path: root/tests/debuginfo/generator-objects.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/debuginfo/generator-objects.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/debuginfo/generator-objects.rs')
-rw-r--r--tests/debuginfo/generator-objects.rs98
1 files changed, 0 insertions, 98 deletions
diff --git a/tests/debuginfo/generator-objects.rs b/tests/debuginfo/generator-objects.rs
deleted file mode 100644
index 11c4ae2f6..000000000
--- a/tests/debuginfo/generator-objects.rs
+++ /dev/null
@@ -1,98 +0,0 @@
-// Require a gdb that can read DW_TAG_variant_part.
-// min-gdb-version: 8.2
-
-// LLDB without native Rust support cannot read DW_TAG_variant_part,
-// so it prints nothing for generators. But those tests are kept to
-// ensure that LLDB won't crash at least (like #57822).
-
-// compile-flags:-g
-
-// === GDB TESTS ===================================================================================
-
-// gdb-command:run
-// gdb-command:print b
-// gdb-check:$1 = generator_objects::main::{generator_env#0}::Unresumed{_ref__a: 0x[...]}
-// gdb-command:continue
-// gdb-command:print b
-// gdb-check:$2 = generator_objects::main::{generator_env#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]}
-// gdb-command:continue
-// gdb-command:print b
-// gdb-check:$3 = generator_objects::main::{generator_env#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]}
-// gdb-command:continue
-// gdb-command:print b
-// gdb-check:$4 = generator_objects::main::{generator_env#0}::Returned{_ref__a: 0x[...]}
-
-// === LLDB TESTS ==================================================================================
-
-// lldb-command:run
-// lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $0 =
-// lldb-command:continue
-// lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $1 =
-// lldb-command:continue
-// lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $2 =
-// lldb-command:continue
-// lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $3 =
-
-// === CDB TESTS ===================================================================================
-
-// cdb-command: g
-// cdb-command: dx b
-// cdb-check: b : Unresumed [Type: enum2$<generator_objects::main::generator_env$0>]
-// cdb-check: [+0x[...]] _ref__a : 0x[...] : 5 [Type: int *]
-
-// cdb-command: g
-// cdb-command: dx b
-// cdb-check: b : Suspend0 [Type: enum2$<generator_objects::main::generator_env$0>]
-// cdb-check: [+0x[...]] c : 6 [Type: int]
-// cdb-check: [+0x[...]] d : 7 [Type: int]
-// cdb-check: [+0x[...]] _ref__a : 0x[...] : 5 [Type: int *]
-
-// cdb-command: g
-// cdb-command: dx b
-// cdb-check: b : Suspend1 [Type: enum2$<generator_objects::main::generator_env$0>]
-// cdb-check: [+0x[...]] c : 7 [Type: int]
-// cdb-check: [+0x[...]] d : 8 [Type: int]
-// cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *]
-
-// cdb-command: g
-// cdb-command: dx b
-// cdb-check: b : Returned [Type: enum2$<generator_objects::main::generator_env$0>]
-// cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *]
-
-#![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
-#![omit_gdb_pretty_printer_section]
-
-use std::ops::Generator;
-use std::pin::Pin;
-
-fn main() {
- let mut a = 5;
- let mut b = || {
- let mut c = 6;
- let mut d = 7;
-
- yield;
- a += 1;
- c += 1;
- d += 1;
-
- yield;
- println!("{} {} {}", a, c, d);
- };
- _zzz(); // #break
- Pin::new(&mut b).resume(());
- _zzz(); // #break
- Pin::new(&mut b).resume(());
- _zzz(); // #break
- Pin::new(&mut b).resume(());
- _zzz(); // #break
-}
-
-#[inline(never)]
-fn _zzz() {
- ()
-}