code_ownership 2.1.4 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1159) hide show
  1. checksums.yaml +4 -4
  2. data/.cargo/config +2 -2
  3. data/Cargo.lock +36 -86
  4. data/bin/codeownership +1 -0
  5. data/ext/cargo-vendor/bindgen-0.72.1/.cargo-checksum.json +1 -0
  6. data/ext/cargo-vendor/bindgen-0.72.1/.cargo_vcs_info.json +6 -0
  7. data/ext/cargo-vendor/bindgen-0.72.1/Cargo.lock +485 -0
  8. data/ext/cargo-vendor/bindgen-0.72.1/Cargo.toml +189 -0
  9. data/ext/cargo-vendor/bindgen-0.72.1/Cargo.toml.orig +72 -0
  10. data/ext/cargo-vendor/bindgen-0.72.1/README.md +89 -0
  11. data/ext/cargo-vendor/bindgen-0.72.1/build.rs +29 -0
  12. data/ext/cargo-vendor/bindgen-0.72.1/callbacks.rs +317 -0
  13. data/ext/cargo-vendor/bindgen-0.72.1/clang.rs +2448 -0
  14. data/ext/cargo-vendor/bindgen-0.72.1/codegen/bitfield_unit.rs +112 -0
  15. data/ext/cargo-vendor/bindgen-0.72.1/codegen/bitfield_unit_raw_ref_macros.rs +191 -0
  16. data/ext/cargo-vendor/bindgen-0.72.1/codegen/bitfield_unit_tests.rs +260 -0
  17. data/ext/cargo-vendor/bindgen-0.72.1/codegen/dyngen.rs +258 -0
  18. data/ext/cargo-vendor/bindgen-0.72.1/codegen/error.rs +52 -0
  19. data/ext/cargo-vendor/bindgen-0.72.1/codegen/helpers.rs +395 -0
  20. data/ext/cargo-vendor/bindgen-0.72.1/codegen/impl_debug.rs +243 -0
  21. data/ext/cargo-vendor/bindgen-0.72.1/codegen/impl_partialeq.rs +142 -0
  22. data/ext/cargo-vendor/bindgen-0.72.1/codegen/mod.rs +5991 -0
  23. data/ext/cargo-vendor/bindgen-0.72.1/codegen/postprocessing/merge_extern_blocks.rs +72 -0
  24. data/ext/cargo-vendor/bindgen-0.72.1/codegen/postprocessing/sort_semantically.rs +46 -0
  25. data/ext/cargo-vendor/bindgen-0.72.1/codegen/serialize.rs +443 -0
  26. data/ext/cargo-vendor/bindgen-0.72.1/codegen/struct_layout.rs +458 -0
  27. data/ext/cargo-vendor/bindgen-0.72.1/deps.rs +61 -0
  28. data/ext/cargo-vendor/bindgen-0.72.1/diagnostics.rs +146 -0
  29. data/ext/cargo-vendor/bindgen-0.72.1/extra_assertions.rs +17 -0
  30. data/ext/cargo-vendor/bindgen-0.72.1/features.rs +570 -0
  31. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/derive.rs +726 -0
  32. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/has_destructor.rs +175 -0
  33. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/has_float.rs +248 -0
  34. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/has_type_param_in_array.rs +242 -0
  35. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/has_vtable.rs +235 -0
  36. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/mod.rs +395 -0
  37. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/sizedness.rs +353 -0
  38. data/ext/cargo-vendor/bindgen-0.72.1/ir/analysis/template_params.rs +601 -0
  39. data/ext/cargo-vendor/bindgen-0.72.1/ir/annotations.rs +259 -0
  40. data/ext/cargo-vendor/bindgen-0.72.1/ir/comment.rs +100 -0
  41. data/ext/cargo-vendor/bindgen-0.72.1/ir/comp.rs +1921 -0
  42. data/ext/cargo-vendor/bindgen-0.72.1/ir/context.rs +3107 -0
  43. data/ext/cargo-vendor/bindgen-0.72.1/ir/derive.rs +130 -0
  44. data/ext/cargo-vendor/bindgen-0.72.1/ir/dot.rs +85 -0
  45. data/ext/cargo-vendor/bindgen-0.72.1/ir/enum_ty.rs +321 -0
  46. data/ext/cargo-vendor/bindgen-0.72.1/ir/function.rs +838 -0
  47. data/ext/cargo-vendor/bindgen-0.72.1/ir/int.rs +128 -0
  48. data/ext/cargo-vendor/bindgen-0.72.1/ir/item.rs +1994 -0
  49. data/ext/cargo-vendor/bindgen-0.72.1/ir/item_kind.rs +135 -0
  50. data/ext/cargo-vendor/bindgen-0.72.1/ir/layout.rs +126 -0
  51. data/ext/cargo-vendor/bindgen-0.72.1/ir/module.rs +96 -0
  52. data/ext/cargo-vendor/bindgen-0.72.1/ir/objc.rs +343 -0
  53. data/ext/cargo-vendor/bindgen-0.72.1/ir/template.rs +335 -0
  54. data/ext/cargo-vendor/bindgen-0.72.1/ir/traversal.rs +478 -0
  55. data/ext/cargo-vendor/bindgen-0.72.1/ir/ty.rs +1256 -0
  56. data/ext/cargo-vendor/bindgen-0.72.1/ir/var.rs +523 -0
  57. data/ext/cargo-vendor/bindgen-0.72.1/lib.rs +1422 -0
  58. data/ext/cargo-vendor/bindgen-0.72.1/log_stubs.rs +38 -0
  59. data/ext/cargo-vendor/bindgen-0.72.1/options/as_args.rs +52 -0
  60. data/ext/cargo-vendor/bindgen-0.72.1/options/cli.rs +1151 -0
  61. data/ext/cargo-vendor/bindgen-0.72.1/options/mod.rs +2286 -0
  62. data/ext/cargo-vendor/bindgen-0.72.1/regex_set.rs +199 -0
  63. data/ext/cargo-vendor/bindgen-0.72.1/time.rs +52 -0
  64. data/ext/cargo-vendor/codeowners-0.5.0/.cargo-checksum.json +1 -0
  65. data/ext/cargo-vendor/codeowners-0.5.0/.github/workflows/audit.yml +31 -0
  66. data/ext/cargo-vendor/codeowners-0.5.0/.github/workflows/ci.yml +180 -0
  67. data/ext/cargo-vendor/codeowners-0.5.0/.github/workflows/codeql.yml +21 -0
  68. data/ext/cargo-vendor/codeowners-0.5.0/Cargo.lock +1176 -0
  69. data/ext/cargo-vendor/codeowners-0.5.0/Cargo.toml +173 -0
  70. data/ext/cargo-vendor/codeowners-0.5.0/perf/README.md +204 -0
  71. data/ext/cargo-vendor/codeowners-0.5.0/perf/compare.sh +23 -0
  72. data/ext/cargo-vendor/codeowners-0.5.0/perf/run.sh +28 -0
  73. data/ext/cargo-vendor/codeowners-0.5.0/rust-toolchain.toml +4 -0
  74. data/ext/cargo-vendor/codeowners-0.5.0/src/bin/codeowners-perf.rs +719 -0
  75. data/ext/cargo-vendor/codeowners-0.5.0/src/cache/file.rs +179 -0
  76. data/ext/cargo-vendor/codeowners-0.5.0/src/cache/mod.rs +29 -0
  77. data/ext/cargo-vendor/codeowners-0.5.0/src/cache/noop.rs +26 -0
  78. data/ext/cargo-vendor/codeowners-0.5.0/src/cli.rs +138 -0
  79. data/ext/cargo-vendor/codeowners-0.5.0/src/main.rs +43 -0
  80. data/ext/cargo-vendor/codeowners-0.5.0/src/ownership/file_owner_resolver.rs +829 -0
  81. data/ext/cargo-vendor/codeowners-0.5.0/src/ownership/validator.rs +378 -0
  82. data/ext/cargo-vendor/codeowners-0.5.0/src/ownership.rs +243 -0
  83. data/ext/cargo-vendor/codeowners-0.5.0/src/project.rs +232 -0
  84. data/ext/cargo-vendor/codeowners-0.5.0/src/project_builder.rs +430 -0
  85. data/ext/cargo-vendor/codeowners-0.5.0/src/project_file_builder.rs +113 -0
  86. data/ext/cargo-vendor/codeowners-0.5.0/src/runner/api.rs +145 -0
  87. data/ext/cargo-vendor/codeowners-0.5.0/src/runner/types.rs +37 -0
  88. data/ext/cargo-vendor/codeowners-0.5.0/src/runner.rs +493 -0
  89. data/ext/cargo-vendor/codeowners-0.5.0/tests/annotation_in_unowned_team_glob_test.rs +64 -0
  90. data/ext/cargo-vendor/codeowners-0.5.0/tests/common/mod.rs +180 -0
  91. data/ext/cargo-vendor/codeowners-0.5.0/tests/directory_codeowner_github_team_test.rs +22 -0
  92. data/ext/cargo-vendor/codeowners-0.5.0/tests/empty_directory_codeowner_test.rs +26 -0
  93. data/ext/cargo-vendor/codeowners-0.5.0/tests/executable_name_config_test.rs +88 -0
  94. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/annotation_in_unowned_team_glob/.github/CODEOWNERS +18 -0
  95. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/annotation_in_unowned_team_glob/config/code_ownership.yml +4 -0
  96. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/annotation_in_unowned_team_glob/config/teams/alpha.yml +7 -0
  97. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/annotation_in_unowned_team_glob/config/teams/beta.yml +3 -0
  98. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/annotation_in_unowned_team_glob/ruby/app/services/alpha_owned.rb +2 -0
  99. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/annotation_in_unowned_team_glob/ruby/app/services/beta_owned.rb +4 -0
  100. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/custom_codeowners_path/docs/CODEOWNERS +14 -0
  101. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/custom_codeowners_path/expected/CODEOWNERS +14 -0
  102. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team/.github/CODEOWNERS +15 -0
  103. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team/app/by_handle/.codeowner +1 -0
  104. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team/app/by_handle/handled.rb +2 -0
  105. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team/app/by_name/named.rb +2 -0
  106. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/empty-directory-codeowner/.github/CODEOWNERS +14 -0
  107. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/empty-directory-codeowner/app/services/.codeowner +1 -0
  108. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/empty-directory-codeowner/app/services/nested/.codeowner +1 -0
  109. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/empty-directory-codeowner/app/services/nested/nested_file.rb +2 -0
  110. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/empty-directory-codeowner/config/code_ownership.yml +10 -0
  111. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/empty-directory-codeowner/config/teams/foo.yml +5 -0
  112. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/invalid-directory-codeowner/.github/CODEOWNERS +14 -0
  113. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/invalid-directory-codeowner/app/services/.codeowner +1 -0
  114. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/invalid-directory-codeowner/app/services/nested/.codeowner +1 -0
  115. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/invalid-directory-codeowner/app/services/nested/nested_file.rb +2 -0
  116. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/invalid-directory-codeowner/config/code_ownership.yml +10 -0
  117. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/invalid-directory-codeowner/config/teams/foo.yml +5 -0
  118. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/multiple-directory-owners/app/services/.codeowner +1 -0
  119. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/multiple-directory-owners/config/code_ownership.yml +10 -0
  120. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/multiple-directory-owners/config/teams/foo.yml +5 -0
  121. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/valid_project/.github/CODEOWNERS +41 -0
  122. data/ext/cargo-vendor/codeowners-0.5.0/tests/fixtures/valid_project_with_overrides/.github/CODEOWNERS +53 -0
  123. data/ext/cargo-vendor/codeowners-0.5.0/tests/global_gitignore_test.rs +50 -0
  124. data/ext/cargo-vendor/codeowners-0.5.0/tests/invalid_directory_codeowner_test.rs +26 -0
  125. data/ext/cargo-vendor/codeowners-0.5.0/tests/invalid_project_test.rs +174 -0
  126. data/ext/cargo-vendor/codeowners-0.5.0/tests/perf_harness_test.rs +245 -0
  127. data/ext/cargo-vendor/codeowners-0.5.0/tests/untracked_new_file_test.rs +63 -0
  128. data/ext/cargo-vendor/codeowners-0.5.0/tests/untracked_source_file_test.rs +40 -0
  129. data/ext/cargo-vendor/codeowners-0.5.0/tests/valid_project_test.rs +348 -0
  130. data/ext/cargo-vendor/error-stack-0.8.0/.cargo-checksum.json +1 -0
  131. data/ext/cargo-vendor/error-stack-0.8.0/.cargo_vcs_info.json +6 -0
  132. data/ext/cargo-vendor/error-stack-0.8.0/.justfile +16 -0
  133. data/ext/cargo-vendor/error-stack-0.8.0/CHANGELOG.md +158 -0
  134. data/ext/cargo-vendor/error-stack-0.8.0/Cargo.lock +733 -0
  135. data/ext/cargo-vendor/error-stack-0.8.0/Cargo.toml +389 -0
  136. data/ext/cargo-vendor/error-stack-0.8.0/Cargo.toml.orig +109 -0
  137. data/ext/cargo-vendor/error-stack-0.8.0/README.md +149 -0
  138. data/ext/cargo-vendor/error-stack-0.8.0/build.rs +28 -0
  139. data/ext/cargo-vendor/error-stack-0.8.0/examples/demo.rs +117 -0
  140. data/ext/cargo-vendor/error-stack-0.8.0/examples/detect.rs +68 -0
  141. data/ext/cargo-vendor/error-stack-0.8.0/examples/exit_code.rs +25 -0
  142. data/ext/cargo-vendor/error-stack-0.8.0/examples/parse_config.rs +51 -0
  143. data/ext/cargo-vendor/error-stack-0.8.0/src/compat/anyhow.rs +34 -0
  144. data/ext/cargo-vendor/error-stack-0.8.0/src/compat/eyre.rs +32 -0
  145. data/ext/cargo-vendor/error-stack-0.8.0/src/compat/mod.rs +34 -0
  146. data/ext/cargo-vendor/error-stack-0.8.0/src/context.rs +52 -0
  147. data/ext/cargo-vendor/error-stack-0.8.0/src/error.rs +40 -0
  148. data/ext/cargo-vendor/error-stack-0.8.0/src/ext/iter.rs +286 -0
  149. data/ext/cargo-vendor/error-stack-0.8.0/src/ext/mod.rs +19 -0
  150. data/ext/cargo-vendor/error-stack-0.8.0/src/ext/stream.rs +212 -0
  151. data/ext/cargo-vendor/error-stack-0.8.0/src/ext/tuple.rs +218 -0
  152. data/ext/cargo-vendor/error-stack-0.8.0/src/fmt/charset.rs +114 -0
  153. data/ext/cargo-vendor/error-stack-0.8.0/src/fmt/color.rs +330 -0
  154. data/ext/cargo-vendor/error-stack-0.8.0/src/fmt/config.rs +67 -0
  155. data/ext/cargo-vendor/error-stack-0.8.0/src/fmt/hook.rs +544 -0
  156. data/ext/cargo-vendor/error-stack-0.8.0/src/fmt/location.rs +33 -0
  157. data/ext/cargo-vendor/error-stack-0.8.0/src/fmt/mod.rs +1187 -0
  158. data/ext/cargo-vendor/error-stack-0.8.0/src/frame/frame_impl.rs +259 -0
  159. data/ext/cargo-vendor/error-stack-0.8.0/src/frame/kind.rs +38 -0
  160. data/ext/cargo-vendor/error-stack-0.8.0/src/frame/mod.rs +120 -0
  161. data/ext/cargo-vendor/error-stack-0.8.0/src/future.rs +301 -0
  162. data/ext/cargo-vendor/error-stack-0.8.0/src/hook/context.rs +363 -0
  163. data/ext/cargo-vendor/error-stack-0.8.0/src/hook/mod.rs +240 -0
  164. data/ext/cargo-vendor/error-stack-0.8.0/src/iter.rs +224 -0
  165. data/ext/cargo-vendor/error-stack-0.8.0/src/lib.rs +557 -0
  166. data/ext/cargo-vendor/error-stack-0.8.0/src/macros.rs +212 -0
  167. data/ext/cargo-vendor/error-stack-0.8.0/src/report.rs +1058 -0
  168. data/ext/cargo-vendor/error-stack-0.8.0/src/result.rs +137 -0
  169. data/ext/cargo-vendor/error-stack-0.8.0/src/serde.rs +169 -0
  170. data/ext/cargo-vendor/error-stack-0.8.0/src/sink.rs +672 -0
  171. data/ext/cargo-vendor/error-stack-0.8.0/tests/common.rs +354 -0
  172. data/ext/cargo-vendor/error-stack-0.8.0/tests/compiletest.rs +22 -0
  173. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__charset_ascii.snap +9 -0
  174. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__charset_utf8.snap +9 -0
  175. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__diagnostics_add.snap +10 -0
  176. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__doc.snap +12 -0
  177. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__emit.snap +16 -0
  178. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__emit_alt.snap +28 -0
  179. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__hookcontext_cast.snap +11 -0
  180. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__hookcontext_decrement.snap +10 -0
  181. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__hookcontext_emit.snap +16 -0
  182. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__hookcontext_increment.snap +10 -0
  183. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__hookcontext_storage.snap +10 -0
  184. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__preference_color.snap +9 -0
  185. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__preference_emphasis.snap +9 -0
  186. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt__preference_none.snap +9 -0
  187. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/fmt_doc_alt.snap +15 -0
  188. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/hook__debug_hook.snap +9 -0
  189. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/hook__debug_hook_provide.snap +10 -0
  190. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/lib__suggestion.snap +13 -0
  191. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/doc/report_debug__doc.snap +14 -0
  192. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__complex.snap +49 -0
  193. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__hook_location.snap +15 -0
  194. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__linear.snap +27 -0
  195. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__linear_ext.snap +27 -0
  196. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__multiline_context.snap +25 -0
  197. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__sources.snap +48 -0
  198. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__full__sources_transparent.snap +50 -0
  199. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__sources_nested.snap +78 -0
  200. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__sources_nested@spantrace-backtrace.snap +128 -0
  201. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__sources_nested_alternate.snap +78 -0
  202. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_debug__sources_nested_alternate@spantrace-backtrace.snap +128 -0
  203. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_serialize__attachment.snap +13 -0
  204. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_serialize__context.snap +19 -0
  205. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_serialize__multiple_sources.snap +30 -0
  206. data/ext/cargo-vendor/error-stack-0.8.0/tests/snapshots/test_serialize__multiple_sources_at_root.snap +20 -0
  207. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_attach.rs +94 -0
  208. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_attach_printable.rs +73 -0
  209. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_backtrace.rs +61 -0
  210. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_change_context.rs +90 -0
  211. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_compatibility.rs +224 -0
  212. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_conversion.rs +134 -0
  213. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_debug.rs +628 -0
  214. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_display.rs +31 -0
  215. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_downcast.rs +101 -0
  216. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_extend.rs +99 -0
  217. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_frame.rs +136 -0
  218. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_iter.rs +132 -0
  219. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_macros.rs +68 -0
  220. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_provision.rs +52 -0
  221. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_serialize.rs +70 -0
  222. data/ext/cargo-vendor/error-stack-0.8.0/tests/test_span_trace.rs +91 -0
  223. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/attach_diagnostics.rs +21 -0
  224. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/attach_diagnostics.stderr +23 -0
  225. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/frames_mut_escape.rs +28 -0
  226. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/frames_mut_escape.stderr +13 -0
  227. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/macro_invalid_args.rs +32 -0
  228. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/macro_invalid_args.stderr +132 -0
  229. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/missing_args.rs +32 -0
  230. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/missing_args.stderr +35 -0
  231. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/must_use.rs +20 -0
  232. data/ext/cargo-vendor/error-stack-0.8.0/tests/ui/must_use.stderr +15 -0
  233. data/ext/cargo-vendor/rb-sys-0.9.130/.cargo-checksum.json +1 -0
  234. data/ext/cargo-vendor/rb-sys-0.9.130/.cargo_vcs_info.json +6 -0
  235. data/ext/cargo-vendor/rb-sys-0.9.130/Cargo.lock +385 -0
  236. data/ext/cargo-vendor/rb-sys-0.9.130/Cargo.toml +71 -0
  237. data/ext/cargo-vendor/rb-sys-0.9.130/Cargo.toml.orig +58 -0
  238. data/ext/cargo-vendor/rb-sys-0.9.130/build/main.rs +292 -0
  239. data/ext/cargo-vendor/rb-sys-0.9.130/build/stable_api_config.rs +179 -0
  240. data/ext/cargo-vendor/rb-sys-0.9.130/build/version.rs +58 -0
  241. data/ext/cargo-vendor/rb-sys-0.9.130/src/bindings.rs +22 -0
  242. data/ext/cargo-vendor/rb-sys-0.9.130/src/macros.rs +701 -0
  243. data/ext/cargo-vendor/rb-sys-0.9.130/src/memory.rs +64 -0
  244. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/compiled.c +338 -0
  245. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/compiled.rs +452 -0
  246. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_2_7.rs +770 -0
  247. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_0.rs +773 -0
  248. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_1.rs +766 -0
  249. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_2.rs +764 -0
  250. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_3.rs +777 -0
  251. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_4.rs +788 -0
  252. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_4_0.rs +784 -0
  253. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api.rs +465 -0
  254. data/ext/cargo-vendor/rb-sys-0.9.130/src/utils.rs +94 -0
  255. data/ext/cargo-vendor/rb-sys-build-0.9.130/.cargo-checksum.json +1 -0
  256. data/ext/cargo-vendor/rb-sys-build-0.9.130/.cargo_vcs_info.json +6 -0
  257. data/ext/cargo-vendor/rb-sys-build-0.9.130/Cargo.lock +286 -0
  258. data/ext/cargo-vendor/rb-sys-build-0.9.130/Cargo.toml +76 -0
  259. data/ext/cargo-vendor/rb-sys-build-0.9.130/Cargo.toml.orig +33 -0
  260. data/ext/cargo-vendor/rb-sys-build-0.9.130/src/bindings/gc_stress.rs +303 -0
  261. data/ext/cargo-vendor/rb-sys-build-0.9.130/src/bindings/stable_api.rs +297 -0
  262. data/ext/cargo-vendor/rb-sys-build-0.9.130/src/bindings.rs +292 -0
  263. data/ext/cargo-vendor/rb-sys-build-0.9.130/src/cc.rs +421 -0
  264. data/ext/cargo-vendor/rb-sys-build-0.9.130/src/rb_config.rs +1060 -0
  265. data/ext/cargo-vendor/rb-sys-build-0.9.130/tests/fixtures/rubyopt_stdout.rb +1 -0
  266. data/ext/cargo-vendor/rb-sys-build-0.9.130/tests/rubyopt.rs +17 -0
  267. data/ext/cargo-vendor/rb-sys-env-0.2.3/.cargo-checksum.json +1 -0
  268. data/ext/cargo-vendor/rb-sys-env-0.2.3/.cargo_vcs_info.json +6 -0
  269. data/ext/cargo-vendor/rb-sys-env-0.2.3/Cargo.lock +7 -0
  270. data/ext/cargo-vendor/rb-sys-env-0.2.3/Cargo.toml +33 -0
  271. data/ext/cargo-vendor/rb-sys-env-0.2.3/Cargo.toml.orig +14 -0
  272. data/ext/cargo-vendor/rb-sys-env-0.2.3/readme.md +117 -0
  273. data/ext/cargo-vendor/rb-sys-env-0.2.3/src/ruby_version.rs +165 -0
  274. data/ext/cargo-vendor/rustc-hash-2.1.3/.cargo-checksum.json +1 -0
  275. data/ext/cargo-vendor/rustc-hash-2.1.3/.cargo_vcs_info.json +6 -0
  276. data/ext/cargo-vendor/rustc-hash-2.1.3/.github/workflows/rust.yml +73 -0
  277. data/ext/cargo-vendor/rustc-hash-2.1.3/CHANGELOG.md +41 -0
  278. data/ext/cargo-vendor/rustc-hash-2.1.3/CODE_OF_CONDUCT.md +3 -0
  279. data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.lock +90 -0
  280. data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.toml +50 -0
  281. data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.toml.orig +20 -0
  282. data/ext/cargo-vendor/rustc-hash-2.1.3/LICENSE-APACHE +176 -0
  283. data/ext/cargo-vendor/rustc-hash-2.1.3/LICENSE-MIT +23 -0
  284. data/ext/cargo-vendor/rustc-hash-2.1.3/README.md +42 -0
  285. data/ext/cargo-vendor/rustc-hash-2.1.3/src/lib.rs +472 -0
  286. data/ext/cargo-vendor/rustc-hash-2.1.3/src/random_state.rs +101 -0
  287. data/ext/cargo-vendor/rustc-hash-2.1.3/src/seeded_state.rs +76 -0
  288. data/ext/cargo-vendor/serde-1.0.229/.cargo-checksum.json +1 -0
  289. data/ext/cargo-vendor/serde-1.0.229/.cargo_vcs_info.json +6 -0
  290. data/ext/cargo-vendor/serde-1.0.229/Cargo.lock +66 -0
  291. data/ext/cargo-vendor/serde-1.0.229/Cargo.toml +84 -0
  292. data/ext/cargo-vendor/serde-1.0.229/Cargo.toml.orig +62 -0
  293. data/ext/cargo-vendor/serde-1.0.229/README.md +114 -0
  294. data/ext/cargo-vendor/serde-1.0.229/build.rs +69 -0
  295. data/ext/cargo-vendor/serde-1.0.229/src/core/de/impls.rs +3173 -0
  296. data/ext/cargo-vendor/serde-1.0.229/src/core/lib.rs +121 -0
  297. data/ext/cargo-vendor/serde-1.0.229/src/lib.rs +285 -0
  298. data/ext/cargo-vendor/serde_core-1.0.229/.cargo-checksum.json +1 -0
  299. data/ext/cargo-vendor/serde_core-1.0.229/.cargo_vcs_info.json +6 -0
  300. data/ext/cargo-vendor/serde_core-1.0.229/Cargo.lock +63 -0
  301. data/ext/cargo-vendor/serde_core-1.0.229/Cargo.toml +87 -0
  302. data/ext/cargo-vendor/serde_core-1.0.229/Cargo.toml.orig +70 -0
  303. data/ext/cargo-vendor/serde_core-1.0.229/build.rs +113 -0
  304. data/ext/cargo-vendor/serde_core-1.0.229/src/de/impls.rs +3173 -0
  305. data/ext/cargo-vendor/serde_core-1.0.229/src/lib.rs +121 -0
  306. data/ext/cargo-vendor/serde_derive-1.0.229/.cargo-checksum.json +1 -0
  307. data/ext/cargo-vendor/serde_derive-1.0.229/.cargo_vcs_info.json +6 -0
  308. data/ext/cargo-vendor/serde_derive-1.0.229/Cargo.lock +88 -0
  309. data/ext/cargo-vendor/serde_derive-1.0.229/Cargo.toml +87 -0
  310. data/ext/cargo-vendor/serde_derive-1.0.229/Cargo.toml.orig +42 -0
  311. data/ext/cargo-vendor/serde_derive-1.0.229/README.md +114 -0
  312. data/ext/cargo-vendor/serde_derive-1.0.229/src/bound.rs +431 -0
  313. data/ext/cargo-vendor/serde_derive-1.0.229/src/de/enum_adjacently.rs +324 -0
  314. data/ext/cargo-vendor/serde_derive-1.0.229/src/de/enum_externally.rs +213 -0
  315. data/ext/cargo-vendor/serde_derive-1.0.229/src/de.rs +976 -0
  316. data/ext/cargo-vendor/serde_derive-1.0.229/src/internals/ast.rs +225 -0
  317. data/ext/cargo-vendor/serde_derive-1.0.229/src/internals/attr.rs +1818 -0
  318. data/ext/cargo-vendor/serde_derive-1.0.229/src/internals/ctxt.rs +67 -0
  319. data/ext/cargo-vendor/serde_derive-1.0.229/src/internals/receiver.rs +293 -0
  320. data/ext/cargo-vendor/serde_derive-1.0.229/src/lib.rs +127 -0
  321. data/ext/cargo-vendor/serde_derive-1.0.229/src/pretend.rs +188 -0
  322. data/ext/cargo-vendor/serde_derive-1.0.229/src/ser.rs +1369 -0
  323. data/ext/cargo-vendor/serde_magnus-0.11.0/.cargo-checksum.json +1 -0
  324. data/ext/cargo-vendor/serde_magnus-0.11.0/.cargo_vcs_info.json +6 -0
  325. data/ext/cargo-vendor/serde_magnus-0.11.0/Cargo.lock +385 -0
  326. data/ext/cargo-vendor/serde_magnus-0.11.0/Cargo.toml +162 -0
  327. data/ext/cargo-vendor/serde_magnus-0.11.0/Cargo.toml.orig +28 -0
  328. data/ext/cargo-vendor/serde_magnus-0.11.0/README.md +121 -0
  329. data/ext/cargo-vendor/serde_magnus-0.11.0/src/de/deserializer.rs +185 -0
  330. data/ext/cargo-vendor/syn-3.0.9/.cargo-checksum.json +1 -0
  331. data/ext/cargo-vendor/syn-3.0.9/.cargo_vcs_info.json +6 -0
  332. data/ext/cargo-vendor/syn-3.0.9/Cargo.lock +1948 -0
  333. data/ext/cargo-vendor/syn-3.0.9/Cargo.toml +268 -0
  334. data/ext/cargo-vendor/syn-3.0.9/Cargo.toml.orig +95 -0
  335. data/ext/cargo-vendor/syn-3.0.9/LICENSE-APACHE +176 -0
  336. data/ext/cargo-vendor/syn-3.0.9/README.md +297 -0
  337. data/ext/cargo-vendor/syn-3.0.9/benches/file.rs +59 -0
  338. data/ext/cargo-vendor/syn-3.0.9/benches/rust.rs +189 -0
  339. data/ext/cargo-vendor/syn-3.0.9/src/attr.rs +841 -0
  340. data/ext/cargo-vendor/syn-3.0.9/src/bigint.rs +68 -0
  341. data/ext/cargo-vendor/syn-3.0.9/src/buffer.rs +462 -0
  342. data/ext/cargo-vendor/syn-3.0.9/src/classify.rs +311 -0
  343. data/ext/cargo-vendor/syn-3.0.9/src/custom_keyword.rs +260 -0
  344. data/ext/cargo-vendor/syn-3.0.9/src/custom_punctuation.rs +305 -0
  345. data/ext/cargo-vendor/syn-3.0.9/src/data.rs +489 -0
  346. data/ext/cargo-vendor/syn-3.0.9/src/derive.rs +260 -0
  347. data/ext/cargo-vendor/syn-3.0.9/src/discouraged.rs +233 -0
  348. data/ext/cargo-vendor/syn-3.0.9/src/drops.rs +58 -0
  349. data/ext/cargo-vendor/syn-3.0.9/src/error.rs +552 -0
  350. data/ext/cargo-vendor/syn-3.0.9/src/export.rs +73 -0
  351. data/ext/cargo-vendor/syn-3.0.9/src/expr.rs +4249 -0
  352. data/ext/cargo-vendor/syn-3.0.9/src/ext.rs +180 -0
  353. data/ext/cargo-vendor/syn-3.0.9/src/file.rs +136 -0
  354. data/ext/cargo-vendor/syn-3.0.9/src/fixup.rs +773 -0
  355. data/ext/cargo-vendor/syn-3.0.9/src/gen/clone.rs +2394 -0
  356. data/ext/cargo-vendor/syn-3.0.9/src/gen/debug.rs +3399 -0
  357. data/ext/cargo-vendor/syn-3.0.9/src/gen/eq.rs +2459 -0
  358. data/ext/cargo-vendor/syn-3.0.9/src/gen/fold.rs +3934 -0
  359. data/ext/cargo-vendor/syn-3.0.9/src/gen/hash.rs +3040 -0
  360. data/ext/cargo-vendor/syn-3.0.9/src/gen/token.css +744 -0
  361. data/ext/cargo-vendor/syn-3.0.9/src/gen/visit.rs +4037 -0
  362. data/ext/cargo-vendor/syn-3.0.9/src/gen/visit_mut.rs +3824 -0
  363. data/ext/cargo-vendor/syn-3.0.9/src/generics.rs +1490 -0
  364. data/ext/cargo-vendor/syn-3.0.9/src/group.rs +294 -0
  365. data/ext/cargo-vendor/syn-3.0.9/src/ident.rs +109 -0
  366. data/ext/cargo-vendor/syn-3.0.9/src/item.rs +3923 -0
  367. data/ext/cargo-vendor/syn-3.0.9/src/lib.rs +1132 -0
  368. data/ext/cargo-vendor/syn-3.0.9/src/lifetime.rs +193 -0
  369. data/ext/cargo-vendor/syn-3.0.9/src/lit.rs +1881 -0
  370. data/ext/cargo-vendor/syn-3.0.9/src/lookahead.rs +350 -0
  371. data/ext/cargo-vendor/syn-3.0.9/src/mac.rs +225 -0
  372. data/ext/cargo-vendor/syn-3.0.9/src/macros.rs +151 -0
  373. data/ext/cargo-vendor/syn-3.0.9/src/meta.rs +427 -0
  374. data/ext/cargo-vendor/syn-3.0.9/src/op.rs +219 -0
  375. data/ext/cargo-vendor/syn-3.0.9/src/parse.rs +1420 -0
  376. data/ext/cargo-vendor/syn-3.0.9/src/parse_macro_input.rs +128 -0
  377. data/ext/cargo-vendor/syn-3.0.9/src/parse_quote.rs +261 -0
  378. data/ext/cargo-vendor/syn-3.0.9/src/pat.rs +994 -0
  379. data/ext/cargo-vendor/syn-3.0.9/src/path.rs +972 -0
  380. data/ext/cargo-vendor/syn-3.0.9/src/precedence.rs +210 -0
  381. data/ext/cargo-vendor/syn-3.0.9/src/print.rs +16 -0
  382. data/ext/cargo-vendor/syn-3.0.9/src/punctuated.rs +1200 -0
  383. data/ext/cargo-vendor/syn-3.0.9/src/restriction.rs +160 -0
  384. data/ext/cargo-vendor/syn-3.0.9/src/scan_expr.rs +270 -0
  385. data/ext/cargo-vendor/syn-3.0.9/src/sealed.rs +4 -0
  386. data/ext/cargo-vendor/syn-3.0.9/src/span.rs +63 -0
  387. data/ext/cargo-vendor/syn-3.0.9/src/spanned.rs +118 -0
  388. data/ext/cargo-vendor/syn-3.0.9/src/stmt.rs +536 -0
  389. data/ext/cargo-vendor/syn-3.0.9/src/thread.rs +60 -0
  390. data/ext/cargo-vendor/syn-3.0.9/src/token.rs +1103 -0
  391. data/ext/cargo-vendor/syn-3.0.9/src/tt.rs +97 -0
  392. data/ext/cargo-vendor/syn-3.0.9/src/ty.rs +1347 -0
  393. data/ext/cargo-vendor/syn-3.0.9/src/verbatim.rs +32 -0
  394. data/ext/cargo-vendor/syn-3.0.9/src/whitespace.rs +65 -0
  395. data/ext/cargo-vendor/syn-3.0.9/tests/common/eq.rs +939 -0
  396. data/ext/cargo-vendor/syn-3.0.9/tests/common/mod.rs +6 -0
  397. data/ext/cargo-vendor/syn-3.0.9/tests/common/parse.rs +51 -0
  398. data/ext/cargo-vendor/syn-3.0.9/tests/common/visit.rs +119 -0
  399. data/ext/cargo-vendor/syn-3.0.9/tests/debug/gen.rs +5394 -0
  400. data/ext/cargo-vendor/syn-3.0.9/tests/debug/mod.rs +147 -0
  401. data/ext/cargo-vendor/syn-3.0.9/tests/macros/mod.rs +7 -0
  402. data/ext/cargo-vendor/syn-3.0.9/tests/regression/issue1108.rs +5 -0
  403. data/ext/cargo-vendor/syn-3.0.9/tests/regression/issue1235.rs +32 -0
  404. data/ext/cargo-vendor/syn-3.0.9/tests/regression.rs +5 -0
  405. data/ext/cargo-vendor/syn-3.0.9/tests/repo/mod.rs +789 -0
  406. data/ext/cargo-vendor/syn-3.0.9/tests/repo/progress.rs +37 -0
  407. data/ext/cargo-vendor/syn-3.0.9/tests/snapshot/mod.rs +68 -0
  408. data/ext/cargo-vendor/syn-3.0.9/tests/test_attribute.rs +231 -0
  409. data/ext/cargo-vendor/syn-3.0.9/tests/test_derive_input.rs +801 -0
  410. data/ext/cargo-vendor/syn-3.0.9/tests/test_expr.rs +1721 -0
  411. data/ext/cargo-vendor/syn-3.0.9/tests/test_generics.rs +363 -0
  412. data/ext/cargo-vendor/syn-3.0.9/tests/test_grouping.rs +59 -0
  413. data/ext/cargo-vendor/syn-3.0.9/tests/test_ident.rs +87 -0
  414. data/ext/cargo-vendor/syn-3.0.9/tests/test_item.rs +374 -0
  415. data/ext/cargo-vendor/syn-3.0.9/tests/test_lit.rs +335 -0
  416. data/ext/cargo-vendor/syn-3.0.9/tests/test_meta.rs +180 -0
  417. data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_buffer.rs +104 -0
  418. data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_quote.rs +175 -0
  419. data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_stream.rs +187 -0
  420. data/ext/cargo-vendor/syn-3.0.9/tests/test_pat.rs +158 -0
  421. data/ext/cargo-vendor/syn-3.0.9/tests/test_path.rs +117 -0
  422. data/ext/cargo-vendor/syn-3.0.9/tests/test_precedence.rs +560 -0
  423. data/ext/cargo-vendor/syn-3.0.9/tests/test_punctuated.rs +92 -0
  424. data/ext/cargo-vendor/syn-3.0.9/tests/test_receiver.rs +275 -0
  425. data/ext/cargo-vendor/syn-3.0.9/tests/test_round_trip.rs +226 -0
  426. data/ext/cargo-vendor/syn-3.0.9/tests/test_shebang.rs +77 -0
  427. data/ext/cargo-vendor/syn-3.0.9/tests/test_size.rs +54 -0
  428. data/ext/cargo-vendor/syn-3.0.9/tests/test_stmt.rs +378 -0
  429. data/ext/cargo-vendor/syn-3.0.9/tests/test_token_trees.rs +38 -0
  430. data/ext/cargo-vendor/syn-3.0.9/tests/test_ty.rs +479 -0
  431. data/ext/cargo-vendor/syn-3.0.9/tests/test_unparenthesize.rs +71 -0
  432. data/ext/cargo-vendor/syn-3.0.9/tests/test_visibility.rs +193 -0
  433. data/ext/cargo-vendor/syn-3.0.9/tests/zzz_stable.rs +33 -0
  434. data/ext/code_ownership/Cargo.toml +2 -2
  435. data/ext/code_ownership/src/lib.rs +15 -3
  436. data/lib/code_ownership/version.rb +1 -1
  437. data/lib/code_ownership.rb +4 -1
  438. metadata +739 -723
  439. data/ext/cargo-vendor/ahash-0.7.8/.cargo-checksum.json +0 -1
  440. data/ext/cargo-vendor/ahash-0.7.8/.cargo_vcs_info.json +0 -6
  441. data/ext/cargo-vendor/ahash-0.7.8/.github/workflows/rust.yml +0 -151
  442. data/ext/cargo-vendor/ahash-0.7.8/Cargo.toml +0 -149
  443. data/ext/cargo-vendor/ahash-0.7.8/Cargo.toml.orig +0 -96
  444. data/ext/cargo-vendor/ahash-0.7.8/FAQ.md +0 -118
  445. data/ext/cargo-vendor/ahash-0.7.8/LICENSE-APACHE +0 -201
  446. data/ext/cargo-vendor/ahash-0.7.8/LICENSE-MIT +0 -25
  447. data/ext/cargo-vendor/ahash-0.7.8/README.md +0 -110
  448. data/ext/cargo-vendor/ahash-0.7.8/build.rs +0 -47
  449. data/ext/cargo-vendor/ahash-0.7.8/rustfmt.toml +0 -1
  450. data/ext/cargo-vendor/ahash-0.7.8/src/aes_hash.rs +0 -440
  451. data/ext/cargo-vendor/ahash-0.7.8/src/convert.rs +0 -167
  452. data/ext/cargo-vendor/ahash-0.7.8/src/fallback_hash.rs +0 -392
  453. data/ext/cargo-vendor/ahash-0.7.8/src/hash_map.rs +0 -371
  454. data/ext/cargo-vendor/ahash-0.7.8/src/hash_quality_test.rs +0 -517
  455. data/ext/cargo-vendor/ahash-0.7.8/src/hash_set.rs +0 -313
  456. data/ext/cargo-vendor/ahash-0.7.8/src/lib.rs +0 -263
  457. data/ext/cargo-vendor/ahash-0.7.8/src/operations.rs +0 -330
  458. data/ext/cargo-vendor/ahash-0.7.8/src/random_state.rs +0 -363
  459. data/ext/cargo-vendor/ahash-0.7.8/src/specialize.rs +0 -239
  460. data/ext/cargo-vendor/ahash-0.7.8/tests/bench.rs +0 -154
  461. data/ext/cargo-vendor/ahash-0.7.8/tests/map_tests.rs +0 -203
  462. data/ext/cargo-vendor/ahash-0.7.8/tests/nopanic.rs +0 -72
  463. data/ext/cargo-vendor/bindgen-0.69.5/.cargo-checksum.json +0 -1
  464. data/ext/cargo-vendor/bindgen-0.69.5/.cargo_vcs_info.json +0 -6
  465. data/ext/cargo-vendor/bindgen-0.69.5/Cargo.toml +0 -155
  466. data/ext/cargo-vendor/bindgen-0.69.5/Cargo.toml.orig +0 -74
  467. data/ext/cargo-vendor/bindgen-0.69.5/README.md +0 -89
  468. data/ext/cargo-vendor/bindgen-0.69.5/build.rs +0 -29
  469. data/ext/cargo-vendor/bindgen-0.69.5/callbacks.rs +0 -213
  470. data/ext/cargo-vendor/bindgen-0.69.5/clang.rs +0 -2347
  471. data/ext/cargo-vendor/bindgen-0.69.5/codegen/bitfield_unit.rs +0 -102
  472. data/ext/cargo-vendor/bindgen-0.69.5/codegen/bitfield_unit_tests.rs +0 -260
  473. data/ext/cargo-vendor/bindgen-0.69.5/codegen/dyngen.rs +0 -201
  474. data/ext/cargo-vendor/bindgen-0.69.5/codegen/error.rs +0 -53
  475. data/ext/cargo-vendor/bindgen-0.69.5/codegen/helpers.rs +0 -355
  476. data/ext/cargo-vendor/bindgen-0.69.5/codegen/impl_debug.rs +0 -245
  477. data/ext/cargo-vendor/bindgen-0.69.5/codegen/impl_partialeq.rs +0 -142
  478. data/ext/cargo-vendor/bindgen-0.69.5/codegen/mod.rs +0 -5473
  479. data/ext/cargo-vendor/bindgen-0.69.5/codegen/postprocessing/merge_extern_blocks.rs +0 -72
  480. data/ext/cargo-vendor/bindgen-0.69.5/codegen/postprocessing/sort_semantically.rs +0 -46
  481. data/ext/cargo-vendor/bindgen-0.69.5/codegen/serialize.rs +0 -444
  482. data/ext/cargo-vendor/bindgen-0.69.5/codegen/struct_layout.rs +0 -451
  483. data/ext/cargo-vendor/bindgen-0.69.5/deps.rs +0 -61
  484. data/ext/cargo-vendor/bindgen-0.69.5/diagnostics.rs +0 -189
  485. data/ext/cargo-vendor/bindgen-0.69.5/extra_assertions.rs +0 -17
  486. data/ext/cargo-vendor/bindgen-0.69.5/features.rs +0 -296
  487. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/derive.rs +0 -732
  488. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/has_destructor.rs +0 -176
  489. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/has_float.rs +0 -252
  490. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/has_type_param_in_array.rs +0 -252
  491. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/has_vtable.rs +0 -240
  492. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/mod.rs +0 -400
  493. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/sizedness.rs +0 -361
  494. data/ext/cargo-vendor/bindgen-0.69.5/ir/analysis/template_params.rs +0 -607
  495. data/ext/cargo-vendor/bindgen-0.69.5/ir/annotations.rs +0 -256
  496. data/ext/cargo-vendor/bindgen-0.69.5/ir/comment.rs +0 -100
  497. data/ext/cargo-vendor/bindgen-0.69.5/ir/comp.rs +0 -1896
  498. data/ext/cargo-vendor/bindgen-0.69.5/ir/context.rs +0 -3038
  499. data/ext/cargo-vendor/bindgen-0.69.5/ir/derive.rs +0 -135
  500. data/ext/cargo-vendor/bindgen-0.69.5/ir/dot.rs +0 -86
  501. data/ext/cargo-vendor/bindgen-0.69.5/ir/enum_ty.rs +0 -323
  502. data/ext/cargo-vendor/bindgen-0.69.5/ir/function.rs +0 -839
  503. data/ext/cargo-vendor/bindgen-0.69.5/ir/int.rs +0 -127
  504. data/ext/cargo-vendor/bindgen-0.69.5/ir/item.rs +0 -2034
  505. data/ext/cargo-vendor/bindgen-0.69.5/ir/item_kind.rs +0 -135
  506. data/ext/cargo-vendor/bindgen-0.69.5/ir/layout.rs +0 -138
  507. data/ext/cargo-vendor/bindgen-0.69.5/ir/module.rs +0 -96
  508. data/ext/cargo-vendor/bindgen-0.69.5/ir/objc.rs +0 -354
  509. data/ext/cargo-vendor/bindgen-0.69.5/ir/template.rs +0 -342
  510. data/ext/cargo-vendor/bindgen-0.69.5/ir/traversal.rs +0 -479
  511. data/ext/cargo-vendor/bindgen-0.69.5/ir/ty.rs +0 -1281
  512. data/ext/cargo-vendor/bindgen-0.69.5/ir/var.rs +0 -488
  513. data/ext/cargo-vendor/bindgen-0.69.5/lib.rs +0 -1380
  514. data/ext/cargo-vendor/bindgen-0.69.5/log_stubs.rs +0 -32
  515. data/ext/cargo-vendor/bindgen-0.69.5/options/as_args.rs +0 -52
  516. data/ext/cargo-vendor/bindgen-0.69.5/options/mod.rs +0 -2079
  517. data/ext/cargo-vendor/bindgen-0.69.5/regex_set.rs +0 -204
  518. data/ext/cargo-vendor/bindgen-0.69.5/time.rs +0 -52
  519. data/ext/cargo-vendor/codeowners-0.3.3/.cargo-checksum.json +0 -1
  520. data/ext/cargo-vendor/codeowners-0.3.3/.github/workflows/audit.yml +0 -19
  521. data/ext/cargo-vendor/codeowners-0.3.3/.github/workflows/ci.yml +0 -169
  522. data/ext/cargo-vendor/codeowners-0.3.3/Cargo.lock +0 -1264
  523. data/ext/cargo-vendor/codeowners-0.3.3/Cargo.toml +0 -132
  524. data/ext/cargo-vendor/codeowners-0.3.3/rust-toolchain.toml +0 -4
  525. data/ext/cargo-vendor/codeowners-0.3.3/src/cache/file.rs +0 -179
  526. data/ext/cargo-vendor/codeowners-0.3.3/src/cache/mod.rs +0 -29
  527. data/ext/cargo-vendor/codeowners-0.3.3/src/cache/noop.rs +0 -26
  528. data/ext/cargo-vendor/codeowners-0.3.3/src/cli.rs +0 -138
  529. data/ext/cargo-vendor/codeowners-0.3.3/src/main.rs +0 -43
  530. data/ext/cargo-vendor/codeowners-0.3.3/src/ownership/file_owner_resolver.rs +0 -416
  531. data/ext/cargo-vendor/codeowners-0.3.3/src/ownership/validator.rs +0 -285
  532. data/ext/cargo-vendor/codeowners-0.3.3/src/ownership.rs +0 -224
  533. data/ext/cargo-vendor/codeowners-0.3.3/src/project.rs +0 -232
  534. data/ext/cargo-vendor/codeowners-0.3.3/src/project_builder.rs +0 -404
  535. data/ext/cargo-vendor/codeowners-0.3.3/src/project_file_builder.rs +0 -113
  536. data/ext/cargo-vendor/codeowners-0.3.3/src/runner/api.rs +0 -142
  537. data/ext/cargo-vendor/codeowners-0.3.3/src/runner/types.rs +0 -38
  538. data/ext/cargo-vendor/codeowners-0.3.3/src/runner.rs +0 -483
  539. data/ext/cargo-vendor/codeowners-0.3.3/tests/common/mod.rs +0 -180
  540. data/ext/cargo-vendor/codeowners-0.3.3/tests/executable_name_config_test.rs +0 -88
  541. data/ext/cargo-vendor/codeowners-0.3.3/tests/fixtures/custom_codeowners_path/docs/CODEOWNERS +0 -14
  542. data/ext/cargo-vendor/codeowners-0.3.3/tests/fixtures/custom_codeowners_path/expected/CODEOWNERS +0 -14
  543. data/ext/cargo-vendor/codeowners-0.3.3/tests/fixtures/valid_project/.github/CODEOWNERS +0 -41
  544. data/ext/cargo-vendor/codeowners-0.3.3/tests/fixtures/valid_project_with_overrides/.github/CODEOWNERS +0 -53
  545. data/ext/cargo-vendor/codeowners-0.3.3/tests/invalid_project_test.rs +0 -174
  546. data/ext/cargo-vendor/codeowners-0.3.3/tests/valid_project_test.rs +0 -348
  547. data/ext/cargo-vendor/error-stack-0.5.0/.cargo-checksum.json +0 -1
  548. data/ext/cargo-vendor/error-stack-0.5.0/.cargo_vcs_info.json +0 -6
  549. data/ext/cargo-vendor/error-stack-0.5.0/.justfile +0 -58
  550. data/ext/cargo-vendor/error-stack-0.5.0/CHANGELOG.md +0 -109
  551. data/ext/cargo-vendor/error-stack-0.5.0/Cargo.lock +0 -790
  552. data/ext/cargo-vendor/error-stack-0.5.0/Cargo.toml +0 -334
  553. data/ext/cargo-vendor/error-stack-0.5.0/Cargo.toml.orig +0 -87
  554. data/ext/cargo-vendor/error-stack-0.5.0/README.md +0 -151
  555. data/ext/cargo-vendor/error-stack-0.5.0/build.rs +0 -29
  556. data/ext/cargo-vendor/error-stack-0.5.0/examples/demo.rs +0 -115
  557. data/ext/cargo-vendor/error-stack-0.5.0/examples/detect.rs +0 -68
  558. data/ext/cargo-vendor/error-stack-0.5.0/examples/exit_code.rs +0 -24
  559. data/ext/cargo-vendor/error-stack-0.5.0/examples/parse_config.rs +0 -51
  560. data/ext/cargo-vendor/error-stack-0.5.0/rust-toolchain.toml +0 -4
  561. data/ext/cargo-vendor/error-stack-0.5.0/src/compat/anyhow.rs +0 -34
  562. data/ext/cargo-vendor/error-stack-0.5.0/src/compat/eyre.rs +0 -31
  563. data/ext/cargo-vendor/error-stack-0.5.0/src/compat/mod.rs +0 -36
  564. data/ext/cargo-vendor/error-stack-0.5.0/src/context.rs +0 -132
  565. data/ext/cargo-vendor/error-stack-0.5.0/src/error.rs +0 -47
  566. data/ext/cargo-vendor/error-stack-0.5.0/src/fmt/charset.rs +0 -114
  567. data/ext/cargo-vendor/error-stack-0.5.0/src/fmt/color.rs +0 -330
  568. data/ext/cargo-vendor/error-stack-0.5.0/src/fmt/config.rs +0 -67
  569. data/ext/cargo-vendor/error-stack-0.5.0/src/fmt/hook.rs +0 -545
  570. data/ext/cargo-vendor/error-stack-0.5.0/src/fmt/location.rs +0 -33
  571. data/ext/cargo-vendor/error-stack-0.5.0/src/fmt/mod.rs +0 -1177
  572. data/ext/cargo-vendor/error-stack-0.5.0/src/frame/frame_impl.rs +0 -262
  573. data/ext/cargo-vendor/error-stack-0.5.0/src/frame/kind.rs +0 -37
  574. data/ext/cargo-vendor/error-stack-0.5.0/src/frame/mod.rs +0 -122
  575. data/ext/cargo-vendor/error-stack-0.5.0/src/future.rs +0 -307
  576. data/ext/cargo-vendor/error-stack-0.5.0/src/hook/context.rs +0 -365
  577. data/ext/cargo-vendor/error-stack-0.5.0/src/hook/mod.rs +0 -239
  578. data/ext/cargo-vendor/error-stack-0.5.0/src/iter.rs +0 -269
  579. data/ext/cargo-vendor/error-stack-0.5.0/src/lib.rs +0 -545
  580. data/ext/cargo-vendor/error-stack-0.5.0/src/macros.rs +0 -253
  581. data/ext/cargo-vendor/error-stack-0.5.0/src/report.rs +0 -740
  582. data/ext/cargo-vendor/error-stack-0.5.0/src/result.rs +0 -267
  583. data/ext/cargo-vendor/error-stack-0.5.0/src/serde.rs +0 -154
  584. data/ext/cargo-vendor/error-stack-0.5.0/tests/common.rs +0 -342
  585. data/ext/cargo-vendor/error-stack-0.5.0/tests/compiletest.rs +0 -7
  586. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__charset_ascii.snap +0 -9
  587. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__charset_utf8.snap +0 -9
  588. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__diagnostics_add.snap +0 -10
  589. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__doc.snap +0 -12
  590. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__emit.snap +0 -16
  591. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__emit_alt.snap +0 -28
  592. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__hookcontext_cast.snap +0 -11
  593. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__hookcontext_decrement.snap +0 -10
  594. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__hookcontext_emit.snap +0 -16
  595. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__hookcontext_increment.snap +0 -10
  596. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__hookcontext_storage.snap +0 -10
  597. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__preference_color.snap +0 -9
  598. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__preference_emphasis.snap +0 -9
  599. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt__preference_none.snap +0 -9
  600. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/fmt_doc_alt.snap +0 -15
  601. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/hook__debug_hook.snap +0 -9
  602. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/hook__debug_hook_provide.snap +0 -10
  603. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/lib__suggestion.snap +0 -13
  604. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/doc/report_debug__doc.snap +0 -14
  605. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__complex.snap +0 -49
  606. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__hook_location.snap +0 -15
  607. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__linear.snap +0 -27
  608. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__linear_ext.snap +0 -27
  609. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__multiline_context.snap +0 -25
  610. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__sources.snap +0 -48
  611. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__full__sources_transparent.snap +0 -50
  612. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested.snap +0 -78
  613. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested@backtrace.snap +0 -104
  614. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested@spantrace-backtrace.snap +0 -128
  615. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested@spantrace.snap +0 -104
  616. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested_alternate.snap +0 -78
  617. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested_alternate@backtrace.snap +0 -104
  618. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested_alternate@spantrace-backtrace.snap +0 -128
  619. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_debug__sources_nested_alternate@spantrace.snap +0 -104
  620. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_serialize__attachment.snap +0 -13
  621. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_serialize__context.snap +0 -19
  622. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_serialize__multiple_sources.snap +0 -30
  623. data/ext/cargo-vendor/error-stack-0.5.0/tests/snapshots/test_serialize__multiple_sources_at_root.snap +0 -20
  624. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_attach.rs +0 -68
  625. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_attach_printable.rs +0 -74
  626. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_backtrace.rs +0 -62
  627. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_change_context.rs +0 -68
  628. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_compatibility.rs +0 -233
  629. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_conversion.rs +0 -112
  630. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_debug.rs +0 -628
  631. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_display.rs +0 -32
  632. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_downcast.rs +0 -41
  633. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_extend.rs +0 -78
  634. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_frame.rs +0 -126
  635. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_iter.rs +0 -99
  636. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_macros.rs +0 -94
  637. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_provision.rs +0 -51
  638. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_serialize.rs +0 -70
  639. data/ext/cargo-vendor/error-stack-0.5.0/tests/test_span_trace.rs +0 -92
  640. data/ext/cargo-vendor/error-stack-0.5.0/tests/ui/macro_invalid_args.rs +0 -60
  641. data/ext/cargo-vendor/error-stack-0.5.0/tests/ui/macro_invalid_args.stderr +0 -101
  642. data/ext/cargo-vendor/error-stack-0.5.0/tests/ui/must_use.rs +0 -20
  643. data/ext/cargo-vendor/error-stack-0.5.0/tests/ui/must_use.stderr +0 -15
  644. data/ext/cargo-vendor/getrandom-0.2.16/.cargo-checksum.json +0 -1
  645. data/ext/cargo-vendor/getrandom-0.2.16/.cargo_vcs_info.json +0 -6
  646. data/ext/cargo-vendor/getrandom-0.2.16/CHANGELOG.md +0 -498
  647. data/ext/cargo-vendor/getrandom-0.2.16/Cargo.lock +0 -354
  648. data/ext/cargo-vendor/getrandom-0.2.16/Cargo.toml +0 -121
  649. data/ext/cargo-vendor/getrandom-0.2.16/Cargo.toml.orig +0 -67
  650. data/ext/cargo-vendor/getrandom-0.2.16/LICENSE-APACHE +0 -201
  651. data/ext/cargo-vendor/getrandom-0.2.16/LICENSE-MIT +0 -26
  652. data/ext/cargo-vendor/getrandom-0.2.16/README.md +0 -81
  653. data/ext/cargo-vendor/getrandom-0.2.16/SECURITY.md +0 -13
  654. data/ext/cargo-vendor/getrandom-0.2.16/benches/buffer.rs +0 -71
  655. data/ext/cargo-vendor/getrandom-0.2.16/src/apple-other.rs +0 -24
  656. data/ext/cargo-vendor/getrandom-0.2.16/src/custom.rs +0 -105
  657. data/ext/cargo-vendor/getrandom-0.2.16/src/error.rs +0 -189
  658. data/ext/cargo-vendor/getrandom-0.2.16/src/error_impls.rs +0 -15
  659. data/ext/cargo-vendor/getrandom-0.2.16/src/espidf.rs +0 -18
  660. data/ext/cargo-vendor/getrandom-0.2.16/src/fuchsia.rs +0 -13
  661. data/ext/cargo-vendor/getrandom-0.2.16/src/getentropy.rs +0 -21
  662. data/ext/cargo-vendor/getrandom-0.2.16/src/getrandom.rs +0 -25
  663. data/ext/cargo-vendor/getrandom-0.2.16/src/hermit.rs +0 -29
  664. data/ext/cargo-vendor/getrandom-0.2.16/src/js.rs +0 -155
  665. data/ext/cargo-vendor/getrandom-0.2.16/src/lazy.rs +0 -56
  666. data/ext/cargo-vendor/getrandom-0.2.16/src/lib.rs +0 -407
  667. data/ext/cargo-vendor/getrandom-0.2.16/src/linux_android.rs +0 -7
  668. data/ext/cargo-vendor/getrandom-0.2.16/src/linux_android_with_fallback.rs +0 -33
  669. data/ext/cargo-vendor/getrandom-0.2.16/src/netbsd.rs +0 -46
  670. data/ext/cargo-vendor/getrandom-0.2.16/src/rdrand.rs +0 -121
  671. data/ext/cargo-vendor/getrandom-0.2.16/src/solaris.rs +0 -34
  672. data/ext/cargo-vendor/getrandom-0.2.16/src/solid.rs +0 -18
  673. data/ext/cargo-vendor/getrandom-0.2.16/src/use_file.rs +0 -120
  674. data/ext/cargo-vendor/getrandom-0.2.16/src/util.rs +0 -35
  675. data/ext/cargo-vendor/getrandom-0.2.16/src/util_libc.rs +0 -162
  676. data/ext/cargo-vendor/getrandom-0.2.16/src/vxworks.rs +0 -29
  677. data/ext/cargo-vendor/getrandom-0.2.16/src/wasi.rs +0 -17
  678. data/ext/cargo-vendor/getrandom-0.2.16/src/windows.rs +0 -59
  679. data/ext/cargo-vendor/getrandom-0.2.16/tests/common/mod.rs +0 -100
  680. data/ext/cargo-vendor/getrandom-0.2.16/tests/custom.rs +0 -54
  681. data/ext/cargo-vendor/getrandom-0.2.16/tests/normal.rs +0 -11
  682. data/ext/cargo-vendor/getrandom-0.2.16/tests/rdrand.rs +0 -22
  683. data/ext/cargo-vendor/hashbrown-0.12.3/.cargo-checksum.json +0 -1
  684. data/ext/cargo-vendor/hashbrown-0.12.3/.cargo_vcs_info.json +0 -6
  685. data/ext/cargo-vendor/hashbrown-0.12.3/CHANGELOG.md +0 -402
  686. data/ext/cargo-vendor/hashbrown-0.12.3/Cargo.toml +0 -113
  687. data/ext/cargo-vendor/hashbrown-0.12.3/Cargo.toml.orig +0 -60
  688. data/ext/cargo-vendor/hashbrown-0.12.3/LICENSE-APACHE +0 -201
  689. data/ext/cargo-vendor/hashbrown-0.12.3/LICENSE-MIT +0 -25
  690. data/ext/cargo-vendor/hashbrown-0.12.3/README.md +0 -126
  691. data/ext/cargo-vendor/hashbrown-0.12.3/benches/bench.rs +0 -331
  692. data/ext/cargo-vendor/hashbrown-0.12.3/benches/insert_unique_unchecked.rs +0 -32
  693. data/ext/cargo-vendor/hashbrown-0.12.3/clippy.toml +0 -1
  694. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/mod.rs +0 -4
  695. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/rayon/helpers.rs +0 -27
  696. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/rayon/map.rs +0 -734
  697. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/rayon/mod.rs +0 -4
  698. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/rayon/raw.rs +0 -231
  699. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/rayon/set.rs +0 -659
  700. data/ext/cargo-vendor/hashbrown-0.12.3/src/external_trait_impls/serde.rs +0 -201
  701. data/ext/cargo-vendor/hashbrown-0.12.3/src/lib.rs +0 -150
  702. data/ext/cargo-vendor/hashbrown-0.12.3/src/macros.rs +0 -70
  703. data/ext/cargo-vendor/hashbrown-0.12.3/src/map.rs +0 -8408
  704. data/ext/cargo-vendor/hashbrown-0.12.3/src/raw/alloc.rs +0 -73
  705. data/ext/cargo-vendor/hashbrown-0.12.3/src/raw/bitmask.rs +0 -122
  706. data/ext/cargo-vendor/hashbrown-0.12.3/src/raw/generic.rs +0 -154
  707. data/ext/cargo-vendor/hashbrown-0.12.3/src/raw/mod.rs +0 -2460
  708. data/ext/cargo-vendor/hashbrown-0.12.3/src/raw/sse2.rs +0 -146
  709. data/ext/cargo-vendor/hashbrown-0.12.3/src/rustc_entry.rs +0 -630
  710. data/ext/cargo-vendor/hashbrown-0.12.3/src/scopeguard.rs +0 -74
  711. data/ext/cargo-vendor/hashbrown-0.12.3/src/set.rs +0 -2790
  712. data/ext/cargo-vendor/hashbrown-0.12.3/tests/hasher.rs +0 -65
  713. data/ext/cargo-vendor/hashbrown-0.12.3/tests/rayon.rs +0 -533
  714. data/ext/cargo-vendor/hashbrown-0.12.3/tests/serde.rs +0 -65
  715. data/ext/cargo-vendor/hashbrown-0.12.3/tests/set.rs +0 -34
  716. data/ext/cargo-vendor/lazycell-1.3.0/.cargo-checksum.json +0 -1
  717. data/ext/cargo-vendor/lazycell-1.3.0/.cargo_vcs_info.json +0 -5
  718. data/ext/cargo-vendor/lazycell-1.3.0/CHANGELOG.md +0 -197
  719. data/ext/cargo-vendor/lazycell-1.3.0/Cargo.toml +0 -34
  720. data/ext/cargo-vendor/lazycell-1.3.0/Cargo.toml.orig +0 -27
  721. data/ext/cargo-vendor/lazycell-1.3.0/LICENSE-APACHE +0 -201
  722. data/ext/cargo-vendor/lazycell-1.3.0/LICENSE-MIT +0 -26
  723. data/ext/cargo-vendor/lazycell-1.3.0/README.md +0 -73
  724. data/ext/cargo-vendor/lazycell-1.3.0/src/lib.rs +0 -680
  725. data/ext/cargo-vendor/lazycell-1.3.0/src/serde_impl.rs +0 -86
  726. data/ext/cargo-vendor/lru-0.7.8/.cargo-checksum.json +0 -1
  727. data/ext/cargo-vendor/lru-0.7.8/.cargo_vcs_info.json +0 -6
  728. data/ext/cargo-vendor/lru-0.7.8/.github/workflows/main.yml +0 -54
  729. data/ext/cargo-vendor/lru-0.7.8/CHANGELOG.md +0 -194
  730. data/ext/cargo-vendor/lru-0.7.8/Cargo.toml +0 -42
  731. data/ext/cargo-vendor/lru-0.7.8/Cargo.toml.orig +0 -22
  732. data/ext/cargo-vendor/lru-0.7.8/LICENSE +0 -21
  733. data/ext/cargo-vendor/lru-0.7.8/README.md +0 -62
  734. data/ext/cargo-vendor/lru-0.7.8/src/lib.rs +0 -1872
  735. data/ext/cargo-vendor/rb-sys-0.9.117/.cargo-checksum.json +0 -1
  736. data/ext/cargo-vendor/rb-sys-0.9.117/.cargo_vcs_info.json +0 -6
  737. data/ext/cargo-vendor/rb-sys-0.9.117/Cargo.lock +0 -393
  738. data/ext/cargo-vendor/rb-sys-0.9.117/Cargo.toml +0 -70
  739. data/ext/cargo-vendor/rb-sys-0.9.117/Cargo.toml.orig +0 -57
  740. data/ext/cargo-vendor/rb-sys-0.9.117/build/main.rs +0 -286
  741. data/ext/cargo-vendor/rb-sys-0.9.117/build/stable_api_config.rs +0 -155
  742. data/ext/cargo-vendor/rb-sys-0.9.117/build/version.rs +0 -50
  743. data/ext/cargo-vendor/rb-sys-0.9.117/src/bindings.rs +0 -21
  744. data/ext/cargo-vendor/rb-sys-0.9.117/src/macros.rs +0 -371
  745. data/ext/cargo-vendor/rb-sys-0.9.117/src/memory.rs +0 -53
  746. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/compiled.c +0 -179
  747. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/compiled.rs +0 -257
  748. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_2_6.rs +0 -324
  749. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_2_7.rs +0 -324
  750. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_0.rs +0 -332
  751. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_1.rs +0 -325
  752. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_2.rs +0 -323
  753. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_3.rs +0 -339
  754. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_4.rs +0 -339
  755. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api.rs +0 -261
  756. data/ext/cargo-vendor/rb-sys-0.9.117/src/utils.rs +0 -89
  757. data/ext/cargo-vendor/rb-sys-build-0.9.117/.cargo-checksum.json +0 -1
  758. data/ext/cargo-vendor/rb-sys-build-0.9.117/.cargo_vcs_info.json +0 -6
  759. data/ext/cargo-vendor/rb-sys-build-0.9.117/Cargo.lock +0 -294
  760. data/ext/cargo-vendor/rb-sys-build-0.9.117/Cargo.toml +0 -71
  761. data/ext/cargo-vendor/rb-sys-build-0.9.117/Cargo.toml.orig +0 -32
  762. data/ext/cargo-vendor/rb-sys-build-0.9.117/src/bindings/stable_api.rs +0 -206
  763. data/ext/cargo-vendor/rb-sys-build-0.9.117/src/bindings.rs +0 -286
  764. data/ext/cargo-vendor/rb-sys-build-0.9.117/src/cc.rs +0 -421
  765. data/ext/cargo-vendor/rb-sys-build-0.9.117/src/rb_config.rs +0 -863
  766. data/ext/cargo-vendor/rb-sys-env-0.2.2/.cargo-checksum.json +0 -1
  767. data/ext/cargo-vendor/rb-sys-env-0.2.2/.cargo_vcs_info.json +0 -6
  768. data/ext/cargo-vendor/rb-sys-env-0.2.2/Cargo.toml +0 -33
  769. data/ext/cargo-vendor/rb-sys-env-0.2.2/Cargo.toml.orig +0 -14
  770. data/ext/cargo-vendor/rb-sys-env-0.2.2/readme.md +0 -119
  771. data/ext/cargo-vendor/rb-sys-env-0.2.2/src/ruby_version.rs +0 -163
  772. data/ext/cargo-vendor/rustc-hash-1.1.0/.cargo-checksum.json +0 -1
  773. data/ext/cargo-vendor/rustc-hash-1.1.0/.cargo_vcs_info.json +0 -5
  774. data/ext/cargo-vendor/rustc-hash-1.1.0/CODE_OF_CONDUCT.md +0 -40
  775. data/ext/cargo-vendor/rustc-hash-1.1.0/Cargo.toml +0 -25
  776. data/ext/cargo-vendor/rustc-hash-1.1.0/Cargo.toml.orig +0 -13
  777. data/ext/cargo-vendor/rustc-hash-1.1.0/LICENSE-APACHE +0 -201
  778. data/ext/cargo-vendor/rustc-hash-1.1.0/README.md +0 -38
  779. data/ext/cargo-vendor/rustc-hash-1.1.0/src/lib.rs +0 -148
  780. data/ext/cargo-vendor/serde-1.0.228/.cargo-checksum.json +0 -1
  781. data/ext/cargo-vendor/serde-1.0.228/.cargo_vcs_info.json +0 -6
  782. data/ext/cargo-vendor/serde-1.0.228/Cargo.lock +0 -66
  783. data/ext/cargo-vendor/serde-1.0.228/Cargo.toml +0 -84
  784. data/ext/cargo-vendor/serde-1.0.228/Cargo.toml.orig +0 -62
  785. data/ext/cargo-vendor/serde-1.0.228/README.md +0 -114
  786. data/ext/cargo-vendor/serde-1.0.228/build.rs +0 -69
  787. data/ext/cargo-vendor/serde-1.0.228/src/core/de/impls.rs +0 -3173
  788. data/ext/cargo-vendor/serde-1.0.228/src/core/lib.rs +0 -121
  789. data/ext/cargo-vendor/serde-1.0.228/src/lib.rs +0 -285
  790. data/ext/cargo-vendor/serde_core-1.0.228/.cargo-checksum.json +0 -1
  791. data/ext/cargo-vendor/serde_core-1.0.228/.cargo_vcs_info.json +0 -6
  792. data/ext/cargo-vendor/serde_core-1.0.228/Cargo.lock +0 -63
  793. data/ext/cargo-vendor/serde_core-1.0.228/Cargo.toml +0 -87
  794. data/ext/cargo-vendor/serde_core-1.0.228/Cargo.toml.orig +0 -70
  795. data/ext/cargo-vendor/serde_core-1.0.228/build.rs +0 -113
  796. data/ext/cargo-vendor/serde_core-1.0.228/src/de/impls.rs +0 -3173
  797. data/ext/cargo-vendor/serde_core-1.0.228/src/lib.rs +0 -121
  798. data/ext/cargo-vendor/serde_derive-1.0.228/.cargo-checksum.json +0 -1
  799. data/ext/cargo-vendor/serde_derive-1.0.228/.cargo_vcs_info.json +0 -6
  800. data/ext/cargo-vendor/serde_derive-1.0.228/Cargo.lock +0 -77
  801. data/ext/cargo-vendor/serde_derive-1.0.228/Cargo.toml +0 -87
  802. data/ext/cargo-vendor/serde_derive-1.0.228/Cargo.toml.orig +0 -42
  803. data/ext/cargo-vendor/serde_derive-1.0.228/README.md +0 -114
  804. data/ext/cargo-vendor/serde_derive-1.0.228/src/bound.rs +0 -410
  805. data/ext/cargo-vendor/serde_derive-1.0.228/src/de/enum_adjacently.rs +0 -323
  806. data/ext/cargo-vendor/serde_derive-1.0.228/src/de/enum_externally.rs +0 -212
  807. data/ext/cargo-vendor/serde_derive-1.0.228/src/de.rs +0 -973
  808. data/ext/cargo-vendor/serde_derive-1.0.228/src/internals/ast.rs +0 -218
  809. data/ext/cargo-vendor/serde_derive-1.0.228/src/internals/attr.rs +0 -1831
  810. data/ext/cargo-vendor/serde_derive-1.0.228/src/internals/ctxt.rs +0 -68
  811. data/ext/cargo-vendor/serde_derive-1.0.228/src/internals/receiver.rs +0 -293
  812. data/ext/cargo-vendor/serde_derive-1.0.228/src/lib.rs +0 -127
  813. data/ext/cargo-vendor/serde_derive-1.0.228/src/pretend.rs +0 -188
  814. data/ext/cargo-vendor/serde_derive-1.0.228/src/ser.rs +0 -1369
  815. data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo-checksum.json +0 -1
  816. data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo_vcs_info.json +0 -6
  817. data/ext/cargo-vendor/serde_magnus-0.10.0/Cargo.lock +0 -387
  818. data/ext/cargo-vendor/serde_magnus-0.10.0/Cargo.toml +0 -162
  819. data/ext/cargo-vendor/serde_magnus-0.10.0/Cargo.toml.orig +0 -28
  820. data/ext/cargo-vendor/serde_magnus-0.10.0/README.md +0 -121
  821. data/ext/cargo-vendor/serde_magnus-0.10.0/src/de/deserializer.rs +0 -185
  822. data/ext/cargo-vendor/version_check-0.9.5/.cargo-checksum.json +0 -1
  823. data/ext/cargo-vendor/version_check-0.9.5/.cargo_vcs_info.json +0 -6
  824. data/ext/cargo-vendor/version_check-0.9.5/.github/workflows/ci.yml +0 -42
  825. data/ext/cargo-vendor/version_check-0.9.5/.travis.yml +0 -6
  826. data/ext/cargo-vendor/version_check-0.9.5/Cargo.toml +0 -38
  827. data/ext/cargo-vendor/version_check-0.9.5/Cargo.toml.orig +0 -13
  828. data/ext/cargo-vendor/version_check-0.9.5/LICENSE-APACHE +0 -201
  829. data/ext/cargo-vendor/version_check-0.9.5/LICENSE-MIT +0 -19
  830. data/ext/cargo-vendor/version_check-0.9.5/README.md +0 -80
  831. data/ext/cargo-vendor/version_check-0.9.5/src/channel.rs +0 -195
  832. data/ext/cargo-vendor/version_check-0.9.5/src/date.rs +0 -203
  833. data/ext/cargo-vendor/version_check-0.9.5/src/lib.rs +0 -528
  834. data/ext/cargo-vendor/version_check-0.9.5/src/version.rs +0 -316
  835. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/.cargo-checksum.json +0 -1
  836. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/.cargo_vcs_info.json +0 -6
  837. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/.github/workflows/main.yml +0 -44
  838. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/.gitmodules +0 -3
  839. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/CODE_OF_CONDUCT.md +0 -49
  840. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/CONTRIBUTING.md +0 -8
  841. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/Cargo.lock +0 -23
  842. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/Cargo.toml +0 -59
  843. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/Cargo.toml.orig +0 -29
  844. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/LICENSE-APACHE +0 -201
  845. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/LICENSE-Apache-2.0_WITH_LLVM-exception +0 -220
  846. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/LICENSE-MIT +0 -23
  847. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/ORG_CODE_OF_CONDUCT.md +0 -143
  848. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/README.md +0 -94
  849. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/SECURITY.md +0 -29
  850. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/src/lib.rs +0 -47
  851. data/ext/cargo-vendor/wasi-0.11.1+wasi-snapshot-preview1/src/lib_generated.rs +0 -2366
  852. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/LICENSE +0 -0
  853. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/mod.rs +0 -0
  854. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/mod.rs +0 -0
  855. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/helpers.rs +0 -0
  856. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/parse.rs +0 -0
  857. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/.github/CODEOWNERS +0 -0
  858. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/.github/workflows/dotslash-config.json +0 -0
  859. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/.rustfmt.toml +0 -0
  860. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/.rusty-hook.toml +0 -0
  861. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/AGENTS.md +0 -0
  862. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/CLAUDE.md +0 -0
  863. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/README.md +0 -0
  864. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/dev/run_benchmarks_for_file.sh +0 -0
  865. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/dev/run_benchmarks_for_gv.sh +0 -0
  866. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/common_test.rs +0 -0
  867. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/config.rs +0 -0
  868. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/crosscheck.rs +0 -0
  869. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/lib.rs +0 -0
  870. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/codeowners_file_parser.rs +0 -0
  871. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/codeowners_query.rs +0 -0
  872. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/file_generator.rs +0 -0
  873. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/file_owner_finder.rs +0 -0
  874. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/annotated_file_mapper.rs +0 -0
  875. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/directory_mapper.rs +0 -0
  876. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/escaper.rs +0 -0
  877. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/package_mapper.rs +0 -0
  878. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/team_gem_mapper.rs +0 -0
  879. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/team_glob_mapper.rs +0 -0
  880. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper/team_yml_mapper.rs +0 -0
  881. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/ownership/mapper.rs +0 -0
  882. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/path_utils.rs +0 -0
  883. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/src/tracked_files.rs +0 -0
  884. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/cache_test.rs +0 -0
  885. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/codeowners_path_test.rs +0 -0
  886. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/crosscheck_owners_test.rs +0 -0
  887. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_codeowners_path/config/code_ownership.yml +0 -0
  888. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_codeowners_path/config/teams/test_team.yml +0 -0
  889. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_codeowners_path/ruby/app/models/test.rb +0 -0
  890. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_executable_name/.github/CODEOWNERS +0 -0
  891. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_executable_name/app/foo.rb +0 -0
  892. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_executable_name/config/code_ownership.yml +0 -0
  893. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_executable_name/config/teams/foo.yml +0 -0
  894. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_executable_name/config/teams/payments.yml +0 -0
  895. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/custom_executable_name/ruby/app/payments/foo.rb +0 -0
  896. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/default_executable_name/.github/CODEOWNERS +0 -0
  897. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/default_executable_name/app/bar.rb +0 -0
  898. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/default_executable_name/config/code_ownership.yml +0 -0
  899. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/default_executable_name/config/teams/bar.yml +0 -0
  900. /data/ext/cargo-vendor/{codeowners-0.3.3/tests/fixtures/multiple-directory-owners/app/services → codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team/app/by_name}/.codeowner +0 -0
  901. /data/ext/cargo-vendor/{codeowners-0.3.3/tests/fixtures/multiple-directory-owners → codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team}/config/code_ownership.yml +0 -0
  902. /data/ext/cargo-vendor/{codeowners-0.3.3/tests/fixtures/multiple-directory-owners → codeowners-0.5.0/tests/fixtures/directory-codeowner-github-team}/config/teams/foo.yml +0 -0
  903. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/.github/CODEOWNERS +0 -0
  904. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/config/code_ownership.yml +0 -0
  905. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/config/teams/payments.yml +0 -0
  906. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/config/teams/payroll.yml +0 -0
  907. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/gems/payroll_calculator/calculator.rb +0 -0
  908. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/models/bank_account.rb +0 -0
  909. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/models/blockchain.rb +0 -0
  910. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/models/payroll.rb +0 -0
  911. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/payments/nacha.rb +0 -0
  912. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/services/.codeowner +0 -0
  913. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/services/multi_owned.rb +0 -0
  914. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/app/unowned.rb +0 -0
  915. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/invalid_project/ruby/packages/payroll_flow/package.yml +0 -0
  916. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/.github/CODEOWNERS +0 -0
  917. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/.keep +0 -0
  918. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/config/code_ownership.yml +0 -0
  919. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/config/teams/design.yml +0 -0
  920. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/config/teams/frontend.yml +0 -0
  921. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/frontend/apps/public/index.tsx +0 -0
  922. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/frontend/packages/dashboard/package.json +0 -0
  923. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/frontend/packages/dashboard/src/index.tsx +0 -0
  924. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/frontend/packages/ui-kit/.codeowner +0 -0
  925. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/javascript_only_project/frontend/packages/ui-kit/src/button.tsx +0 -0
  926. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/missing_github_team/.github/CODEOWNERS +0 -0
  927. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/missing_github_team/config/code_ownership.yml +0 -0
  928. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/missing_github_team/config/teams/bad_team.yml +0 -0
  929. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/missing_github_team/config/teams/good.yml +0 -0
  930. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/missing_github_team/gems/pets/dog.rb +0 -0
  931. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/.github/CODEOWNERS +0 -0
  932. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/app/consumers/.codeowner +0 -0
  933. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/app/consumers/deep/nesting/nestdir/deep_file.rb +0 -0
  934. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/app/consumers/one_owner.rb +0 -0
  935. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/app/services/exciting/.codeowner +0 -0
  936. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/app/services/exciting/some_other_file.rb +0 -0
  937. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/multiple-directory-owners/config/teams/bar.yml +0 -0
  938. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/.ignore +0 -0
  939. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/config/code_ownership.yml +0 -0
  940. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/config/teams/payments.yml +0 -0
  941. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/config/teams/payroll.yml +0 -0
  942. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/config/teams/ux.yml +0 -0
  943. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/gems/payroll_calculator/calculator.rb +0 -0
  944. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/gems/pets/dog.rb +0 -0
  945. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/PayrollFlow/index.tsx +0 -0
  946. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/PayrollFlow/package.json +0 -0
  947. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/items/(special)/.codeowner +0 -0
  948. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/items/(special)/pay.ts +0 -0
  949. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/items/.codeowner +0 -0
  950. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/items/item.ts +0 -0
  951. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/javascript/packages/list/page-admin.tsx +0 -0
  952. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/models/bank_account.rb +0 -0
  953. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/models/payroll.rb +0 -0
  954. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/payments/foo/.codeowner +0 -0
  955. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/payments/foo/ownedby_payroll.rb +0 -0
  956. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/payments/nacha.rb +0 -0
  957. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/payroll/.codeowner +0 -0
  958. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/payroll/payroll.rb +0 -0
  959. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/views/foos/edit.erb +0 -0
  960. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/views/foos/index.html.erb +0 -0
  961. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/app/views/foos/new.html.erb +0 -0
  962. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/ignored_files/git_ignored.rb +0 -0
  963. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/ruby/packages/payroll_flow/package.yml +0 -0
  964. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project/should_be_ignored/an_ignored_file.rb +0 -0
  965. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/config/code_ownership.yml +0 -0
  966. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/config/teams/brewers.yml +0 -0
  967. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/config/teams/cubs.yml +0 -0
  968. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/config/teams/giants.yml +0 -0
  969. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/config/teams/rockies.yml +0 -0
  970. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/datepicker/package.json +0 -0
  971. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/datepicker/src/picks/dp.tsx +0 -0
  972. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/list/package.json +0 -0
  973. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/list/src/item.tsx +0 -0
  974. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/textfield/package.json +0 -0
  975. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/textfield/src/field.tsx +0 -0
  976. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/frontend/packages/components/textfield/src/fields/small.tsx +0 -0
  977. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/gems/apollo/lib/apollo.rb +0 -0
  978. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/gems/ivy/lib/ivy.rb +0 -0
  979. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/gems/lager/lib/lager.rb +0 -0
  980. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/gems/summit/lib/summit.rb +0 -0
  981. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/packs/games/app/services/stats.rb +0 -0
  982. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/packs/games/package.yml +0 -0
  983. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/packs/locations/app/services/capacity.rb +0 -0
  984. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/packs/locations/package.yml +0 -0
  985. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/packs/schedule/app/services/date.rb +0 -0
  986. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/packs/schedule/package.yml +0 -0
  987. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/brewers/lib/util.rb +0 -0
  988. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/brewers/services/play.rb +0 -0
  989. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/.codeowner +0 -0
  990. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/models/.codeowner +0 -0
  991. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/models/db/price.rb +0 -0
  992. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/models/entertainment.rb +0 -0
  993. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/play.rb +0 -0
  994. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/giants/services/play.rb +0 -0
  995. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/fixtures/valid_project_with_overrides/ruby/app/rockies/services/play.rb +0 -0
  996. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/git_stage_test.rs +0 -0
  997. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/invalid_project_structure_test.rs +0 -0
  998. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/missing_github_team_test.rs +0 -0
  999. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/multiple_directory_owners_test.rs +0 -0
  1000. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/run_config_executable_override_test.rs +0 -0
  1001. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/runner_api.rs +0 -0
  1002. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/untracked_files_test.rs +0 -0
  1003. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/valid_project_with_overrides_test.rs +0 -0
  1004. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tests/validate_files_test.rs +0 -0
  1005. /data/ext/cargo-vendor/{codeowners-0.3.3 → codeowners-0.5.0}/tmp/.gitkeep +0 -0
  1006. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/LICENSE-APACHE.md +0 -0
  1007. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/LICENSE-MIT.md +0 -0
  1008. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/LICENSE.md +0 -0
  1009. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/src/fmt/override.rs +0 -0
  1010. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/doc/hook__location_hook.snap +0 -0
  1011. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/doc/report_display__doc.snap +0 -0
  1012. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/doc/report_display_alt__doc.snap +0 -0
  1013. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__alt.snap +0 -0
  1014. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__charset_ascii.snap +0 -0
  1015. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__color_mode_color.snap +0 -0
  1016. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__color_mode_emphasis.snap +0 -0
  1017. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook.snap +0 -0
  1018. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook_context.snap +0 -0
  1019. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook_decr.snap +0 -0
  1020. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook_for_context.snap +0 -0
  1021. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook_incr.snap +0 -0
  1022. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook_multiple.snap +0 -0
  1023. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__hook_provider.snap +0 -0
  1024. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__multiline.snap +0 -0
  1025. /data/ext/cargo-vendor/{error-stack-0.5.0 → error-stack-0.8.0}/tests/snapshots/test_debug__full__norm.snap +0 -0
  1026. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/LICENSE-APACHE +0 -0
  1027. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/LICENSE-MIT +0 -0
  1028. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/bin/release.sh +0 -0
  1029. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/features.rs +0 -0
  1030. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/readme.md +0 -0
  1031. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/hidden.rs +0 -0
  1032. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/lib.rs +0 -0
  1033. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/ruby_abi_version.rs +0 -0
  1034. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/special_consts.rs +0 -0
  1035. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/symbol.rs +0 -0
  1036. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/tracking_allocator.rs +0 -0
  1037. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/value_type.rs +0 -0
  1038. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/LICENSE-APACHE +0 -0
  1039. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/LICENSE-MIT +0 -0
  1040. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/sanitizer.rs +0 -0
  1041. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/wrapper.h +0 -0
  1042. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/lib.rs +0 -0
  1043. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/flags.rs +0 -0
  1044. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/library.rs +0 -0
  1045. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/search_path.rs +0 -0
  1046. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/utils.rs +0 -0
  1047. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/LICENSE-APACHE +0 -0
  1048. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/LICENSE-MIT +0 -0
  1049. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/build.rs +0 -0
  1050. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/defines.rs +0 -0
  1051. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/lib.rs +0 -0
  1052. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/rb_env.rs +0 -0
  1053. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/utils.rs +0 -0
  1054. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/LICENSE-APACHE +0 -0
  1055. /data/ext/cargo-vendor/{rustc-hash-1.1.0 → serde-1.0.229}/LICENSE-MIT +0 -0
  1056. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/crates-io.md +0 -0
  1057. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/crate_root.rs +0 -0
  1058. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/ignored_any.rs +0 -0
  1059. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/mod.rs +0 -0
  1060. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/value.rs +0 -0
  1061. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/format.rs +0 -0
  1062. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/macros.rs +0 -0
  1063. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/content.rs +0 -0
  1064. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/doc.rs +0 -0
  1065. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/mod.rs +0 -0
  1066. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/seed.rs +0 -0
  1067. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/size_hint.rs +0 -0
  1068. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/string.rs +0 -0
  1069. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/fmt.rs +0 -0
  1070. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/impls.rs +0 -0
  1071. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/impossible.rs +0 -0
  1072. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/mod.rs +0 -0
  1073. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/std_error.rs +0 -0
  1074. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/integer128.rs +0 -0
  1075. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/de.rs +0 -0
  1076. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/mod.rs +0 -0
  1077. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/ser.rs +0 -0
  1078. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/LICENSE-APACHE +0 -0
  1079. /data/ext/cargo-vendor/{serde-1.0.228 → serde_core-1.0.229}/LICENSE-MIT +0 -0
  1080. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/README.md +0 -0
  1081. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/crate_root.rs +0 -0
  1082. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/ignored_any.rs +0 -0
  1083. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/mod.rs +0 -0
  1084. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/value.rs +0 -0
  1085. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/format.rs +0 -0
  1086. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/macros.rs +0 -0
  1087. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/content.rs +0 -0
  1088. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/doc.rs +0 -0
  1089. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/mod.rs +0 -0
  1090. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/seed.rs +0 -0
  1091. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/size_hint.rs +0 -0
  1092. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/string.rs +0 -0
  1093. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/fmt.rs +0 -0
  1094. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/impls.rs +0 -0
  1095. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/impossible.rs +0 -0
  1096. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/mod.rs +0 -0
  1097. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/std_error.rs +0 -0
  1098. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/LICENSE-APACHE +0 -0
  1099. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_derive-1.0.229}/LICENSE-MIT +0 -0
  1100. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/crates-io.md +0 -0
  1101. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_.rs +0 -0
  1102. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_internally.rs +0 -0
  1103. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_untagged.rs +0 -0
  1104. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/identifier.rs +0 -0
  1105. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/struct_.rs +0 -0
  1106. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/tuple.rs +0 -0
  1107. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/unit.rs +0 -0
  1108. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/deprecated.rs +0 -0
  1109. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/dummy.rs +0 -0
  1110. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/fragment.rs +0 -0
  1111. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/case.rs +0 -0
  1112. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/check.rs +0 -0
  1113. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/mod.rs +0 -0
  1114. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/name.rs +0 -0
  1115. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/respan.rs +0 -0
  1116. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/symbol.rs +0 -0
  1117. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/this.rs +0 -0
  1118. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/LICENSE +0 -0
  1119. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/array_deserializer.rs +0 -0
  1120. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/array_enumerator.rs +0 -0
  1121. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/enum_deserializer.rs +0 -0
  1122. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/hash_deserializer.rs +0 -0
  1123. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/mod.rs +0 -0
  1124. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/variant_deserializer.rs +0 -0
  1125. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/error.rs +0 -0
  1126. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/lib.rs +0 -0
  1127. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/enums.rs +0 -0
  1128. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/map_serializer.rs +0 -0
  1129. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/mod.rs +0 -0
  1130. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/seq_serializer.rs +0 -0
  1131. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/serializer.rs +0 -0
  1132. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/struct_serializer.rs +0 -0
  1133. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/struct_variant_serializer.rs +0 -0
  1134. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/tuple_variant_serializer.rs +0 -0
  1135. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_arrays.rs +0 -0
  1136. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_booleans.rs +0 -0
  1137. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_enums.rs +0 -0
  1138. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_floats.rs +0 -0
  1139. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_integers.rs +0 -0
  1140. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_maps.rs +0 -0
  1141. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_options.rs +0 -0
  1142. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_results.rs +0 -0
  1143. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_strings.rs +0 -0
  1144. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_structs.rs +0 -0
  1145. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_tuples.rs +0 -0
  1146. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_vecs.rs +0 -0
  1147. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_arrays.rs +0 -0
  1148. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_booleans.rs +0 -0
  1149. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_enums.rs +0 -0
  1150. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_floats.rs +0 -0
  1151. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_integers.rs +0 -0
  1152. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_maps.rs +0 -0
  1153. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_options.rs +0 -0
  1154. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_results.rs +0 -0
  1155. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_strings.rs +0 -0
  1156. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_structs.rs +0 -0
  1157. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_tuples.rs +0 -0
  1158. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_vecs.rs +0 -0
  1159. /data/ext/cargo-vendor/{serde_derive-1.0.228 → syn-3.0.9}/LICENSE-MIT +0 -0
