about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorMatt Weber <30441572+mweber15@users.noreply.github.com>2022-11-18 13:41:53 -0500
committerMatt Weber <30441572+mweber15@users.noreply.github.com>2024-11-06 22:25:04 -0500
commitaf6b0deaf38f482c25f4553da24a83e3a18c48cb (patch)
tree0f8da2c501369db2ca1eb5fbef4000de066bfa0a /tests/codegen
parentc07797a85479143c711582f5548aa78d65a1dce0 (diff)
downloadrust-af6b0deaf38f482c25f4553da24a83e3a18c48cb.tar.gz
rust-af6b0deaf38f482c25f4553da24a83e3a18c48cb.zip
Add file and line metadata for struct/union members
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/issue-98678.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/codegen/issue-98678.rs b/tests/codegen/issue-98678.rs
index 2858452670b..f67a1e1908d 100644
--- a/tests/codegen/issue-98678.rs
+++ b/tests/codegen/issue-98678.rs
@@ -15,11 +15,16 @@ pub enum MyCppLikeEnum {
 }
 
 // CHECK: !DICompositeType({{.*"}}MyType{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
-pub struct MyType;
+pub struct MyType {
+    // CHECK: !DIDerivedType({{.*"}}i{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
+    i: i32,
+}
 
 // CHECK: !DICompositeType({{.*"}}MyUnion{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
 pub union MyUnion {
-    i: i32, // TODO fields are still wrong
+    // CHECK: !DIDerivedType({{.*"}}i{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
+    i: i32,
+    // CHECK: !DIDerivedType({{.*"}}f{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
     f: f32,
 }