File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub struct Definitions {
105
105
/// we know what parent node that fragment should be attached to thanks to this table.
106
106
invocation_parents : FxHashMap < ExpnId , DefIndex > ,
107
107
/// Indices of unnamed struct or variant fields with unresolved attributes.
108
- pub ( super ) placeholder_field_indices : NodeMap < usize > ,
108
+ pub placeholder_field_indices : NodeMap < usize > ,
109
109
}
110
110
111
111
/// A unique identifier that we can use to lookup a definition
@@ -544,6 +544,15 @@ impl Definitions {
544
544
let old_parent = self . invocation_parents . insert ( invoc_id, parent) ;
545
545
assert ! ( old_parent. is_none( ) , "parent `DefIndex` is reset for an invocation" ) ;
546
546
}
547
+
548
+ pub fn placeholder_field_index ( & self , node_id : ast:: NodeId ) -> usize {
549
+ self . placeholder_field_indices [ & node_id]
550
+ }
551
+
552
+ pub fn set_placeholder_field_index ( & mut self , node_id : ast:: NodeId , index : usize ) {
553
+ let old_index = self . placeholder_field_indices . insert ( node_id, index) ;
554
+ assert ! ( old_index. is_none( ) , "placeholder field index is reset for a node ID" ) ;
555
+ }
547
556
}
548
557
549
558
impl DefPathData {
You can’t perform that action at this time.
0 commit comments