summaryrefslogtreecommitdiffstats
path: root/src/test/debuginfo/captured-fields-1.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/test/debuginfo/captured-fields-1.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/debuginfo/captured-fields-1.rs')
-rw-r--r--src/test/debuginfo/captured-fields-1.rs96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/test/debuginfo/captured-fields-1.rs b/src/test/debuginfo/captured-fields-1.rs
deleted file mode 100644
index afbf942d4..000000000
--- a/src/test/debuginfo/captured-fields-1.rs
+++ /dev/null
@@ -1,96 +0,0 @@
-// compile-flags:-g
-
-// === GDB TESTS ===================================================================================
-
-// gdb-command:run
-// gdb-command:print test
-// gdbr-check:$1 = captured_fields_1::main::{closure_env#0} {_ref__my_ref__my_field1: 0x[...]}
-// gdb-command:continue
-// gdb-command:print test
-// gdbr-check:$2 = captured_fields_1::main::{closure_env#1} {_ref__my_ref__my_field2: 0x[...]}
-// gdb-command:continue
-// gdb-command:print test
-// gdbr-check:$3 = captured_fields_1::main::{closure_env#2} {_ref__my_ref: 0x[...]}
-// gdb-command:continue
-// gdb-command:print test
-// gdbr-check:$4 = captured_fields_1::main::{closure_env#3} {my_ref: 0x[...]}
-// gdb-command:continue
-// gdb-command:print test
-// gdbr-check:$5 = captured_fields_1::main::{closure_env#4} {my_var__my_field2: 22}
-// gdb-command:continue
-// gdb-command:print test
-// gdbr-check:$6 = captured_fields_1::main::{closure_env#5} {my_var: captured_fields_1::MyStruct {my_field1: 11, my_field2: 22}}
-// gdb-command:continue
-
-// === LLDB TESTS ==================================================================================
-
-// lldb-command:run
-// lldb-command:print test
-// lldbg-check:(captured_fields_1::main::{closure_env#0}) $0 = { _ref__my_ref__my_field1 = 0x[...] }
-// lldb-command:continue
-// lldb-command:print test
-// lldbg-check:(captured_fields_1::main::{closure_env#1}) $1 = { _ref__my_ref__my_field2 = 0x[...] }
-// lldb-command:continue
-// lldb-command:print test
-// lldbg-check:(captured_fields_1::main::{closure_env#2}) $2 = { _ref__my_ref = 0x[...] }
-// lldb-command:continue
-// lldb-command:print test
-// lldbg-check:(captured_fields_1::main::{closure_env#3}) $3 = { my_ref = 0x[...] }
-// lldb-command:continue
-// lldb-command:print test
-// lldbg-check:(captured_fields_1::main::{closure_env#4}) $4 = { my_var__my_field2 = 22 }
-// lldb-command:continue
-// lldb-command:print test
-// lldbg-check:(captured_fields_1::main::{closure_env#5}) $5 = { my_var = { my_field1 = 11 my_field2 = 22 } }
-// lldb-command:continue
-
-#![feature(capture_disjoint_fields)]
-#![allow(unused)]
-
-struct MyStruct {
- my_field1: u32,
- my_field2: u32,
-}
-
-fn main() {
- let mut my_var = MyStruct { my_field1: 11, my_field2: 22 };
- let my_ref = &mut my_var;
-
- let test = || {
- let a = &mut my_ref.my_field1;
- };
-
- _zzz(); // #break
-
- let test = || {
- let a = &my_ref.my_field2;
- };
-
- _zzz(); // #break
-
- let test = || {
- let a = &my_ref;
- };
-
- _zzz(); // #break
-
- let test = || {
- let a = my_ref;
- };
-
- _zzz(); // #break
-
- let test = move || {
- let a = my_var.my_field2;
- };
-
- _zzz(); // #break
-
- let test = || {
- let a = my_var;
- };
-
- _zzz(); // #break
-}
-
-fn _zzz() {}