File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub struct Definitions {
105105 /// we know what parent node that fragment should be attached to thanks to this table.
106106 invocation_parents : FxHashMap < ExpnId , DefIndex > ,
107107 /// 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 > ,
109109}
110110
111111/// A unique identifier that we can use to lookup a definition
@@ -544,6 +544,15 @@ impl Definitions {
544544 let old_parent = self . invocation_parents . insert ( invoc_id, parent) ;
545545 assert ! ( old_parent. is_none( ) , "parent `DefIndex` is reset for an invocation" ) ;
546546 }
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+ }
547556}
548557
549558impl DefPathData {
You can’t perform that action at this time.
0 commit comments