@@ -54,7 +54,7 @@ macro_rules! item_id_newtype {
5454 pub ( crate ) struct $name( ItemId ) ;
5555
5656 impl $name {
57- /// Create an `ItemResolver` from this id .
57+ /// Create an `ItemResolver` from this ID .
5858 #[ allow( dead_code) ]
5959 pub ( crate ) fn into_resolver( self ) -> ItemResolver {
6060 let id: ItemId = self . into( ) ;
@@ -127,7 +127,7 @@ item_id_newtype! {
127127 expected = expect_type_id,
128128
129129 /// Convert this `ItemId` into a `TypeId` without actually checking whether
130- /// this id actually points to a `Type`.
130+ /// this ID actually points to a `Type`.
131131 unchecked = as_type_id_unchecked;
132132}
133133
@@ -146,7 +146,7 @@ item_id_newtype! {
146146 expected = expect_module_id,
147147
148148 /// Convert this `ItemId` into a `ModuleId` without actually checking
149- /// whether this id actually points to a `Module`.
149+ /// whether this ID actually points to a `Module`.
150150 unchecked = as_module_id_unchecked;
151151}
152152
@@ -165,7 +165,7 @@ item_id_newtype! {
165165 expected = expect_var_id,
166166
167167 /// Convert this `ItemId` into a `VarId` without actually checking whether
168- /// this id actually points to a `Var`.
168+ /// this ID actually points to a `Var`.
169169 unchecked = as_var_id_unchecked;
170170}
171171
@@ -184,7 +184,7 @@ item_id_newtype! {
184184 expected = expect_function_id,
185185
186186 /// Convert this `ItemId` into a `FunctionId` without actually checking whether
187- /// this id actually points to a `Function`.
187+ /// this ID actually points to a `Function`.
188188 unchecked = as_function_id_unchecked;
189189}
190190
@@ -195,7 +195,7 @@ impl From<ItemId> for usize {
195195}
196196
197197impl ItemId {
198- /// Get a numeric representation of this id .
198+ /// Get a numeric representation of this ID .
199199 pub ( crate ) fn as_usize ( & self ) -> usize {
200200 ( * self ) . into ( )
201201 }
@@ -315,7 +315,7 @@ pub(crate) struct BindgenContext {
315315 /// item ids during parsing.
316316 types : HashMap < TypeKey , TypeId > ,
317317
318- /// Maps from a cursor to the item id of the named template type parameter
318+ /// Maps from a cursor to the item ID of the named template type parameter
319319 /// for that cursor.
320320 type_params : HashMap < clang:: Cursor , TypeId > ,
321321
@@ -328,7 +328,7 @@ pub(crate) struct BindgenContext {
328328 /// Current module being traversed.
329329 current_module : ModuleId ,
330330
331- /// A HashMap keyed on a type definition, and whose value is the parent id
331+ /// A HashMap keyed on a type definition, and whose value is the parent ID
332332 /// of the declaration.
333333 ///
334334 /// This is used to handle the cases where the semantic and the lexical
@@ -392,7 +392,7 @@ pub(crate) struct BindgenContext {
392392 /// It's computed right after computing the allowlisted items.
393393 codegen_items : Option < ItemSet > ,
394394
395- /// Map from an item's id to the set of template parameter items that it
395+ /// Map from an item's ID to the set of template parameter items that it
396396 /// uses. See `ir::named` for more details. Always `Some` during the codegen
397397 /// phase.
398398 used_template_parameters : Option < HashMap < ItemId , ItemSet > > ,
@@ -1086,7 +1086,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
10861086 // Relocate the replacement item from where it was declared, to
10871087 // where the thing it is replacing was declared.
10881088 //
1089- // First, we'll make sure that its parent id is correct.
1089+ // First, we'll make sure that its parent ID is correct.
10901090
10911091 let old_parent = self . resolve_item ( replacement_id) . parent_id ( ) ;
10921092 if new_parent == old_parent {
@@ -1272,7 +1272,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
12721272 self . sizedness = Some ( analyze :: < SizednessAnalysis > ( self ) ) ;
12731273 }
12741274
1275- /// Look up whether the type with the given id is sized or not.
1275+ /// Look up whether the type with the given ID is sized or not.
12761276 pub ( crate ) fn lookup_sizedness ( & self , id : TypeId ) -> SizednessResult {
12771277 assert ! (
12781278 self . in_codegen_phase( ) ,
@@ -1437,15 +1437,15 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14371437 self . root_module
14381438 }
14391439
1440- /// Resolve a type with the given id .
1440+ /// Resolve a type with the given ID .
14411441 ///
14421442 /// Panics if there is no item for the given `TypeId` or if the resolved
14431443 /// item is not a `Type`.
14441444 pub ( crate ) fn resolve_type ( & self , type_id : TypeId ) -> & Type {
14451445 self . resolve_item ( type_id) . kind ( ) . expect_type ( )
14461446 }
14471447
1448- /// Resolve a function with the given id .
1448+ /// Resolve a function with the given ID .
14491449 ///
14501450 /// Panics if there is no item for the given `FunctionId` or if the resolved
14511451 /// item is not a `Function`.
@@ -1454,9 +1454,9 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14541454 }
14551455
14561456 /// Resolve the given `ItemId` as a type, or `None` if there is no item with
1457- /// the given id .
1457+ /// the given ID .
14581458 ///
1459- /// Panics if the id resolves to an item that is not a type.
1459+ /// Panics if the ID resolves to an item that is not a type.
14601460 pub ( crate ) fn safe_resolve_type ( & self , type_id : TypeId ) -> Option < & Type > {
14611461 self . resolve_item_fallible ( type_id)
14621462 . map ( |t| t. kind ( ) . expect_type ( ) )
@@ -1473,7 +1473,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14731473
14741474 /// Resolve the given `ItemId` into an `Item`.
14751475 ///
1476- /// Panics if the given id does not resolve to any item.
1476+ /// Panics if the given ID does not resolve to any item.
14771477 pub ( crate ) fn resolve_item < Id : Into < ItemId > > ( & self , item_id : Id ) -> & Item {
14781478 let item_id = item_id. into ( ) ;
14791479 match self . resolve_item_fallible ( item_id) {
@@ -1658,7 +1658,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
16581658 clang_sys:: CXCursor_TypeRef |
16591659 clang_sys:: CXCursor_TypedefDecl |
16601660 clang_sys:: CXCursor_TypeAliasDecl => {
1661- // The `with_id` id will potentially end up unused if we give up
1661+ // The `with_id` ID will potentially end up unused if we give up
16621662 // on this type (for example, because it has const value
16631663 // template args), so if we pass `with_id` as the parent, it is
16641664 // potentially a dangling reference. Instead, use the canonical
@@ -1953,7 +1953,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
19531953 with_id. as_type_id_unchecked ( )
19541954 }
19551955
1956- /// Returns the next item id to be used for an item.
1956+ /// Returns the next item ID to be used for an item.
19571957 pub ( crate ) fn next_item_id ( & mut self ) -> ItemId {
19581958 let ret = ItemId ( self . items . len ( ) ) ;
19591959 self . items . push ( None ) ;
@@ -2055,7 +2055,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
20552055 self . in_codegen
20562056 }
20572057
2058- /// Mark the type with the given `name` as replaced by the type with id
2058+ /// Mark the type with the given `name` as replaced by the type with ID
20592059 /// `potential_ty`.
20602060 ///
20612061 /// Replacement types are declared using the `replaces="xxx"` annotation,
@@ -2185,7 +2185,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
21852185 ( module_name, kind)
21862186 }
21872187
2188- /// Given a CXCursor_Namespace cursor, return the item id of the
2188+ /// Given a CXCursor_Namespace cursor, return the item ID of the
21892189 /// corresponding module, or create one on the fly.
21902190 pub ( crate ) fn module ( & mut self , cursor : clang:: Cursor ) -> ModuleId {
21912191 use clang_sys:: * ;
@@ -2539,7 +2539,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
25392539 }
25402540 }
25412541
2542- // Find enums in this module, and record the id of each one that
2542+ // Find enums in this module, and record the ID of each one that
25432543 // has a typedef.
25442544 for child_id in module. children ( ) {
25452545 if let Some ( ItemKind :: Type ( ty) ) =
@@ -2837,7 +2837,7 @@ pub(crate) struct ItemResolver {
28372837}
28382838
28392839impl ItemId {
2840- /// Create an `ItemResolver` from this item id .
2840+ /// Create an `ItemResolver` from this item ID .
28412841 pub ( crate ) fn into_resolver ( self ) -> ItemResolver {
28422842 self . into ( )
28432843 }
@@ -2853,7 +2853,7 @@ where
28532853}
28542854
28552855impl ItemResolver {
2856- /// Construct a new `ItemResolver` from the given id .
2856+ /// Construct a new `ItemResolver` from the given ID .
28572857 pub ( crate ) fn new < Id : Into < ItemId > > ( id : Id ) -> ItemResolver {
28582858 let id = id. into ( ) ;
28592859 ItemResolver {
0 commit comments