@@ -0,0 +1,2448 @@
1
+ //! A higher level Clang API built on top of the generated bindings in the
2
+ //! `clang_sys` module.
3
+
4
+ #![allow(non_upper_case_globals, dead_code)]
5
+ #![deny(clippy::missing_docs_in_private_items)]
6
+
7
+ use crate::ir::context::BindgenContext;
8
+ use clang_sys::*;
9
+ use std::cmp;
10
+
11
+ use std::ffi::{CStr, CString};
12
+ use std::fmt;
13
+ use std::fs::OpenOptions;
14
+ use std::hash::Hash;
15
+ use std::hash::Hasher;
16
+ use std::os::raw::{c_char, c_int, c_longlong, c_uint, c_ulong, c_ulonglong};
17
+ use std::sync::OnceLock;
18
+ use std::{mem, ptr, slice};
19
+
20
+ /// Type representing a clang attribute.
21
+ ///
22
+ /// Values of this type can be used to check for different attributes using the `has_attrs`
23
+ /// function.
24
+ pub(crate) struct Attribute {
25
+ name: &'static [u8],
26
+ kind: Option<CXCursorKind>,
27
+ token_kind: CXTokenKind,
28
+ }
29
+
30
+ impl Attribute {
31
+ /// A `warn_unused_result` attribute.
32
+ pub(crate) const MUST_USE: Self = Self {
33
+ name: b"warn_unused_result",
34
+ // FIXME(emilio): clang-sys doesn't expose `CXCursor_WarnUnusedResultAttr` (from clang 9).
35
+ kind: Some(440),
36
+ token_kind: CXToken_Identifier,
37
+ };
38
+
39
+ /// A `_Noreturn` attribute.
40
+ pub(crate) const NO_RETURN: Self = Self {
41
+ name: b"_Noreturn",
42
+ kind: None,
43
+ token_kind: CXToken_Keyword,
44
+ };
45
+
46
+ /// A `[[noreturn]]` attribute.
47
+ pub(crate) const NO_RETURN_CPP: Self = Self {
48
+ name: b"noreturn",
49
+ kind: None,
50
+ token_kind: CXToken_Identifier,
51
+ };
52
+ }
53
+
54
+ /// A cursor into the Clang AST, pointing to an AST node.
55
+ ///
56
+ /// We call the AST node pointed to by the cursor the cursor's "referent".
57
+ #[derive(Copy, Clone)]
58
+ pub(crate) struct Cursor {
59
+ x: CXCursor,
60
+ }
61
+
62
+ impl fmt::Debug for Cursor {
63
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
64
+ write!(
65
+ fmt,
66
+ "Cursor({} kind: {}, loc: {}, usr: {:?})",
67
+ self.spelling(),
68
+ kind_to_str(self.kind()),
69
+ self.location(),
70
+ self.usr()
71
+ )
72
+ }
73
+ }
74
+
75
+ impl Cursor {
76
+ /// Get the Unified Symbol Resolution for this cursor's referent, if
77
+ /// available.
78
+ ///
79
+ /// The USR can be used to compare entities across translation units.
80
+ pub(crate) fn usr(&self) -> Option<String> {
81
+ let s = unsafe { cxstring_into_string(clang_getCursorUSR(self.x)) };
82
+ if s.is_empty() {
83
+ None
84
+ } else {
85
+ Some(s)
86
+ }
87
+ }
88
+
89
+ /// Is this cursor's referent a declaration?
90
+ pub(crate) fn is_declaration(&self) -> bool {
91
+ unsafe { clang_isDeclaration(self.kind()) != 0 }
92
+ }
93
+
94
+ /// Is this cursor's referent an anonymous record or so?
95
+ pub(crate) fn is_anonymous(&self) -> bool {
96
+ unsafe { clang_Cursor_isAnonymous(self.x) != 0 }
97
+ }
98
+
99
+ /// Get this cursor's referent's spelling.
100
+ pub(crate) fn spelling(&self) -> String {
101
+ unsafe { cxstring_into_string(clang_getCursorSpelling(self.x)) }
102
+ }
103
+
104
+ /// Get this cursor's referent's display name.
105
+ ///
106
+ /// This is not necessarily a valid identifier. It includes extra
107
+ /// information, such as parameters for a function, etc.
108
+ pub(crate) fn display_name(&self) -> String {
109
+ unsafe { cxstring_into_string(clang_getCursorDisplayName(self.x)) }
110
+ }
111
+
112
+ /// Get the mangled name of this cursor's referent.
113
+ pub(crate) fn mangling(&self) -> String {
114
+ unsafe { cxstring_into_string(clang_Cursor_getMangling(self.x)) }
115
+ }
116
+
117
+ /// Gets the C++ manglings for this cursor, or an error if the manglings
118
+ /// are not available.
119
+ pub(crate) fn cxx_manglings(&self) -> Result<Vec<String>, ()> {
120
+ use clang_sys::*;
121
+ unsafe {
122
+ let manglings = clang_Cursor_getCXXManglings(self.x);
123
+ if manglings.is_null() {
124
+ return Err(());
125
+ }
126
+ let count = (*manglings).Count as usize;
127
+
128
+ let mut result = Vec::with_capacity(count);
129
+ for i in 0..count {
130
+ let string_ptr = (*manglings).Strings.add(i);
131
+ result.push(cxstring_to_string_leaky(*string_ptr));
132
+ }
133
+ clang_disposeStringSet(manglings);
134
+ Ok(result)
135
+ }
136
+ }
137
+
138
+ /// Returns whether the cursor refers to a built-in definition.
139
+ pub(crate) fn is_builtin(&self) -> bool {
140
+ let (file, _, _, _) = self.location().location();
141
+ file.name().is_none()
142
+ }
143
+
144
+ /// Get the `Cursor` for this cursor's referent's lexical parent.
145
+ ///
146
+ /// The lexical parent is the parent of the definition. The semantic parent
147
+ /// is the parent of the declaration. Generally, the lexical parent doesn't
148
+ /// have any effect on semantics, while the semantic parent does.
149
+ ///
150
+ /// In the following snippet, the `Foo` class would be the semantic parent
151
+ /// of the out-of-line `method` definition, while the lexical parent is the
152
+ /// translation unit.
153
+ ///
154
+ /// ```c++
155
+ /// class Foo {
156
+ /// void method();
157
+ /// };
158
+ ///
159
+ /// void Foo::method() { /* ... */ }
160
+ /// ```
161
+ pub(crate) fn lexical_parent(&self) -> Cursor {
162
+ unsafe {
163
+ Cursor {
164
+ x: clang_getCursorLexicalParent(self.x),
165
+ }
166
+ }
167
+ }
168
+
169
+ /// Get the referent's semantic parent, if one is available.
170
+ ///
171
+ /// See documentation for `lexical_parent` for details on semantic vs
172
+ /// lexical parents.
173
+ pub(crate) fn fallible_semantic_parent(&self) -> Option<Cursor> {
174
+ let sp = unsafe {
175
+ Cursor {
176
+ x: clang_getCursorSemanticParent(self.x),
177
+ }
178
+ };
179
+ if sp == *self || !sp.is_valid() {
180
+ return None;
181
+ }
182
+ Some(sp)
183
+ }
184
+
185
+ /// Get the referent's semantic parent.
186
+ ///
187
+ /// See documentation for `lexical_parent` for details on semantic vs
188
+ /// lexical parents.
189
+ pub(crate) fn semantic_parent(&self) -> Cursor {
190
+ self.fallible_semantic_parent().unwrap()
191
+ }
192
+
193
+ /// Return the number of template arguments used by this cursor's referent,
194
+ /// if the referent is either a template instantiation. Returns `None`
195
+ /// otherwise.
196
+ ///
197
+ /// NOTE: This may not return `Some` for partial template specializations,
198
+ /// see #193 and #194.
199
+ pub(crate) fn num_template_args(&self) -> Option<u32> {
200
+ // XXX: `clang_Type_getNumTemplateArguments` is sort of reliable, while
201
+ // `clang_Cursor_getNumTemplateArguments` is totally unreliable.
202
+ // Therefore, try former first, and only fallback to the latter if we
203
+ // have to.
204
+ self.cur_type()
205
+ .num_template_args()
206
+ .or_else(|| {
207
+ let n: c_int =
208
+ unsafe { clang_Cursor_getNumTemplateArguments(self.x) };
209
+
210
+ if n >= 0 {
211
+ Some(n as u32)
212
+ } else {
213
+ debug_assert_eq!(n, -1);
214
+ None
215
+ }
216
+ })
217
+ .or_else(|| {
218
+ let canonical = self.canonical();
219
+ if canonical == *self {
220
+ None
221
+ } else {
222
+ canonical.num_template_args()
223
+ }
224
+ })
225
+ }
226
+
227
+ /// Get a cursor pointing to this referent's containing translation unit.
228
+ ///
229
+ /// Note that we shouldn't create a `TranslationUnit` struct here, because
230
+ /// bindgen assumes there will only be one of them alive at a time, and
231
+ /// disposes it on drop. That can change if this would be required, but I
232
+ /// think we can survive fine without it.
233
+ pub(crate) fn translation_unit(&self) -> Cursor {
234
+ assert!(self.is_valid());
235
+ unsafe {
236
+ let tu = clang_Cursor_getTranslationUnit(self.x);
237
+ let cursor = Cursor {
238
+ x: clang_getTranslationUnitCursor(tu),
239
+ };
240
+ assert!(cursor.is_valid());
241
+ cursor
242
+ }
243
+ }
244
+
245
+ /// Is the referent a top level construct?
246
+ pub(crate) fn is_toplevel(&self) -> bool {
247
+ let mut semantic_parent = self.fallible_semantic_parent();
248
+
249
+ while semantic_parent.is_some() &&
250
+ (semantic_parent.unwrap().kind() == CXCursor_Namespace ||
251
+ semantic_parent.unwrap().kind() ==
252
+ CXCursor_NamespaceAlias ||
253
+ semantic_parent.unwrap().kind() == CXCursor_NamespaceRef)
254
+ {
255
+ semantic_parent =
256
+ semantic_parent.unwrap().fallible_semantic_parent();
257
+ }
258
+
259
+ let tu = self.translation_unit();
260
+ // Yes, this can happen with, e.g., macro definitions.
261
+ semantic_parent == tu.fallible_semantic_parent()
262
+ }
263
+
264
+ /// There are a few kinds of types that we need to treat specially, mainly
265
+ /// not tracking the type declaration but the location of the cursor, given
266
+ /// clang doesn't expose a proper declaration for these types.
267
+ pub(crate) fn is_template_like(&self) -> bool {
268
+ matches!(
269
+ self.kind(),
270
+ CXCursor_ClassTemplate |
271
+ CXCursor_ClassTemplatePartialSpecialization |
272
+ CXCursor_TypeAliasTemplateDecl
273
+ )
274
+ }
275
+
276
+ /// Is this Cursor pointing to a function-like macro definition?
277
+ pub(crate) fn is_macro_function_like(&self) -> bool {
278
+ unsafe { clang_Cursor_isMacroFunctionLike(self.x) != 0 }
279
+ }
280
+
281
+ /// Get the kind of referent this cursor is pointing to.
282
+ pub(crate) fn kind(&self) -> CXCursorKind {
283
+ self.x.kind
284
+ }
285
+
286
+ /// Returns true if the cursor is a definition
287
+ pub(crate) fn is_definition(&self) -> bool {
288
+ unsafe { clang_isCursorDefinition(self.x) != 0 }
289
+ }
290
+
291
+ /// Is the referent a template specialization?
292
+ pub(crate) fn is_template_specialization(&self) -> bool {
293
+ self.specialized().is_some()
294
+ }
295
+
296
+ /// Is the referent a fully specialized template specialization without any
297
+ /// remaining free template arguments?
298
+ pub(crate) fn is_fully_specialized_template(&self) -> bool {
299
+ self.is_template_specialization() &&
300
+ self.kind() != CXCursor_ClassTemplatePartialSpecialization &&
301
+ self.num_template_args().unwrap_or(0) > 0
302
+ }
303
+
304
+ /// Is the referent a template specialization that still has remaining free
305
+ /// template arguments?
306
+ pub(crate) fn is_in_non_fully_specialized_template(&self) -> bool {
307
+ if self.is_toplevel() {
308
+ return false;
309
+ }
310
+
311
+ let parent = self.semantic_parent();
312
+ if parent.is_fully_specialized_template() {
313
+ return false;
314
+ }
315
+
316
+ if !parent.is_template_like() {
317
+ return parent.is_in_non_fully_specialized_template();
318
+ }
319
+
320
+ true
321
+ }
322
+
323
+ /// Is the referent any kind of template parameter?
324
+ pub(crate) fn is_template_parameter(&self) -> bool {
325
+ matches!(
326
+ self.kind(),
327
+ CXCursor_TemplateTemplateParameter |
328
+ CXCursor_TemplateTypeParameter |
329
+ CXCursor_NonTypeTemplateParameter
330
+ )
331
+ }
332
+
333
+ /// Does the referent's type or value depend on a template parameter?
334
+ pub(crate) fn is_dependent_on_template_parameter(&self) -> bool {
335
+ fn visitor(
336
+ found_template_parameter: &mut bool,
337
+ cur: Cursor,
338
+ ) -> CXChildVisitResult {
339
+ // If we found a template parameter, it is dependent.
340
+ if cur.is_template_parameter() {
341
+ *found_template_parameter = true;
342
+ return CXChildVisit_Break;
343
+ }
344
+
345
+ // Get the referent and traverse it as well.
346
+ if let Some(referenced) = cur.referenced() {
347
+ if referenced.is_template_parameter() {
348
+ *found_template_parameter = true;
349
+ return CXChildVisit_Break;
350
+ }
351
+
352
+ referenced
353
+ .visit(|next| visitor(found_template_parameter, next));
354
+ if *found_template_parameter {
355
+ return CXChildVisit_Break;
356
+ }
357
+ }
358
+
359
+ // Continue traversing the AST at the original cursor.
360
+ CXChildVisit_Recurse
361
+ }
362
+
363
+ if self.is_template_parameter() {
364
+ return true;
365
+ }
366
+
367
+ let mut found_template_parameter = false;
368
+ self.visit(|next| visitor(&mut found_template_parameter, next));
369
+
370
+ found_template_parameter
371
+ }
372
+
373
+ /// Is this cursor pointing a valid referent?
374
+ pub(crate) fn is_valid(&self) -> bool {
375
+ unsafe { clang_isInvalid(self.kind()) == 0 }
376
+ }
377
+
378
+ /// Get the source location for the referent.
379
+ pub(crate) fn location(&self) -> SourceLocation {
380
+ unsafe {
381
+ SourceLocation {
382
+ x: clang_getCursorLocation(self.x),
383
+ }
384
+ }
385
+ }
386
+
387
+ /// Get the source location range for the referent.
388
+ pub(crate) fn extent(&self) -> CXSourceRange {
389
+ unsafe { clang_getCursorExtent(self.x) }
390
+ }
391
+
392
+ /// Get the raw declaration comment for this referent, if one exists.
393
+ pub(crate) fn raw_comment(&self) -> Option<String> {
394
+ let s = unsafe {
395
+ cxstring_into_string(clang_Cursor_getRawCommentText(self.x))
396
+ };
397
+ if s.is_empty() {
398
+ None
399
+ } else {
400
+ Some(s)
401
+ }
402
+ }
403
+
404
+ /// Get the referent's parsed comment.
405
+ pub(crate) fn comment(&self) -> Comment {
406
+ unsafe {
407
+ Comment {
408
+ x: clang_Cursor_getParsedComment(self.x),
409
+ }
410
+ }
411
+ }
412
+
413
+ /// Get the referent's type.
414
+ pub(crate) fn cur_type(&self) -> Type {
415
+ unsafe {
416
+ Type {
417
+ x: clang_getCursorType(self.x),
418
+ }
419
+ }
420
+ }
421
+
422
+ /// Given that this cursor's referent is a reference to another type, or is
423
+ /// a declaration, get the cursor pointing to the referenced type or type of
424
+ /// the declared thing.
425
+ pub(crate) fn definition(&self) -> Option<Cursor> {
426
+ unsafe {
427
+ let ret = Cursor {
428
+ x: clang_getCursorDefinition(self.x),
429
+ };
430
+
431
+ if ret.is_valid() && ret.kind() != CXCursor_NoDeclFound {
432
+ Some(ret)
433
+ } else {
434
+ None
435
+ }
436
+ }
437
+ }
438
+
439
+ /// Given that this cursor's referent is reference type, get the cursor
440
+ /// pointing to the referenced type.
441
+ pub(crate) fn referenced(&self) -> Option<Cursor> {
442
+ unsafe {
443
+ let ret = Cursor {
444
+ x: clang_getCursorReferenced(self.x),
445
+ };
446
+
447
+ if ret.is_valid() {
448
+ Some(ret)
449
+ } else {
450
+ None
451
+ }
452
+ }
453
+ }
454
+
455
+ /// Get the canonical cursor for this referent.
456
+ ///
457
+ /// Many types can be declared multiple times before finally being properly
458
+ /// defined. This method allows us to get the canonical cursor for the
459
+ /// referent type.
460
+ pub(crate) fn canonical(&self) -> Cursor {
461
+ unsafe {
462
+ Cursor {
463
+ x: clang_getCanonicalCursor(self.x),
464
+ }
465
+ }
466
+ }
467
+
468
+ /// Given that this cursor points to either a template specialization or a
469
+ /// template instantiation, get a cursor pointing to the template definition
470
+ /// that is being specialized.
471
+ pub(crate) fn specialized(&self) -> Option<Cursor> {
472
+ unsafe {
473
+ let ret = Cursor {
474
+ x: clang_getSpecializedCursorTemplate(self.x),
475
+ };
476
+ if ret.is_valid() {
477
+ Some(ret)
478
+ } else {
479
+ None
480
+ }
481
+ }
482
+ }
483
+
484
+ /// Assuming that this cursor's referent is a template declaration, get the
485
+ /// kind of cursor that would be generated for its specializations.
486
+ pub(crate) fn template_kind(&self) -> CXCursorKind {
487
+ unsafe { clang_getTemplateCursorKind(self.x) }
488
+ }
489
+
490
+ /// Traverse this cursor's referent and its children.
491
+ ///
492
+ /// Call the given function on each AST node traversed.
493
+ pub(crate) fn visit<Visitor>(&self, mut visitor: Visitor)
494
+ where
495
+ Visitor: FnMut(Cursor) -> CXChildVisitResult,
496
+ {
497
+ let data = ptr::addr_of_mut!(visitor);
498
+ unsafe {
499
+ clang_visitChildren(self.x, visit_children::<Visitor>, data.cast());
500
+ }
501
+ }
502
+
503
+ /// Traverse all of this cursor's children, sorted by where they appear in source code.
504
+ ///
505
+ /// Call the given function on each AST node traversed.
506
+ pub(crate) fn visit_sorted<Visitor>(
507
+ &self,
508
+ ctx: &mut BindgenContext,
509
+ mut visitor: Visitor,
510
+ ) where
511
+ Visitor: FnMut(&mut BindgenContext, Cursor),
512
+ {
513
+ // FIXME(#2556): The current source order stuff doesn't account well for different levels
514
+ // of includes, or includes that show up at the same byte offset because they are passed in
515
+ // via CLI.
516
+ const SOURCE_ORDER_ENABLED: bool = false;
517
+ if !SOURCE_ORDER_ENABLED {
518
+ return self.visit(|c| {
519
+ visitor(ctx, c);
520
+ CXChildVisit_Continue
521
+ });
522
+ }
523
+
524
+ let mut children = self.collect_children();
525
+ for child in &children {
526
+ if child.kind() == CXCursor_InclusionDirective {
527
+ if let Some(included_file) = child.get_included_file_name() {
528
+ let location = child.location();
529
+ let (source_file, _, _, offset) = location.location();
530
+
531
+ if let Some(source_file) = source_file.name() {
532
+ ctx.add_include(source_file, included_file, offset);
533
+ }
534
+ }
535
+ }
536
+ }
537
+ children
538
+ .sort_by(|child1, child2| child1.cmp_by_source_order(child2, ctx));
539
+ for child in children {
540
+ visitor(ctx, child);
541
+ }
542
+ }
543
+
544
+ /// Compare source order of two cursors, considering `#include` directives.
545
+ ///
546
+ /// Built-in items provided by the compiler (which don't have a source file),
547
+ /// are sorted first. Remaining files are sorted by their position in the source file.
548
+ /// If the items' source files differ, they are sorted by the position of the first
549
+ /// `#include` for their source file. If no source files are included, `None` is returned.
550
+ fn cmp_by_source_order(
551
+ &self,
552
+ other: &Self,
553
+ ctx: &BindgenContext,
554
+ ) -> cmp::Ordering {
555
+ let (file, _, _, offset) = self.location().location();
556
+ let (other_file, _, _, other_offset) = other.location().location();
557
+
558
+ let (file, other_file) = match (file.name(), other_file.name()) {
559
+ (Some(file), Some(other_file)) => (file, other_file),
560
+ // Built-in definitions should come first.
561
+ (Some(_), None) => return cmp::Ordering::Greater,
562
+ (None, Some(_)) => return cmp::Ordering::Less,
563
+ (None, None) => return cmp::Ordering::Equal,
564
+ };
565
+
566
+ if file == other_file {
567
+ // Both items are in the same source file, compare by byte offset.
568
+ return offset.cmp(&other_offset);
569
+ }
570
+
571
+ let include_location = ctx.included_file_location(&file);
572
+ let other_include_location = ctx.included_file_location(&other_file);
573
+ match (include_location, other_include_location) {
574
+ (Some((file2, offset2)), _) if file2 == other_file => {
575
+ offset2.cmp(&other_offset)
576
+ }
577
+ (Some(_), None) => cmp::Ordering::Greater,
578
+ (_, Some((other_file2, other_offset2))) if file == other_file2 => {
579
+ offset.cmp(&other_offset2)
580
+ }
581
+ (None, Some(_)) => cmp::Ordering::Less,
582
+ (Some((file2, offset2)), Some((other_file2, other_offset2))) => {
583
+ if file2 == other_file2 {
584
+ offset2.cmp(&other_offset2)
585
+ } else {
586
+ cmp::Ordering::Equal
587
+ }
588
+ }
589
+ (None, None) => cmp::Ordering::Equal,
590
+ }
591
+ }
592
+
593
+ /// Collect all of this cursor's children into a vec and return them.
594
+ pub(crate) fn collect_children(&self) -> Vec<Cursor> {
595
+ let mut children = vec![];
596
+ self.visit(|c| {
597
+ children.push(c);
598
+ CXChildVisit_Continue
599
+ });
600
+ children
601
+ }
602
+
603
+ /// Does this cursor have any children?
604
+ pub(crate) fn has_children(&self) -> bool {
605
+ let mut has_children = false;
606
+ self.visit(|_| {
607
+ has_children = true;
608
+ CXChildVisit_Break
609
+ });
610
+ has_children
611
+ }
612
+
613
+ /// Does this cursor have at least `n` children?
614
+ pub(crate) fn has_at_least_num_children(&self, n: usize) -> bool {
615
+ assert!(n > 0);
616
+ let mut num_left = n;
617
+ self.visit(|_| {
618
+ num_left -= 1;
619
+ if num_left == 0 {
620
+ CXChildVisit_Break
621
+ } else {
622
+ CXChildVisit_Continue
623
+ }
624
+ });
625
+ num_left == 0
626
+ }
627
+
628
+ /// Returns whether the given location contains a cursor with the given
629
+ /// kind in the first level of nesting underneath (doesn't look
630
+ /// recursively).
631
+ pub(crate) fn contains_cursor(&self, kind: CXCursorKind) -> bool {
632
+ let mut found = false;
633
+
634
+ self.visit(|c| {
635
+ if c.kind() == kind {
636
+ found = true;
637
+ CXChildVisit_Break
638
+ } else {
639
+ CXChildVisit_Continue
640
+ }
641
+ });
642
+
643
+ found
644
+ }
645
+
646
+ /// Is the referent an inlined function?
647
+ pub(crate) fn is_inlined_function(&self) -> bool {
648
+ unsafe { clang_Cursor_isFunctionInlined(self.x) != 0 }
649
+ }
650
+
651
+ /// Is the referent a defaulted function?
652
+ pub(crate) fn is_defaulted_function(&self) -> bool {
653
+ unsafe { clang_CXXMethod_isDefaulted(self.x) != 0 }
654
+ }
655
+
656
+ /// Is the referent a deleted function?
657
+ pub(crate) fn is_deleted_function(&self) -> bool {
658
+ // Unfortunately, libclang doesn't yet have an API for checking if a
659
+ // member function is deleted, but the following should be a good
660
+ // enough approximation.
661
+ // Deleted functions are implicitly inline according to paragraph 4 of
662
+ // [dcl.fct.def.delete] in the C++ standard. Normal inline functions
663
+ // have a definition in the same translation unit, so if this is an
664
+ // inline function without a definition, and it's not a defaulted
665
+ // function, we can reasonably safely conclude that it's a deleted
666
+ // function.
667
+ self.is_inlined_function() &&
668
+ self.definition().is_none() &&
669
+ !self.is_defaulted_function()
670
+ }
671
+
672
+ /// Is the referent a bit field declaration?
673
+ pub(crate) fn is_bit_field(&self) -> bool {
674
+ unsafe { clang_Cursor_isBitField(self.x) != 0 }
675
+ }
676
+
677
+ /// Get a cursor to the bit field's width expression, or `None` if it's not
678
+ /// a bit field.
679
+ pub(crate) fn bit_width_expr(&self) -> Option<Cursor> {
680
+ if !self.is_bit_field() {
681
+ return None;
682
+ }
683
+
684
+ let mut result = None;
685
+ self.visit(|cur| {
686
+ // The first child may or may not be a TypeRef, depending on whether
687
+ // the field's type is builtin. Skip it.
688
+ if cur.kind() == CXCursor_TypeRef {
689
+ return CXChildVisit_Continue;
690
+ }
691
+
692
+ // The next expression or literal is the bit width.
693
+ result = Some(cur);
694
+
695
+ CXChildVisit_Break
696
+ });
697
+
698
+ result
699
+ }
700
+
701
+ /// Get the width of this cursor's referent bit field, or `None` if the
702
+ /// referent is not a bit field or if the width could not be evaluated.
703
+ pub(crate) fn bit_width(&self) -> Option<u32> {
704
+ // It is not safe to check the bit width without ensuring it doesn't
705
+ // depend on a template parameter. See
706
+ // https://github.com/rust-lang/rust-bindgen/issues/2239
707
+ if self.bit_width_expr()?.is_dependent_on_template_parameter() {
708
+ return None;
709
+ }
710
+
711
+ unsafe {
712
+ let w = clang_getFieldDeclBitWidth(self.x);
713
+ if w == -1 {
714
+ None
715
+ } else {
716
+ Some(w as u32)
717
+ }
718
+ }
719
+ }
720
+
721
+ /// Get the integer representation type used to hold this cursor's referent
722
+ /// enum type.
723
+ pub(crate) fn enum_type(&self) -> Option<Type> {
724
+ unsafe {
725
+ let t = Type {
726
+ x: clang_getEnumDeclIntegerType(self.x),
727
+ };
728
+ if t.is_valid() {
729
+ Some(t)
730
+ } else {
731
+ None
732
+ }
733
+ }
734
+ }
735
+
736
+ /// Get the boolean constant value for this cursor's enum variant referent.
737
+ ///
738
+ /// Returns None if the cursor's referent is not an enum variant.
739
+ pub(crate) fn enum_val_boolean(&self) -> Option<bool> {
740
+ unsafe {
741
+ if self.kind() == CXCursor_EnumConstantDecl {
742
+ Some(clang_getEnumConstantDeclValue(self.x) != 0)
743
+ } else {
744
+ None
745
+ }
746
+ }
747
+ }
748
+
749
+ /// Get the signed constant value for this cursor's enum variant referent.
750
+ ///
751
+ /// Returns None if the cursor's referent is not an enum variant.
752
+ pub(crate) fn enum_val_signed(&self) -> Option<i64> {
753
+ unsafe {
754
+ if self.kind() == CXCursor_EnumConstantDecl {
755
+ #[allow(clippy::unnecessary_cast)]
756
+ Some(clang_getEnumConstantDeclValue(self.x) as i64)
757
+ } else {
758
+ None
759
+ }
760
+ }
761
+ }
762
+
763
+ /// Get the unsigned constant value for this cursor's enum variant referent.
764
+ ///
765
+ /// Returns None if the cursor's referent is not an enum variant.
766
+ pub(crate) fn enum_val_unsigned(&self) -> Option<u64> {
767
+ unsafe {
768
+ if self.kind() == CXCursor_EnumConstantDecl {
769
+ #[allow(clippy::unnecessary_cast)]
770
+ Some(clang_getEnumConstantDeclUnsignedValue(self.x) as u64)
771
+ } else {
772
+ None
773
+ }
774
+ }
775
+ }
776
+
777
+ /// Does this cursor have the given attributes?
778
+ pub(crate) fn has_attrs<const N: usize>(
779
+ &self,
780
+ attrs: &[Attribute; N],
781
+ ) -> [bool; N] {
782
+ let mut found_attrs = [false; N];
783
+ let mut found_count = 0;
784
+
785
+ self.visit(|cur| {
786
+ let kind = cur.kind();
787
+ for (idx, attr) in attrs.iter().enumerate() {
788
+ let found_attr = &mut found_attrs[idx];
789
+ if !*found_attr {
790
+ // `attr.name` and` attr.token_kind` are checked against unexposed attributes only.
791
+ if attr.kind == Some(kind) ||
792
+ (kind == CXCursor_UnexposedAttr &&
793
+ cur.tokens().iter().any(|t| {
794
+ t.kind == attr.token_kind &&
795
+ t.spelling() == attr.name
796
+ }))
797
+ {
798
+ *found_attr = true;
799
+ found_count += 1;
800
+
801
+ if found_count == N {
802
+ return CXChildVisit_Break;
803
+ }
804
+ }
805
+ }
806
+ }
807
+
808
+ CXChildVisit_Continue
809
+ });
810
+
811
+ found_attrs
812
+ }
813
+
814
+ /// Given that this cursor's referent is a `typedef`, get the `Type` that is
815
+ /// being aliased.
816
+ pub(crate) fn typedef_type(&self) -> Option<Type> {
817
+ let inner = Type {
818
+ x: unsafe { clang_getTypedefDeclUnderlyingType(self.x) },
819
+ };
820
+
821
+ if inner.is_valid() {
822
+ Some(inner)
823
+ } else {
824
+ None
825
+ }
826
+ }
827
+
828
+ /// Get the linkage kind for this cursor's referent.
829
+ ///
830
+ /// This only applies to functions and variables.
831
+ pub(crate) fn linkage(&self) -> CXLinkageKind {
832
+ unsafe { clang_getCursorLinkage(self.x) }
833
+ }
834
+
835
+ /// Get the visibility of this cursor's referent.
836
+ pub(crate) fn visibility(&self) -> CXVisibilityKind {
837
+ unsafe { clang_getCursorVisibility(self.x) }
838
+ }
839
+
840
+ /// Given that this cursor's referent is a function, return cursors to its
841
+ /// parameters.
842
+ ///
843
+ /// Returns None if the cursor's referent is not a function/method call or
844
+ /// declaration.
845
+ pub(crate) fn args(&self) -> Option<Vec<Cursor>> {
846
+ // match self.kind() {
847
+ // CXCursor_FunctionDecl |
848
+ // CXCursor_CXXMethod => {
849
+ self.num_args().ok().map(|num| {
850
+ (0..num)
851
+ .map(|i| Cursor {
852
+ x: unsafe { clang_Cursor_getArgument(self.x, i as c_uint) },
853
+ })
854
+ .collect()
855
+ })
856
+ }
857
+
858
+ /// Given that this cursor's referent is a function/method call or
859
+ /// declaration, return the number of arguments it takes.
860
+ ///
861
+ /// Returns Err if the cursor's referent is not a function/method call or
862
+ /// declaration.
863
+ pub(crate) fn num_args(&self) -> Result<u32, ()> {
864
+ unsafe {
865
+ let w = clang_Cursor_getNumArguments(self.x);
866
+ if w == -1 {
867
+ Err(())
868
+ } else {
869
+ Ok(w as u32)
870
+ }
871
+ }
872
+ }
873
+
874
+ /// Get the access specifier for this cursor's referent.
875
+ pub(crate) fn access_specifier(&self) -> CX_CXXAccessSpecifier {
876
+ unsafe { clang_getCXXAccessSpecifier(self.x) }
877
+ }
878
+
879
+ /// Is the cursor's referent publicly accessible in C++?
880
+ ///
881
+ /// Returns true if `self.access_specifier()` is `CX_CXXPublic` or
882
+ /// `CX_CXXInvalidAccessSpecifier`.
883
+ pub(crate) fn public_accessible(&self) -> bool {
884
+ let access = self.access_specifier();
885
+ access == CX_CXXPublic || access == CX_CXXInvalidAccessSpecifier
886
+ }
887
+
888
+ /// Is this cursor's referent a field declaration that is marked as
889
+ /// `mutable`?
890
+ pub(crate) fn is_mutable_field(&self) -> bool {
891
+ unsafe { clang_CXXField_isMutable(self.x) != 0 }
892
+ }
893
+
894
+ /// Get the offset of the field represented by the Cursor.
895
+ pub(crate) fn offset_of_field(&self) -> Result<usize, LayoutError> {
896
+ let offset = unsafe { clang_Cursor_getOffsetOfField(self.x) };
897
+
898
+ if offset < 0 {
899
+ Err(LayoutError::from(offset as i32))
900
+ } else {
901
+ Ok(offset as usize)
902
+ }
903
+ }
904
+
905
+ /// Is this cursor's referent a member function that is declared `static`?
906
+ pub(crate) fn method_is_static(&self) -> bool {
907
+ unsafe { clang_CXXMethod_isStatic(self.x) != 0 }
908
+ }
909
+
910
+ /// Is this cursor's referent a member function that is declared `const`?
911
+ pub(crate) fn method_is_const(&self) -> bool {
912
+ unsafe { clang_CXXMethod_isConst(self.x) != 0 }
913
+ }
914
+
915
+ /// Is this cursor's referent a member function that is virtual?
916
+ pub(crate) fn method_is_virtual(&self) -> bool {
917
+ unsafe { clang_CXXMethod_isVirtual(self.x) != 0 }
918
+ }
919
+
920
+ /// Is this cursor's referent a member function that is pure virtual?
921
+ pub(crate) fn method_is_pure_virtual(&self) -> bool {
922
+ unsafe { clang_CXXMethod_isPureVirtual(self.x) != 0 }
923
+ }
924
+
925
+ /// Is this cursor's referent a struct or class with virtual members?
926
+ pub(crate) fn is_virtual_base(&self) -> bool {
927
+ unsafe { clang_isVirtualBase(self.x) != 0 }
928
+ }
929
+
930
+ /// Try to evaluate this cursor.
931
+ pub(crate) fn evaluate(&self) -> Option<EvalResult> {
932
+ EvalResult::new(*self)
933
+ }
934
+
935
+ /// Return the result type for this cursor
936
+ pub(crate) fn ret_type(&self) -> Option<Type> {
937
+ let rt = Type {
938
+ x: unsafe { clang_getCursorResultType(self.x) },
939
+ };
940
+ if rt.is_valid() {
941
+ Some(rt)
942
+ } else {
943
+ None
944
+ }
945
+ }
946
+
947
+ /// Gets the tokens that correspond to that cursor.
948
+ pub(crate) fn tokens(&self) -> RawTokens<'_> {
949
+ RawTokens::new(self)
950
+ }
951
+
952
+ /// Gets the tokens that correspond to that cursor as `cexpr` tokens.
953
+ pub(crate) fn cexpr_tokens(self) -> Vec<cexpr::token::Token> {
954
+ self.tokens()
955
+ .iter()
956
+ .filter_map(|token| token.as_cexpr_token())
957
+ .collect()
958
+ }
959
+
960
+ /// Obtain the real path name of a cursor of `InclusionDirective` kind.
961
+ ///
962
+ /// Returns None if the cursor does not include a file, otherwise the file's full name
963
+ pub(crate) fn get_included_file_name(&self) -> Option<String> {
964
+ let file = unsafe { clang_getIncludedFile(self.x) };
965
+ if file.is_null() {
966
+ None
967
+ } else {
968
+ Some(unsafe { cxstring_into_string(clang_getFileName(file)) })
969
+ }
970
+ }
971
+
972
+ /// Is this cursor's referent a namespace that is inline?
973
+ pub(crate) fn is_inline_namespace(&self) -> bool {
974
+ unsafe { clang_Cursor_isInlineNamespace(self.x) != 0 }
975
+ }
976
+ }
977
+
978
+ /// A struct that owns the tokenizer result from a given cursor.
979
+ pub(crate) struct RawTokens<'a> {
980
+ cursor: &'a Cursor,
981
+ tu: CXTranslationUnit,
982
+ tokens: *mut CXToken,
983
+ token_count: c_uint,
984
+ }
985
+
986
+ impl<'a> RawTokens<'a> {
987
+ fn new(cursor: &'a Cursor) -> Self {
988
+ let mut tokens = ptr::null_mut();
989
+ let mut token_count = 0;
990
+ let range = cursor.extent();
991
+ let tu = unsafe { clang_Cursor_getTranslationUnit(cursor.x) };
992
+ unsafe { clang_tokenize(tu, range, &mut tokens, &mut token_count) };
993
+ Self {
994
+ cursor,
995
+ tu,
996
+ tokens,
997
+ token_count,
998
+ }
999
+ }
1000
+
1001
+ fn as_slice(&self) -> &[CXToken] {
1002
+ if self.tokens.is_null() {
1003
+ return &[];
1004
+ }
1005
+ unsafe { slice::from_raw_parts(self.tokens, self.token_count as usize) }
1006
+ }
1007
+
1008
+ /// Get an iterator over these tokens.
1009
+ pub(crate) fn iter(&self) -> ClangTokenIterator<'_> {
1010
+ ClangTokenIterator {
1011
+ tu: self.tu,
1012
+ raw: self.as_slice().iter(),
1013
+ }
1014
+ }
1015
+ }
1016
+
1017
+ impl Drop for RawTokens<'_> {
1018
+ fn drop(&mut self) {
1019
+ if !self.tokens.is_null() {
1020
+ unsafe {
1021
+ clang_disposeTokens(
1022
+ self.tu,
1023
+ self.tokens,
1024
+ self.token_count as c_uint,
1025
+ );
1026
+ }
1027
+ }
1028
+ }
1029
+ }
1030
+
1031
+ /// A raw clang token, that exposes only kind, spelling, and extent. This is a
1032
+ /// slightly more convenient version of `CXToken` which owns the spelling
1033
+ /// string and extent.
1034
+ #[derive(Debug)]
1035
+ pub(crate) struct ClangToken {
1036
+ spelling: CXString,
1037
+ /// The extent of the token. This is the same as the relevant member from
1038
+ /// `CXToken`.
1039
+ pub(crate) extent: CXSourceRange,
1040
+ /// The kind of the token. This is the same as the relevant member from
1041
+ /// `CXToken`.
1042
+ pub(crate) kind: CXTokenKind,
1043
+ }
1044
+
1045
+ impl ClangToken {
1046
+ /// Get the token spelling, without being converted to utf-8.
1047
+ pub(crate) fn spelling(&self) -> &[u8] {
1048
+ let c_str = unsafe { CStr::from_ptr(clang_getCString(self.spelling)) };
1049
+ c_str.to_bytes()
1050
+ }
1051
+
1052
+ /// Converts a `ClangToken` to a `cexpr` token if possible.
1053
+ pub(crate) fn as_cexpr_token(&self) -> Option<cexpr::token::Token> {
1054
+ use cexpr::token;
1055
+
1056
+ let kind = match self.kind {
1057
+ CXToken_Punctuation => token::Kind::Punctuation,
1058
+ CXToken_Literal => token::Kind::Literal,
1059
+ CXToken_Identifier => token::Kind::Identifier,
1060
+ CXToken_Keyword => token::Kind::Keyword,
1061
+ // NB: cexpr is not too happy about comments inside
1062
+ // expressions, so we strip them down here.
1063
+ CXToken_Comment => return None,
1064
+ _ => {
1065
+ warn!("Found unexpected token kind: {self:?}");
1066
+ return None;
1067
+ }
1068
+ };
1069
+
1070
+ Some(token::Token {
1071
+ kind,
1072
+ raw: self.spelling().to_vec().into_boxed_slice(),
1073
+ })
1074
+ }
1075
+ }
1076
+
1077
+ impl Drop for ClangToken {
1078
+ fn drop(&mut self) {
1079
+ unsafe { clang_disposeString(self.spelling) }
1080
+ }
1081
+ }
1082
+
1083
+ /// An iterator over a set of Tokens.
1084
+ pub(crate) struct ClangTokenIterator<'a> {
1085
+ tu: CXTranslationUnit,
1086
+ raw: slice::Iter<'a, CXToken>,
1087
+ }
1088
+
1089
+ impl Iterator for ClangTokenIterator<'_> {
1090
+ type Item = ClangToken;
1091
+
1092
+ fn next(&mut self) -> Option<Self::Item> {
1093
+ let raw = self.raw.next()?;
1094
+ unsafe {
1095
+ let kind = clang_getTokenKind(*raw);
1096
+ let spelling = clang_getTokenSpelling(self.tu, *raw);
1097
+ let extent = clang_getTokenExtent(self.tu, *raw);
1098
+ Some(ClangToken {
1099
+ spelling,
1100
+ extent,
1101
+ kind,
1102
+ })
1103
+ }
1104
+ }
1105
+ }
1106
+
1107
+ /// Checks whether the name looks like an identifier, i.e. is alphanumeric
1108
+ /// (including '_') and does not start with a digit.
1109
+ pub(crate) fn is_valid_identifier(name: &str) -> bool {
1110
+ let mut chars = name.chars();
1111
+ let first_valid =
1112
+ chars.next().is_some_and(|c| c.is_alphabetic() || c == '_');
1113
+
1114
+ first_valid && chars.all(|c| c.is_alphanumeric() || c == '_')
1115
+ }
1116
+
1117
+ extern "C" fn visit_children<Visitor>(
1118
+ cur: CXCursor,
1119
+ _parent: CXCursor,
1120
+ data: CXClientData,
1121
+ ) -> CXChildVisitResult
1122
+ where
1123
+ Visitor: FnMut(Cursor) -> CXChildVisitResult,
1124
+ {
1125
+ let func: &mut Visitor = unsafe { &mut *data.cast::<Visitor>() };
1126
+ let child = Cursor { x: cur };
1127
+
1128
+ (*func)(child)
1129
+ }
1130
+
1131
+ impl PartialEq for Cursor {
1132
+ fn eq(&self, other: &Cursor) -> bool {
1133
+ unsafe { clang_equalCursors(self.x, other.x) == 1 }
1134
+ }
1135
+ }
1136
+
1137
+ impl Eq for Cursor {}
1138
+
1139
+ impl Hash for Cursor {
1140
+ fn hash<H: Hasher>(&self, state: &mut H) {
1141
+ unsafe { clang_hashCursor(self.x) }.hash(state);
1142
+ }
1143
+ }
1144
+
1145
+ /// The type of a node in clang's AST.
1146
+ #[derive(Clone, Copy)]
1147
+ pub(crate) struct Type {
1148
+ x: CXType,
1149
+ }
1150
+
1151
+ impl PartialEq for Type {
1152
+ fn eq(&self, other: &Self) -> bool {
1153
+ unsafe { clang_equalTypes(self.x, other.x) != 0 }
1154
+ }
1155
+ }
1156
+
1157
+ impl Eq for Type {}
1158
+
1159
+ impl fmt::Debug for Type {
1160
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1161
+ write!(
1162
+ fmt,
1163
+ "Type({}, kind: {}, cconv: {}, decl: {:?}, canon: {:?})",
1164
+ self.spelling(),
1165
+ type_to_str(self.kind()),
1166
+ self.call_conv(),
1167
+ self.declaration(),
1168
+ self.declaration().canonical()
1169
+ )
1170
+ }
1171
+ }
1172
+
1173
+ /// An error about the layout of a struct, class, or type.
1174
+ #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
1175
+ pub(crate) enum LayoutError {
1176
+ /// Asked for the layout of an invalid type.
1177
+ Invalid,
1178
+ /// Asked for the layout of an incomplete type.
1179
+ Incomplete,
1180
+ /// Asked for the layout of a dependent type.
1181
+ Dependent,
1182
+ /// Asked for the layout of a type that does not have constant size.
1183
+ NotConstantSize,
1184
+ /// Asked for the layout of a field in a type that does not have such a
1185
+ /// field.
1186
+ InvalidFieldName,
1187
+ /// An unknown layout error.
1188
+ Unknown,
1189
+ }
1190
+
1191
+ impl ::std::convert::From<i32> for LayoutError {
1192
+ fn from(val: i32) -> Self {
1193
+ use self::LayoutError::*;
1194
+
1195
+ match val {
1196
+ CXTypeLayoutError_Invalid => Invalid,
1197
+ CXTypeLayoutError_Incomplete => Incomplete,
1198
+ CXTypeLayoutError_Dependent => Dependent,
1199
+ CXTypeLayoutError_NotConstantSize => NotConstantSize,
1200
+ CXTypeLayoutError_InvalidFieldName => InvalidFieldName,
1201
+ _ => Unknown,
1202
+ }
1203
+ }
1204
+ }
1205
+
1206
+ impl Type {
1207
+ /// Get this type's kind.
1208
+ pub(crate) fn kind(&self) -> CXTypeKind {
1209
+ self.x.kind
1210
+ }
1211
+
1212
+ /// Get a cursor pointing to this type's declaration.
1213
+ pub(crate) fn declaration(&self) -> Cursor {
1214
+ let decl = Cursor {
1215
+ x: unsafe { clang_getTypeDeclaration(self.x) },
1216
+ };
1217
+ // Prior to clang 22, the declaration pointed to the definition.
1218
+ decl.definition().unwrap_or(decl)
1219
+ }
1220
+
1221
+ /// Get the canonical declaration of this type, if it is available.
1222
+ pub(crate) fn canonical_declaration(
1223
+ &self,
1224
+ location: Option<&Cursor>,
1225
+ ) -> Option<CanonicalTypeDeclaration> {
1226
+ let mut declaration = self.declaration();
1227
+ if !declaration.is_valid() {
1228
+ if let Some(location) = location {
1229
+ let mut location = *location;
1230
+ if let Some(referenced) = location.referenced() {
1231
+ location = referenced;
1232
+ }
1233
+ if location.is_template_like() {
1234
+ declaration = location;
1235
+ }
1236
+ }
1237
+ }
1238
+
1239
+ let canonical = declaration.canonical();
1240
+ if canonical.is_valid() && canonical.kind() != CXCursor_NoDeclFound {
1241
+ Some(CanonicalTypeDeclaration(*self, canonical))
1242
+ } else {
1243
+ None
1244
+ }
1245
+ }
1246
+
1247
+ /// Get a raw display name for this type.
1248
+ pub(crate) fn spelling(&self) -> String {
1249
+ let s = unsafe { cxstring_into_string(clang_getTypeSpelling(self.x)) };
1250
+ // Clang 5.0 introduced changes in the spelling API so it returned the
1251
+ // full qualified name. Let's undo that here.
1252
+ if s.split("::").all(is_valid_identifier) {
1253
+ if let Some(s) = s.split("::").last() {
1254
+ return s.to_owned();
1255
+ }
1256
+ }
1257
+
1258
+ s
1259
+ }
1260
+
1261
+ /// Is this type const qualified?
1262
+ pub(crate) fn is_const(&self) -> bool {
1263
+ unsafe { clang_isConstQualifiedType(self.x) != 0 }
1264
+ }
1265
+
1266
+ #[inline]
1267
+ fn is_non_deductible_auto_type(&self) -> bool {
1268
+ debug_assert_eq!(self.kind(), CXType_Auto);
1269
+ self.canonical_type() == *self
1270
+ }
1271
+
1272
+ #[inline]
1273
+ fn clang_size_of(&self, ctx: &BindgenContext) -> c_longlong {
1274
+ match self.kind() {
1275
+ // Work-around https://bugs.llvm.org/show_bug.cgi?id=40975
1276
+ CXType_RValueReference | CXType_LValueReference => {
1277
+ ctx.target_pointer_size() as c_longlong
1278
+ }
1279
+ // Work-around https://bugs.llvm.org/show_bug.cgi?id=40813
1280
+ CXType_Auto if self.is_non_deductible_auto_type() => -6,
1281
+ _ => unsafe { clang_Type_getSizeOf(self.x) },
1282
+ }
1283
+ }
1284
+
1285
+ #[inline]
1286
+ fn clang_align_of(&self, ctx: &BindgenContext) -> c_longlong {
1287
+ match self.kind() {
1288
+ // Work-around https://bugs.llvm.org/show_bug.cgi?id=40975
1289
+ CXType_RValueReference | CXType_LValueReference => {
1290
+ ctx.target_pointer_size() as c_longlong
1291
+ }
1292
+ // Work-around https://bugs.llvm.org/show_bug.cgi?id=40813
1293
+ CXType_Auto if self.is_non_deductible_auto_type() => -6,
1294
+ _ => unsafe { clang_Type_getAlignOf(self.x) },
1295
+ }
1296
+ }
1297
+
1298
+ /// What is the size of this type? Paper over invalid types by returning `0`
1299
+ /// for them.
1300
+ pub(crate) fn size(&self, ctx: &BindgenContext) -> usize {
1301
+ let val = self.clang_size_of(ctx);
1302
+ if val < 0 {
1303
+ 0
1304
+ } else {
1305
+ val as usize
1306
+ }
1307
+ }
1308
+
1309
+ /// What is the size of this type?
1310
+ pub(crate) fn fallible_size(
1311
+ &self,
1312
+ ctx: &BindgenContext,
1313
+ ) -> Result<usize, LayoutError> {
1314
+ let val = self.clang_size_of(ctx);
1315
+ if val < 0 {
1316
+ Err(LayoutError::from(val as i32))
1317
+ } else {
1318
+ Ok(val as usize)
1319
+ }
1320
+ }
1321
+
1322
+ /// What is the alignment of this type? Paper over invalid types by
1323
+ /// returning `0`.
1324
+ pub(crate) fn align(&self, ctx: &BindgenContext) -> usize {
1325
+ let val = self.clang_align_of(ctx);
1326
+ if val < 0 {
1327
+ 0
1328
+ } else {
1329
+ val as usize
1330
+ }
1331
+ }
1332
+
1333
+ /// What is the alignment of this type?
1334
+ pub(crate) fn fallible_align(
1335
+ &self,
1336
+ ctx: &BindgenContext,
1337
+ ) -> Result<usize, LayoutError> {
1338
+ let val = self.clang_align_of(ctx);
1339
+ if val < 0 {
1340
+ Err(LayoutError::from(val as i32))
1341
+ } else {
1342
+ Ok(val as usize)
1343
+ }
1344
+ }
1345
+
1346
+ /// Get the layout for this type, or an error describing why it does not
1347
+ /// have a valid layout.
1348
+ pub(crate) fn fallible_layout(
1349
+ &self,
1350
+ ctx: &BindgenContext,
1351
+ ) -> Result<crate::ir::layout::Layout, LayoutError> {
1352
+ use crate::ir::layout::Layout;
1353
+ let size = self.fallible_size(ctx)?;
1354
+ let align = self.fallible_align(ctx)?;
1355
+ Ok(Layout::new(size, align))
1356
+ }
1357
+
1358
+ /// Get the number of template arguments this type has, or `None` if it is
1359
+ /// not some kind of template.
1360
+ pub(crate) fn num_template_args(&self) -> Option<u32> {
1361
+ let n = unsafe { clang_Type_getNumTemplateArguments(self.x) };
1362
+ if n >= 0 {
1363
+ Some(n as u32)
1364
+ } else {
1365
+ debug_assert_eq!(n, -1);
1366
+ None
1367
+ }
1368
+ }
1369
+
1370
+ /// If this type is a class template specialization, return its
1371
+ /// template arguments. Otherwise, return None.
1372
+ pub(crate) fn template_args(&self) -> Option<TypeTemplateArgIterator> {
1373
+ self.num_template_args().map(|n| TypeTemplateArgIterator {
1374
+ x: self.x,
1375
+ length: n,
1376
+ index: 0,
1377
+ })
1378
+ }
1379
+
1380
+ /// Given that this type is a function prototype, return the types of its parameters.
1381
+ ///
1382
+ /// Returns None if the type is not a function prototype.
1383
+ pub(crate) fn args(&self) -> Option<Vec<Type>> {
1384
+ self.num_args().ok().map(|num| {
1385
+ (0..num)
1386
+ .map(|i| Type {
1387
+ x: unsafe { clang_getArgType(self.x, i as c_uint) },
1388
+ })
1389
+ .collect()
1390
+ })
1391
+ }
1392
+
1393
+ /// Given that this type is a function prototype, return the number of arguments it takes.
1394
+ ///
1395
+ /// Returns Err if the type is not a function prototype.
1396
+ pub(crate) fn num_args(&self) -> Result<u32, ()> {
1397
+ unsafe {
1398
+ let w = clang_getNumArgTypes(self.x);
1399
+ if w == -1 {
1400
+ Err(())
1401
+ } else {
1402
+ Ok(w as u32)
1403
+ }
1404
+ }
1405
+ }
1406
+
1407
+ /// Given that this type is a pointer type, return the type that it points
1408
+ /// to.
1409
+ pub(crate) fn pointee_type(&self) -> Option<Type> {
1410
+ match self.kind() {
1411
+ CXType_Pointer |
1412
+ CXType_RValueReference |
1413
+ CXType_LValueReference |
1414
+ CXType_MemberPointer |
1415
+ CXType_BlockPointer |
1416
+ CXType_ObjCObjectPointer => {
1417
+ let ret = Type {
1418
+ x: unsafe { clang_getPointeeType(self.x) },
1419
+ };
1420
+ debug_assert!(ret.is_valid());
1421
+ Some(ret)
1422
+ }
1423
+ _ => None,
1424
+ }
1425
+ }
1426
+
1427
+ /// Given that this type is an array, vector, or complex type, return the
1428
+ /// type of its elements.
1429
+ pub(crate) fn elem_type(&self) -> Option<Type> {
1430
+ let current_type = Type {
1431
+ x: unsafe { clang_getElementType(self.x) },
1432
+ };
1433
+ if current_type.is_valid() {
1434
+ Some(current_type)
1435
+ } else {
1436
+ None
1437
+ }
1438
+ }
1439
+
1440
+ /// Given that this type is an array or vector type, return its number of
1441
+ /// elements.
1442
+ pub(crate) fn num_elements(&self) -> Option<usize> {
1443
+ let num_elements_returned = unsafe { clang_getNumElements(self.x) };
1444
+ if num_elements_returned == -1 {
1445
+ None
1446
+ } else {
1447
+ Some(num_elements_returned as usize)
1448
+ }
1449
+ }
1450
+
1451
+ /// Get the canonical version of this type. This sees through `typedef`s and
1452
+ /// aliases to get the underlying, canonical type.
1453
+ pub(crate) fn canonical_type(&self) -> Type {
1454
+ unsafe {
1455
+ Type {
1456
+ x: clang_getCanonicalType(self.x),
1457
+ }
1458
+ }
1459
+ }
1460
+
1461
+ /// Is this type a variadic function type?
1462
+ pub(crate) fn is_variadic(&self) -> bool {
1463
+ unsafe { clang_isFunctionTypeVariadic(self.x) != 0 }
1464
+ }
1465
+
1466
+ /// Given that this type is a function type, get the type of its return
1467
+ /// value.
1468
+ pub(crate) fn ret_type(&self) -> Option<Type> {
1469
+ let rt = Type {
1470
+ x: unsafe { clang_getResultType(self.x) },
1471
+ };
1472
+ if rt.is_valid() {
1473
+ Some(rt)
1474
+ } else {
1475
+ None
1476
+ }
1477
+ }
1478
+
1479
+ /// Given that this type is a function type, get its calling convention. If
1480
+ /// this is not a function type, `CXCallingConv_Invalid` is returned.
1481
+ pub(crate) fn call_conv(&self) -> CXCallingConv {
1482
+ unsafe { clang_getFunctionTypeCallingConv(self.x) }
1483
+ }
1484
+
1485
+ /// For elaborated types (types which use `class`, `struct`, or `union` to
1486
+ /// disambiguate types from local bindings), get the underlying type.
1487
+ pub(crate) fn named(&self) -> Type {
1488
+ unsafe {
1489
+ Type {
1490
+ x: clang_Type_getNamedType(self.x),
1491
+ }
1492
+ }
1493
+ }
1494
+
1495
+ /// For atomic types, get the underlying type.
1496
+ pub(crate) fn atomic_value_type(&self) -> Type {
1497
+ unsafe {
1498
+ Type {
1499
+ x: clang_Type_getValueType(self.x),
1500
+ }
1501
+ }
1502
+ }
1503
+
1504
+ /// Is this a valid type?
1505
+ pub(crate) fn is_valid(&self) -> bool {
1506
+ self.kind() != CXType_Invalid
1507
+ }
1508
+
1509
+ /// Is this a valid and exposed type?
1510
+ pub(crate) fn is_valid_and_exposed(&self) -> bool {
1511
+ self.is_valid() && self.kind() != CXType_Unexposed
1512
+ }
1513
+
1514
+ /// Is this type a fully instantiated template?
1515
+ pub(crate) fn is_fully_instantiated_template(&self) -> bool {
1516
+ // Yep, the spelling of this containing type-parameter is extremely
1517
+ // nasty... But can happen in <type_traits>. Unfortunately I couldn't
1518
+ // reduce it enough :(
1519
+ self.template_args().is_some_and(|args| args.len() > 0) &&
1520
+ !matches!(
1521
+ self.declaration().kind(),
1522
+ CXCursor_ClassTemplatePartialSpecialization |
1523
+ CXCursor_TypeAliasTemplateDecl |
1524
+ CXCursor_TemplateTemplateParameter
1525
+ )
1526
+ }
1527
+
1528
+ /// Is this type an associated template type? Eg `T::Associated` in
1529
+ /// this example:
1530
+ ///
1531
+ /// ```c++
1532
+ /// template <typename T>
1533
+ /// class Foo {
1534
+ /// typename T::Associated member;
1535
+ /// };
1536
+ /// ```
1537
+ pub(crate) fn is_associated_type(&self) -> bool {
1538
+ // This is terrible :(
1539
+ fn hacky_parse_associated_type<S: AsRef<str>>(spelling: S) -> bool {
1540
+ static ASSOC_TYPE_RE: OnceLock<regex::Regex> = OnceLock::new();
1541
+ ASSOC_TYPE_RE
1542
+ .get_or_init(|| {
1543
+ regex::Regex::new(r"typename type\-parameter\-\d+\-\d+::.+")
1544
+ .unwrap()
1545
+ })
1546
+ .is_match(spelling.as_ref())
1547
+ }
1548
+
1549
+ self.kind() == CXType_Unexposed &&
1550
+ (hacky_parse_associated_type(self.spelling()) ||
1551
+ hacky_parse_associated_type(
1552
+ self.canonical_type().spelling(),
1553
+ ))
1554
+ }
1555
+ }
1556
+
1557
+ /// The `CanonicalTypeDeclaration` type exists as proof-by-construction that its
1558
+ /// cursor is the canonical declaration for its type. If you have a
1559
+ /// `CanonicalTypeDeclaration` instance, you know for sure that the type and
1560
+ /// cursor match up in a canonical declaration relationship, and it simply
1561
+ /// cannot be otherwise.
1562
+ #[derive(Debug, Clone, Copy, PartialEq, Eq)]
1563
+ pub(crate) struct CanonicalTypeDeclaration(Type, Cursor);
1564
+
1565
+ impl CanonicalTypeDeclaration {
1566
+ /// Get the type.
1567
+ pub(crate) fn ty(&self) -> &Type {
1568
+ &self.0
1569
+ }
1570
+
1571
+ /// Get the type's canonical declaration cursor.
1572
+ pub(crate) fn cursor(&self) -> &Cursor {
1573
+ &self.1
1574
+ }
1575
+ }
1576
+
1577
+ /// An iterator for a type's template arguments.
1578
+ pub(crate) struct TypeTemplateArgIterator {
1579
+ x: CXType,
1580
+ length: u32,
1581
+ index: u32,
1582
+ }
1583
+
1584
+ impl Iterator for TypeTemplateArgIterator {
1585
+ type Item = Type;
1586
+ fn next(&mut self) -> Option<Type> {
1587
+ if self.index < self.length {
1588
+ let idx = self.index as c_uint;
1589
+ self.index += 1;
1590
+ Some(Type {
1591
+ x: unsafe { clang_Type_getTemplateArgumentAsType(self.x, idx) },
1592
+ })
1593
+ } else {
1594
+ None
1595
+ }
1596
+ }
1597
+ }
1598
+
1599
+ impl ExactSizeIterator for TypeTemplateArgIterator {
1600
+ fn len(&self) -> usize {
1601
+ assert!(self.index <= self.length);
1602
+ (self.length - self.index) as usize
1603
+ }
1604
+ }
1605
+
1606
+ /// A `SourceLocation` is a file, line, column, and byte offset location for
1607
+ /// some source text.
1608
+ pub(crate) struct SourceLocation {
1609
+ x: CXSourceLocation,
1610
+ }
1611
+
1612
+ impl SourceLocation {
1613
+ /// Get the (file, line, column, byte offset) tuple for this source
1614
+ /// location.
1615
+ pub(crate) fn location(&self) -> (File, usize, usize, usize) {
1616
+ unsafe {
1617
+ let mut file = mem::zeroed();
1618
+ let mut line = 0;
1619
+ let mut col = 0;
1620
+ let mut off = 0;
1621
+ clang_getFileLocation(
1622
+ self.x, &mut file, &mut line, &mut col, &mut off,
1623
+ );
1624
+ (File { x: file }, line as usize, col as usize, off as usize)
1625
+ }
1626
+ }
1627
+ }
1628
+
1629
+ impl fmt::Display for SourceLocation {
1630
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1631
+ let (file, line, col, _) = self.location();
1632
+ if let Some(name) = file.name() {
1633
+ write!(f, "{name}:{line}:{col}")
1634
+ } else {
1635
+ "builtin definitions".fmt(f)
1636
+ }
1637
+ }
1638
+ }
1639
+
1640
+ impl fmt::Debug for SourceLocation {
1641
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1642
+ write!(f, "{self}")
1643
+ }
1644
+ }
1645
+
1646
+ /// A comment in the source text.
1647
+ ///
1648
+ /// Comments are sort of parsed by Clang, and have a tree structure.
1649
+ pub(crate) struct Comment {
1650
+ x: CXComment,
1651
+ }
1652
+
1653
+ impl Comment {
1654
+ /// What kind of comment is this?
1655
+ pub(crate) fn kind(&self) -> CXCommentKind {
1656
+ unsafe { clang_Comment_getKind(self.x) }
1657
+ }
1658
+
1659
+ /// Get this comment's children comment
1660
+ pub(crate) fn get_children(&self) -> CommentChildrenIterator {
1661
+ CommentChildrenIterator {
1662
+ parent: self.x,
1663
+ length: unsafe { clang_Comment_getNumChildren(self.x) },
1664
+ index: 0,
1665
+ }
1666
+ }
1667
+
1668
+ /// Given that this comment is the start or end of an HTML tag, get its tag
1669
+ /// name.
1670
+ pub(crate) fn get_tag_name(&self) -> String {
1671
+ unsafe { cxstring_into_string(clang_HTMLTagComment_getTagName(self.x)) }
1672
+ }
1673
+
1674
+ /// Given that this comment is an HTML start tag, get its attributes.
1675
+ pub(crate) fn get_tag_attrs(&self) -> CommentAttributesIterator {
1676
+ CommentAttributesIterator {
1677
+ x: self.x,
1678
+ length: unsafe { clang_HTMLStartTag_getNumAttrs(self.x) },
1679
+ index: 0,
1680
+ }
1681
+ }
1682
+ }
1683
+
1684
+ /// An iterator for a comment's children
1685
+ pub(crate) struct CommentChildrenIterator {
1686
+ parent: CXComment,
1687
+ length: c_uint,
1688
+ index: c_uint,
1689
+ }
1690
+
1691
+ impl Iterator for CommentChildrenIterator {
1692
+ type Item = Comment;
1693
+ fn next(&mut self) -> Option<Comment> {
1694
+ if self.index < self.length {
1695
+ let idx = self.index;
1696
+ self.index += 1;
1697
+ Some(Comment {
1698
+ x: unsafe { clang_Comment_getChild(self.parent, idx) },
1699
+ })
1700
+ } else {
1701
+ None
1702
+ }
1703
+ }
1704
+ }
1705
+
1706
+ /// An HTML start tag comment attribute
1707
+ pub(crate) struct CommentAttribute {
1708
+ /// HTML start tag attribute name
1709
+ pub(crate) name: String,
1710
+ /// HTML start tag attribute value
1711
+ pub(crate) value: String,
1712
+ }
1713
+
1714
+ /// An iterator for a comment's attributes
1715
+ pub(crate) struct CommentAttributesIterator {
1716
+ x: CXComment,
1717
+ length: c_uint,
1718
+ index: c_uint,
1719
+ }
1720
+
1721
+ impl Iterator for CommentAttributesIterator {
1722
+ type Item = CommentAttribute;
1723
+ fn next(&mut self) -> Option<CommentAttribute> {
1724
+ if self.index < self.length {
1725
+ let idx = self.index;
1726
+ self.index += 1;
1727
+ Some(CommentAttribute {
1728
+ name: unsafe {
1729
+ cxstring_into_string(clang_HTMLStartTag_getAttrName(
1730
+ self.x, idx,
1731
+ ))
1732
+ },
1733
+ value: unsafe {
1734
+ cxstring_into_string(clang_HTMLStartTag_getAttrValue(
1735
+ self.x, idx,
1736
+ ))
1737
+ },
1738
+ })
1739
+ } else {
1740
+ None
1741
+ }
1742
+ }
1743
+ }
1744
+
1745
+ /// A source file.
1746
+ pub(crate) struct File {
1747
+ x: CXFile,
1748
+ }
1749
+
1750
+ impl File {
1751
+ /// Get the name of this source file.
1752
+ pub(crate) fn name(&self) -> Option<String> {
1753
+ if self.x.is_null() {
1754
+ return None;
1755
+ }
1756
+ Some(unsafe { cxstring_into_string(clang_getFileName(self.x)) })
1757
+ }
1758
+ }
1759
+
1760
+ fn cxstring_to_string_leaky(s: CXString) -> String {
1761
+ if s.data.is_null() {
1762
+ return String::new();
1763
+ }
1764
+ let c_str = unsafe { CStr::from_ptr(clang_getCString(s)) };
1765
+ c_str.to_string_lossy().into_owned()
1766
+ }
1767
+
1768
+ fn cxstring_into_string(s: CXString) -> String {
1769
+ let ret = cxstring_to_string_leaky(s);
1770
+ unsafe { clang_disposeString(s) };
1771
+ ret
1772
+ }
1773
+
1774
+ /// An `Index` is an environment for a set of translation units that will
1775
+ /// typically end up linked together in one final binary.
1776
+ pub(crate) struct Index {
1777
+ x: CXIndex,
1778
+ }
1779
+
1780
+ impl Index {
1781
+ /// Construct a new `Index`.
1782
+ ///
1783
+ /// The `pch` parameter controls whether declarations in pre-compiled
1784
+ /// headers are included when enumerating a translation unit's "locals".
1785
+ ///
1786
+ /// The `diag` parameter controls whether debugging diagnostics are enabled.
1787
+ pub(crate) fn new(pch: bool, diag: bool) -> Index {
1788
+ unsafe {
1789
+ Index {
1790
+ x: clang_createIndex(c_int::from(pch), c_int::from(diag)),
1791
+ }
1792
+ }
1793
+ }
1794
+ }
1795
+
1796
+ impl fmt::Debug for Index {
1797
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1798
+ write!(fmt, "Index {{ }}")
1799
+ }
1800
+ }
1801
+
1802
+ impl Drop for Index {
1803
+ fn drop(&mut self) {
1804
+ unsafe {
1805
+ clang_disposeIndex(self.x);
1806
+ }
1807
+ }
1808
+ }
1809
+
1810
+ /// A translation unit (or "compilation unit").
1811
+ pub(crate) struct TranslationUnit {
1812
+ x: CXTranslationUnit,
1813
+ }
1814
+
1815
+ impl fmt::Debug for TranslationUnit {
1816
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1817
+ write!(fmt, "TranslationUnit {{ }}")
1818
+ }
1819
+ }
1820
+
1821
+ impl TranslationUnit {
1822
+ /// Parse a source file into a translation unit.
1823
+ pub(crate) fn parse(
1824
+ ix: &Index,
1825
+ file: &str,
1826
+ cmd_args: &[Box<str>],
1827
+ unsaved: &[UnsavedFile],
1828
+ opts: CXTranslationUnit_Flags,
1829
+ ) -> Option<TranslationUnit> {
1830
+ let fname = CString::new(file).unwrap();
1831
+ let _c_args: Vec<CString> = cmd_args
1832
+ .iter()
1833
+ .map(|s| CString::new(s.as_bytes()).unwrap())
1834
+ .collect();
1835
+ let c_args: Vec<*const c_char> =
1836
+ _c_args.iter().map(|s| s.as_ptr()).collect();
1837
+ let mut c_unsaved: Vec<CXUnsavedFile> =
1838
+ unsaved.iter().map(|f| f.x).collect();
1839
+ let tu = unsafe {
1840
+ clang_parseTranslationUnit(
1841
+ ix.x,
1842
+ fname.as_ptr(),
1843
+ c_args.as_ptr(),
1844
+ c_args.len() as c_int,
1845
+ c_unsaved.as_mut_ptr(),
1846
+ c_unsaved.len() as c_uint,
1847
+ opts,
1848
+ )
1849
+ };
1850
+ if tu.is_null() {
1851
+ None
1852
+ } else {
1853
+ Some(TranslationUnit { x: tu })
1854
+ }
1855
+ }
1856
+
1857
+ /// Get the Clang diagnostic information associated with this translation
1858
+ /// unit.
1859
+ pub(crate) fn diags(&self) -> Vec<Diagnostic> {
1860
+ unsafe {
1861
+ let num = clang_getNumDiagnostics(self.x) as usize;
1862
+ let mut diags = vec![];
1863
+ for i in 0..num {
1864
+ diags.push(Diagnostic {
1865
+ x: clang_getDiagnostic(self.x, i as c_uint),
1866
+ });
1867
+ }
1868
+ diags
1869
+ }
1870
+ }
1871
+
1872
+ /// Get a cursor pointing to the root of this translation unit's AST.
1873
+ pub(crate) fn cursor(&self) -> Cursor {
1874
+ unsafe {
1875
+ Cursor {
1876
+ x: clang_getTranslationUnitCursor(self.x),
1877
+ }
1878
+ }
1879
+ }
1880
+
1881
+ /// Save a translation unit to the given file.
1882
+ pub(crate) fn save(&mut self, file: &str) -> Result<(), CXSaveError> {
1883
+ let Ok(file) = CString::new(file) else {
1884
+ return Err(CXSaveError_Unknown);
1885
+ };
1886
+ let ret = unsafe {
1887
+ clang_saveTranslationUnit(
1888
+ self.x,
1889
+ file.as_ptr(),
1890
+ clang_defaultSaveOptions(self.x),
1891
+ )
1892
+ };
1893
+ if ret != 0 {
1894
+ Err(ret)
1895
+ } else {
1896
+ Ok(())
1897
+ }
1898
+ }
1899
+
1900
+ /// Is this the null translation unit?
1901
+ pub(crate) fn is_null(&self) -> bool {
1902
+ self.x.is_null()
1903
+ }
1904
+ }
1905
+
1906
+ impl Drop for TranslationUnit {
1907
+ fn drop(&mut self) {
1908
+ unsafe {
1909
+ clang_disposeTranslationUnit(self.x);
1910
+ }
1911
+ }
1912
+ }
1913
+
1914
+ /// Translation unit used for macro fallback parsing
1915
+ pub(crate) struct FallbackTranslationUnit {
1916
+ file_path: String,
1917
+ pch_path: String,
1918
+ idx: Box<Index>,
1919
+ tu: TranslationUnit,
1920
+ }
1921
+
1922
+ impl fmt::Debug for FallbackTranslationUnit {
1923
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1924
+ write!(fmt, "FallbackTranslationUnit {{ }}")
1925
+ }
1926
+ }
1927
+
1928
+ impl FallbackTranslationUnit {
1929
+ /// Create a new fallback translation unit
1930
+ pub(crate) fn new(
1931
+ file: String,
1932
+ pch_path: String,
1933
+ c_args: &[Box<str>],
1934
+ ) -> Option<Self> {
1935
+ // Create empty file
1936
+ OpenOptions::new()
1937
+ .write(true)
1938
+ .create(true)
1939
+ .truncate(true)
1940
+ .open(&file)
1941
+ .ok()?;
1942
+
1943
+ let f_index = Box::new(Index::new(true, false));
1944
+ let f_translation_unit = TranslationUnit::parse(
1945
+ &f_index,
1946
+ &file,
1947
+ c_args,
1948
+ &[],
1949
+ CXTranslationUnit_None,
1950
+ )?;
1951
+ Some(FallbackTranslationUnit {
1952
+ file_path: file,
1953
+ pch_path,
1954
+ tu: f_translation_unit,
1955
+ idx: f_index,
1956
+ })
1957
+ }
1958
+
1959
+ /// Get reference to underlying translation unit.
1960
+ pub(crate) fn translation_unit(&self) -> &TranslationUnit {
1961
+ &self.tu
1962
+ }
1963
+
1964
+ /// Reparse a translation unit.
1965
+ pub(crate) fn reparse(
1966
+ &mut self,
1967
+ unsaved_contents: &str,
1968
+ ) -> Result<(), CXErrorCode> {
1969
+ let unsaved = &[UnsavedFile::new(&self.file_path, unsaved_contents)];
1970
+ let mut c_unsaved: Vec<CXUnsavedFile> =
1971
+ unsaved.iter().map(|f| f.x).collect();
1972
+ let ret = unsafe {
1973
+ clang_reparseTranslationUnit(
1974
+ self.tu.x,
1975
+ unsaved.len() as c_uint,
1976
+ c_unsaved.as_mut_ptr(),
1977
+ clang_defaultReparseOptions(self.tu.x),
1978
+ )
1979
+ };
1980
+ if ret != 0 {
1981
+ Err(ret)
1982
+ } else {
1983
+ Ok(())
1984
+ }
1985
+ }
1986
+ }
1987
+
1988
+ impl Drop for FallbackTranslationUnit {
1989
+ fn drop(&mut self) {
1990
+ let _ = std::fs::remove_file(&self.file_path);
1991
+ let _ = std::fs::remove_file(&self.pch_path);
1992
+ }
1993
+ }
1994
+
1995
+ /// A diagnostic message generated while parsing a translation unit.
1996
+ pub(crate) struct Diagnostic {
1997
+ x: CXDiagnostic,
1998
+ }
1999
+
2000
+ impl Diagnostic {
2001
+ /// Format this diagnostic message as a string, using the given option bit
2002
+ /// flags.
2003
+ pub(crate) fn format(&self) -> String {
2004
+ unsafe {
2005
+ let opts = clang_defaultDiagnosticDisplayOptions();
2006
+ cxstring_into_string(clang_formatDiagnostic(self.x, opts))
2007
+ }
2008
+ }
2009
+
2010
+ /// What is the severity of this diagnostic message?
2011
+ pub(crate) fn severity(&self) -> CXDiagnosticSeverity {
2012
+ unsafe { clang_getDiagnosticSeverity(self.x) }
2013
+ }
2014
+ }
2015
+
2016
+ impl Drop for Diagnostic {
2017
+ /// Destroy this diagnostic message.
2018
+ fn drop(&mut self) {
2019
+ unsafe {
2020
+ clang_disposeDiagnostic(self.x);
2021
+ }
2022
+ }
2023
+ }
2024
+
2025
+ /// A file which has not been saved to disk.
2026
+ pub(crate) struct UnsavedFile {
2027
+ x: CXUnsavedFile,
2028
+ /// The name of the unsaved file. Kept here to avoid leaving dangling pointers in
2029
+ /// `CXUnsavedFile`.
2030
+ pub(crate) name: CString,
2031
+ contents: CString,
2032
+ }
2033
+
2034
+ impl UnsavedFile {
2035
+ /// Construct a new unsaved file with the given `name` and `contents`.
2036
+ pub(crate) fn new(name: &str, contents: &str) -> UnsavedFile {
2037
+ let name = CString::new(name.as_bytes()).unwrap();
2038
+ let contents = CString::new(contents.as_bytes()).unwrap();
2039
+ let x = CXUnsavedFile {
2040
+ Filename: name.as_ptr(),
2041
+ Contents: contents.as_ptr(),
2042
+ Length: contents.as_bytes().len() as c_ulong,
2043
+ };
2044
+ UnsavedFile { x, name, contents }
2045
+ }
2046
+ }
2047
+
2048
+ impl fmt::Debug for UnsavedFile {
2049
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
2050
+ write!(
2051
+ fmt,
2052
+ "UnsavedFile(name: {:?}, contents: {:?})",
2053
+ self.name, self.contents
2054
+ )
2055
+ }
2056
+ }
2057
+
2058
+ /// Convert a cursor kind into a static string.
2059
+ pub(crate) fn kind_to_str(x: CXCursorKind) -> String {
2060
+ unsafe { cxstring_into_string(clang_getCursorKindSpelling(x)) }
2061
+ }
2062
+
2063
+ /// Convert a type kind to a static string.
2064
+ pub(crate) fn type_to_str(x: CXTypeKind) -> String {
2065
+ unsafe { cxstring_into_string(clang_getTypeKindSpelling(x)) }
2066
+ }
2067
+
2068
+ /// Dump the Clang AST to stdout for debugging purposes.
2069
+ pub(crate) fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
2070
+ fn print_indent<S: AsRef<str>>(depth: isize, s: S) {
2071
+ for _ in 0..depth {
2072
+ print!(" ");
2073
+ }
2074
+ println!("{}", s.as_ref());
2075
+ }
2076
+
2077
+ fn print_cursor<S: AsRef<str>>(depth: isize, prefix: S, c: &Cursor) {
2078
+ let prefix = prefix.as_ref();
2079
+ print_indent(
2080
+ depth,
2081
+ format!(" {prefix}kind = {}", kind_to_str(c.kind())),
2082
+ );
2083
+ print_indent(
2084
+ depth,
2085
+ format!(" {prefix}spelling = \"{}\"", c.spelling()),
2086
+ );
2087
+ print_indent(depth, format!(" {prefix}location = {}", c.location()));
2088
+ print_indent(
2089
+ depth,
2090
+ format!(" {prefix}is-definition? {}", c.is_definition()),
2091
+ );
2092
+ print_indent(
2093
+ depth,
2094
+ format!(" {prefix}is-declaration? {}", c.is_declaration()),
2095
+ );
2096
+ print_indent(
2097
+ depth,
2098
+ format!(
2099
+ " {prefix}is-inlined-function? {}",
2100
+ c.is_inlined_function()
2101
+ ),
2102
+ );
2103
+
2104
+ let templ_kind = c.template_kind();
2105
+ if templ_kind != CXCursor_NoDeclFound {
2106
+ print_indent(
2107
+ depth,
2108
+ format!(" {prefix}template-kind = {}", kind_to_str(templ_kind)),
2109
+ );
2110
+ }
2111
+ if let Some(usr) = c.usr() {
2112
+ print_indent(depth, format!(" {prefix}usr = \"{usr}\""));
2113
+ }
2114
+ if let Ok(num) = c.num_args() {
2115
+ print_indent(depth, format!(" {prefix}number-of-args = {num}"));
2116
+ }
2117
+ if let Some(num) = c.num_template_args() {
2118
+ print_indent(
2119
+ depth,
2120
+ format!(" {prefix}number-of-template-args = {num}"),
2121
+ );
2122
+ }
2123
+
2124
+ if c.is_bit_field() {
2125
+ let width = match c.bit_width() {
2126
+ Some(w) => w.to_string(),
2127
+ None => "<unevaluable>".to_string(),
2128
+ };
2129
+ print_indent(depth, format!(" {prefix}bit-width = {width}"));
2130
+ }
2131
+
2132
+ if let Some(ty) = c.enum_type() {
2133
+ print_indent(
2134
+ depth,
2135
+ format!(" {prefix}enum-type = {}", type_to_str(ty.kind())),
2136
+ );
2137
+ }
2138
+ if let Some(val) = c.enum_val_signed() {
2139
+ print_indent(depth, format!(" {prefix}enum-val = {val}"));
2140
+ }
2141
+ if let Some(ty) = c.typedef_type() {
2142
+ print_indent(
2143
+ depth,
2144
+ format!(" {prefix}typedef-type = {}", type_to_str(ty.kind())),
2145
+ );
2146
+ }
2147
+ if let Some(ty) = c.ret_type() {
2148
+ print_indent(
2149
+ depth,
2150
+ format!(" {prefix}ret-type = {}", type_to_str(ty.kind())),
2151
+ );
2152
+ }
2153
+
2154
+ if let Some(refd) = c.referenced() {
2155
+ if refd != *c {
2156
+ println!();
2157
+ print_cursor(
2158
+ depth,
2159
+ String::from(prefix) + "referenced.",
2160
+ &refd,
2161
+ );
2162
+ }
2163
+ }
2164
+
2165
+ let canonical = c.canonical();
2166
+ if canonical != *c {
2167
+ println!();
2168
+ print_cursor(
2169
+ depth,
2170
+ String::from(prefix) + "canonical.",
2171
+ &canonical,
2172
+ );
2173
+ }
2174
+
2175
+ if let Some(specialized) = c.specialized() {
2176
+ if specialized != *c {
2177
+ println!();
2178
+ print_cursor(
2179
+ depth,
2180
+ String::from(prefix) + "specialized.",
2181
+ &specialized,
2182
+ );
2183
+ }
2184
+ }
2185
+
2186
+ if let Some(parent) = c.fallible_semantic_parent() {
2187
+ println!();
2188
+ print_cursor(
2189
+ depth,
2190
+ String::from(prefix) + "semantic-parent.",
2191
+ &parent,
2192
+ );
2193
+ }
2194
+ }
2195
+
2196
+ fn print_type<S: AsRef<str>>(depth: isize, prefix: S, ty: &Type) {
2197
+ let prefix = prefix.as_ref();
2198
+
2199
+ let kind = ty.kind();
2200
+ print_indent(depth, format!(" {prefix}kind = {}", type_to_str(kind)));
2201
+ if kind == CXType_Invalid {
2202
+ return;
2203
+ }
2204
+
2205
+ print_indent(depth, format!(" {prefix}cconv = {}", ty.call_conv()));
2206
+
2207
+ print_indent(
2208
+ depth,
2209
+ format!(" {prefix}spelling = \"{}\"", ty.spelling()),
2210
+ );
2211
+ let num_template_args =
2212
+ unsafe { clang_Type_getNumTemplateArguments(ty.x) };
2213
+ if num_template_args >= 0 {
2214
+ print_indent(
2215
+ depth,
2216
+ format!(
2217
+ " {prefix}number-of-template-args = {num_template_args}"
2218
+ ),
2219
+ );
2220
+ }
2221
+ if let Some(num) = ty.num_elements() {
2222
+ print_indent(depth, format!(" {prefix}number-of-elements = {num}"));
2223
+ }
2224
+ print_indent(
2225
+ depth,
2226
+ format!(" {prefix}is-variadic? {}", ty.is_variadic()),
2227
+ );
2228
+
2229
+ let canonical = ty.canonical_type();
2230
+ if canonical != *ty {
2231
+ println!();
2232
+ print_type(depth, String::from(prefix) + "canonical.", &canonical);
2233
+ }
2234
+
2235
+ if let Some(pointee) = ty.pointee_type() {
2236
+ if pointee != *ty {
2237
+ println!();
2238
+ print_type(depth, String::from(prefix) + "pointee.", &pointee);
2239
+ }
2240
+ }
2241
+
2242
+ if let Some(elem) = ty.elem_type() {
2243
+ if elem != *ty {
2244
+ println!();
2245
+ print_type(depth, String::from(prefix) + "elements.", &elem);
2246
+ }
2247
+ }
2248
+
2249
+ if let Some(ret) = ty.ret_type() {
2250
+ if ret != *ty {
2251
+ println!();
2252
+ print_type(depth, String::from(prefix) + "return.", &ret);
2253
+ }
2254
+ }
2255
+
2256
+ let named = ty.named();
2257
+ if named != *ty && named.is_valid() {
2258
+ println!();
2259
+ print_type(depth, String::from(prefix) + "named.", &named);
2260
+ }
2261
+ }
2262
+
2263
+ print_indent(depth, "(");
2264
+ print_cursor(depth, "", c);
2265
+
2266
+ println!();
2267
+ let ty = c.cur_type();
2268
+ print_type(depth, "type.", &ty);
2269
+
2270
+ let declaration = ty.declaration();
2271
+ if declaration != *c && declaration.kind() != CXCursor_NoDeclFound {
2272
+ println!();
2273
+ print_cursor(depth, "type.declaration.", &declaration);
2274
+ }
2275
+
2276
+ // Recurse.
2277
+ let mut found_children = false;
2278
+ c.visit(|s| {
2279
+ if !found_children {
2280
+ println!();
2281
+ found_children = true;
2282
+ }
2283
+ ast_dump(&s, depth + 1)
2284
+ });
2285
+
2286
+ print_indent(depth, ")");
2287
+
2288
+ CXChildVisit_Continue
2289
+ }
2290
+
2291
+ /// Try to extract the clang version to a string
2292
+ pub(crate) fn extract_clang_version() -> String {
2293
+ unsafe { cxstring_into_string(clang_getClangVersion()) }
2294
+ }
2295
+
2296
+ /// A wrapper for the result of evaluating an expression.
2297
+ #[derive(Debug)]
2298
+ pub(crate) struct EvalResult {
2299
+ x: CXEvalResult,
2300
+ ty: Type,
2301
+ }
2302
+
2303
+ impl EvalResult {
2304
+ /// Evaluate `cursor` and return the result.
2305
+ pub(crate) fn new(cursor: Cursor) -> Option<Self> {
2306
+ // Work around https://bugs.llvm.org/show_bug.cgi?id=42532, see:
2307
+ // * https://github.com/rust-lang/rust-bindgen/issues/283
2308
+ // * https://github.com/rust-lang/rust-bindgen/issues/1590
2309
+ {
2310
+ let mut found_cant_eval = false;
2311
+ cursor.visit(|c| {
2312
+ if c.kind() == CXCursor_TypeRef &&
2313
+ c.cur_type().canonical_type().kind() == CXType_Unexposed
2314
+ {
2315
+ found_cant_eval = true;
2316
+ return CXChildVisit_Break;
2317
+ }
2318
+
2319
+ CXChildVisit_Recurse
2320
+ });
2321
+
2322
+ if found_cant_eval {
2323
+ return None;
2324
+ }
2325
+ }
2326
+ Some(EvalResult {
2327
+ x: unsafe { clang_Cursor_Evaluate(cursor.x) },
2328
+ ty: cursor.cur_type().canonical_type(),
2329
+ })
2330
+ }
2331
+
2332
+ fn kind(&self) -> CXEvalResultKind {
2333
+ unsafe { clang_EvalResult_getKind(self.x) }
2334
+ }
2335
+
2336
+ /// Try to get back the result as a double.
2337
+ pub(crate) fn as_double(&self) -> Option<f64> {
2338
+ match self.kind() {
2339
+ CXEval_Float => {
2340
+ Some(unsafe { clang_EvalResult_getAsDouble(self.x) })
2341
+ }
2342
+ _ => None,
2343
+ }
2344
+ }
2345
+
2346
+ /// Try to get back the result as an integer.
2347
+ pub(crate) fn as_int(&self) -> Option<i64> {
2348
+ if self.kind() != CXEval_Int {
2349
+ return None;
2350
+ }
2351
+
2352
+ if unsafe { clang_EvalResult_isUnsignedInt(self.x) } != 0 {
2353
+ let value = unsafe { clang_EvalResult_getAsUnsigned(self.x) };
2354
+ if value > i64::MAX as c_ulonglong {
2355
+ return None;
2356
+ }
2357
+
2358
+ return Some(value as i64);
2359
+ }
2360
+
2361
+ let value = unsafe { clang_EvalResult_getAsLongLong(self.x) };
2362
+ if value > i64::MAX as c_longlong {
2363
+ return None;
2364
+ }
2365
+ if value < i64::MIN as c_longlong {
2366
+ return None;
2367
+ }
2368
+ #[allow(clippy::unnecessary_cast)]
2369
+ Some(value as i64)
2370
+ }
2371
+
2372
+ /// Evaluates the expression as a literal string, that may or may not be
2373
+ /// valid utf-8.
2374
+ pub(crate) fn as_literal_string(&self) -> Option<Vec<u8>> {
2375
+ if self.kind() != CXEval_StrLiteral {
2376
+ return None;
2377
+ }
2378
+
2379
+ let char_ty = self.ty.pointee_type().or_else(|| self.ty.elem_type())?;
2380
+ match char_ty.kind() {
2381
+ CXType_Char_S | CXType_SChar | CXType_Char_U | CXType_UChar => {
2382
+ let ret = unsafe {
2383
+ CStr::from_ptr(clang_EvalResult_getAsStr(self.x))
2384
+ };
2385
+ Some(ret.to_bytes().to_vec())
2386
+ }
2387
+ // FIXME: Support generating these.
2388
+ CXType_Char16 => None,
2389
+ CXType_Char32 => None,
2390
+ CXType_WChar => None,
2391
+ _ => None,
2392
+ }
2393
+ }
2394
+ }
2395
+
2396
+ impl Drop for EvalResult {
2397
+ fn drop(&mut self) {
2398
+ unsafe { clang_EvalResult_dispose(self.x) };
2399
+ }
2400
+ }
2401
+ /// ABI kinds as defined in
2402
+ /// <https://github.com/llvm/llvm-project/blob/ddf1de20a3f7db3bca1ef6ba7e6cbb90aac5fd2d/clang/include/clang/Basic/TargetCXXABI.def>
2403
+ #[derive(Debug, Eq, PartialEq, Copy, Clone)]
2404
+ pub(crate) enum ABIKind {
2405
+ /// All the regular targets like Linux, Mac, WASM, etc. implement the Itanium ABI
2406
+ GenericItanium,
2407
+ /// The ABI used when compiling for the MSVC target
2408
+ Microsoft,
2409
+ }
2410
+
2411
+ /// Target information obtained from libclang.
2412
+ #[derive(Debug)]
2413
+ pub(crate) struct TargetInfo {
2414
+ /// The target triple.
2415
+ pub(crate) triple: String,
2416
+ /// The width of the pointer _in bits_.
2417
+ pub(crate) pointer_width: usize,
2418
+ /// The ABI of the target
2419
+ pub(crate) abi: ABIKind,
2420
+ }
2421
+
2422
+ impl TargetInfo {
2423
+ /// Tries to obtain target information from libclang.
2424
+ pub(crate) fn new(tu: &TranslationUnit) -> Self {
2425
+ let triple;
2426
+ let pointer_width;
2427
+ unsafe {
2428
+ let ti = clang_getTranslationUnitTargetInfo(tu.x);
2429
+ triple = cxstring_into_string(clang_TargetInfo_getTriple(ti));
2430
+ pointer_width = clang_TargetInfo_getPointerWidth(ti);
2431
+ clang_TargetInfo_dispose(ti);
2432
+ }
2433
+ assert!(pointer_width > 0);
2434
+ assert_eq!(pointer_width % 8, 0);
2435
+
2436
+ let abi = if triple.contains("msvc") {
2437
+ ABIKind::Microsoft
2438
+ } else {
2439
+ ABIKind::GenericItanium
2440
+ };
2441
+
2442
+ TargetInfo {
2443
+ triple,
2444
+ pointer_width: pointer_width as usize,
2445
+ abi,
2446
+ }
2447
+ }
2448
+ }