@@ -103,19 +103,10 @@ fn generate_bindings(include_path: &Path) -> Result<bindgen::Bindings, Box<dyn E
103103 . allowlist_type ( "rbs_ast_members_prepend_t" )
104104 . allowlist_type ( "rbs_ast_members_private_t" )
105105 . allowlist_type ( "rbs_ast_members_public_t" )
106- . allowlist_type ( "rbs_ast_ruby_annotations_class_alias_annotation_t" )
107- . allowlist_type ( "rbs_ast_ruby_annotations_colon_method_type_annotation_t" )
108- . allowlist_type ( "rbs_ast_ruby_annotations_instance_variable_annotation_t" )
109- . allowlist_type ( "rbs_ast_ruby_annotations_method_types_annotation_t" )
110- . allowlist_type ( "rbs_ast_ruby_annotations_module_alias_annotation_t" )
111- . allowlist_type ( "rbs_ast_ruby_annotations_node_type_assertion_t" )
112- . allowlist_type ( "rbs_ast_ruby_annotations_return_type_annotation_t" )
113- . allowlist_type ( "rbs_ast_ruby_annotations_skip_annotation_t" )
114- . allowlist_type ( "rbs_ast_ruby_annotations_type_application_annotation_t" )
115- . allowlist_type ( "rbs_ast_ruby_annotations_block_param_type_annotation_t" )
116- . allowlist_type ( "rbs_ast_ruby_annotations_param_type_annotation_t" )
117- . allowlist_type ( "rbs_ast_ruby_annotations_splat_param_type_annotation_t" )
118- . allowlist_type ( "rbs_ast_ruby_annotations_double_splat_param_type_annotation_t" )
106+ // Match every `rbs_ast_ruby_annotations_*` struct (and the union itself)
107+ // so newly added annotation kinds do not require edits here. This keeps the
108+ // Rust bindings in sync with `config.yml` automatically.
109+ . allowlist_type ( "rbs_ast_ruby_annotations_.*" )
119110 . allowlist_type ( "rbs_ast_string_t" )
120111 . allowlist_type ( "rbs_ast_symbol_t" )
121112 . allowlist_type ( "rbs_ast_type_param_t" )
0 commit comments