File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,8 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
169
169
s. impls = self . get_impls ( id. expect_def_id ( ) )
170
170
} else if let types:: ItemEnum :: Enum ( ref mut e) = new_item. inner {
171
171
e. impls = self . get_impls ( id. expect_def_id ( ) )
172
+ } else if let types:: ItemEnum :: Union ( ref mut u) = new_item. inner {
173
+ u. impls = self . get_impls ( id. expect_def_id ( ) )
172
174
}
173
175
let removed = self . index . borrow_mut ( ) . insert ( from_item_id ( id) , new_item. clone ( ) ) ;
174
176
Original file line number Diff line number Diff line change
1
+ #![ no_std]
2
+
3
+ // @has impl.json "$.index[*][?(@.name=='Ux')].visibility" \"public\"
4
+ // @has - "$.index[*][?(@.name=='Ux')].kind" \"union\"
5
+ pub union Ux {
6
+ a : u32 ,
7
+ b : u64
8
+ }
9
+
10
+ // @has - "$.index[*][?(@.name=='Num')].visibility" \"public\"
11
+ // @has - "$.index[*][?(@.name=='Num')].kind" \"trait\"
12
+ pub trait Num { }
13
+
14
+ // @count - "$.index[*][?(@.name=='Ux')].inner.impls" 1
15
+ impl Num for Ux { }
You can’t perform that action at this time.
0 commit comments