@@ -319,7 +319,7 @@ pub(crate) struct BindgenContext {
319319
320320 /// Maps from a cursor to the item ID of the named template type parameter
321321 /// for that cursor.
322- type_params : HashMap < clang :: Cursor , TypeId > ,
322+ type_params : HashMap < Cursor , TypeId > ,
323323
324324 /// A cursor to module map. Similar reason than above.
325325 modules : HashMap < Cursor , ModuleId > ,
@@ -336,7 +336,7 @@ pub(crate) struct BindgenContext {
336336 /// This is used to handle the cases where the semantic and the lexical
337337 /// parents of the cursor differ, like when a nested class is defined
338338 /// outside of the parent class.
339- semantic_parents : HashMap < clang :: Cursor , ItemId > ,
339+ semantic_parents : HashMap < Cursor , ItemId > ,
340340
341341 /// A stack with the current type declarations and types we're parsing. This
342342 /// is needed to avoid infinite recursion when parsing a type like:
@@ -810,11 +810,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
810810 }
811811
812812 /// Add a new named template type parameter to this context's item set.
813- pub ( crate ) fn add_type_param (
814- & mut self ,
815- item : Item ,
816- definition : clang:: Cursor ,
817- ) {
813+ pub ( crate ) fn add_type_param ( & mut self , item : Item , definition : Cursor ) {
818814 debug ! ( "BindgenContext::add_type_param: item = {item:?}; definition = {definition:?}" ) ;
819815
820816 assert ! (
@@ -846,10 +842,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
846842
847843 /// Get the named type defined at the given cursor location, if we've
848844 /// already added one.
849- pub ( crate ) fn get_type_param (
850- & self ,
851- definition : & clang:: Cursor ,
852- ) -> Option < TypeId > {
845+ pub ( crate ) fn get_type_param ( & self , definition : & Cursor ) -> Option < TypeId > {
853846 assert_eq ! (
854847 definition. kind( ) ,
855848 clang_sys:: CXCursor_TemplateTypeParameter
@@ -923,7 +916,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
923916 /// Gather all the unresolved type references.
924917 fn collect_typerefs (
925918 & mut self ,
926- ) -> Vec < ( ItemId , clang:: Type , clang :: Cursor , Option < ItemId > ) > {
919+ ) -> Vec < ( ItemId , clang:: Type , Cursor , Option < ItemId > ) > {
927920 debug_assert ! ( !self . collected_typerefs) ;
928921 self . collected_typerefs = true ;
929922 let mut typerefs = vec ! [ ] ;
@@ -1517,7 +1510,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
15171510 /// not sure it's worth it.
15181511 pub ( crate ) fn add_semantic_parent (
15191512 & mut self ,
1520- definition : clang :: Cursor ,
1513+ definition : Cursor ,
15211514 parent_id : ItemId ,
15221515 ) {
15231516 self . semantic_parents . insert ( definition, parent_id) ;
@@ -1526,7 +1519,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
15261519 /// Returns a known semantic parent for a given definition.
15271520 pub ( crate ) fn known_semantic_parent (
15281521 & self ,
1529- definition : clang :: Cursor ,
1522+ definition : Cursor ,
15301523 ) -> Option < ItemId > {
15311524 self . semantic_parents . get ( & definition) . copied ( )
15321525 }
@@ -1631,7 +1624,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
16311624 with_id : ItemId ,
16321625 template : TypeId ,
16331626 ty : & clang:: Type ,
1634- location : clang :: Cursor ,
1627+ location : Cursor ,
16351628 ) -> Option < TypeId > {
16361629 let num_expected_args =
16371630 self . resolve_type ( template) . num_self_template_params ( self ) ;
@@ -1856,7 +1849,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
18561849 with_id : ItemId ,
18571850 parent_id : Option < ItemId > ,
18581851 ty : & clang:: Type ,
1859- location : Option < clang :: Cursor > ,
1852+ location : Option < Cursor > ,
18601853 ) -> Option < TypeId > {
18611854 use clang_sys:: { CXCursor_TypeAliasTemplateDecl , CXCursor_TypeRef } ;
18621855 debug ! ( "builtin_or_resolved_ty: {ty:?}, {location:?}, {with_id:?}, {parent_id:?}" ) ;
@@ -2227,7 +2220,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
22272220 /// namespace.
22282221 fn tokenize_namespace (
22292222 & self ,
2230- cursor : & clang :: Cursor ,
2223+ cursor : & Cursor ,
22312224 ) -> ( Option < String > , ModuleKind ) {
22322225 assert_eq ! (
22332226 cursor. kind( ) ,
@@ -2306,7 +2299,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
23062299
23072300 /// Given a CXCursor_Namespace cursor, return the item ID of the
23082301 /// corresponding module, or create one on the fly.
2309- pub ( crate ) fn module ( & mut self , cursor : clang :: Cursor ) -> ModuleId {
2302+ pub ( crate ) fn module ( & mut self , cursor : Cursor ) -> ModuleId {
23102303 use clang_sys:: * ;
23112304 assert_eq ! ( cursor. kind( ) , CXCursor_Namespace , "Be a nice person" ) ;
23122305 let cursor = cursor. canonical ( ) ;
0 commit comments