code_ownership 2.2.0 → 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 (445) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +30 -27
  3. data/bin/codeownership +1 -0
  4. data/ext/cargo-vendor/bindgen-0.72.1/.cargo-checksum.json +1 -0
  5. data/ext/cargo-vendor/bindgen-0.72.1/.cargo_vcs_info.json +6 -0
  6. data/ext/cargo-vendor/bindgen-0.72.1/Cargo.lock +485 -0
  7. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/Cargo.toml +72 -38
  8. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/Cargo.toml.orig +26 -28
  9. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/README.md +2 -2
  10. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/build.rs +2 -2
  11. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/callbacks.rs +114 -10
  12. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/clang.rs +184 -83
  13. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/bitfield_unit.rs +20 -10
  14. data/ext/cargo-vendor/bindgen-0.72.1/codegen/bitfield_unit_raw_ref_macros.rs +191 -0
  15. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/bitfield_unit_tests.rs +4 -4
  16. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/dyngen.rs +77 -20
  17. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/error.rs +2 -3
  18. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/helpers.rs +106 -66
  19. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/impl_debug.rs +32 -34
  20. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/impl_partialeq.rs +5 -5
  21. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/mod.rs +1197 -679
  22. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/merge_extern_blocks.rs +3 -3
  23. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/sort_semantically.rs +3 -3
  24. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/serialize.rs +33 -34
  25. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/struct_layout.rs +33 -26
  26. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/deps.rs +1 -1
  27. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/diagnostics.rs +22 -65
  28. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/extra_assertions.rs +1 -1
  29. data/ext/cargo-vendor/bindgen-0.72.1/features.rs +570 -0
  30. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/derive.rs +69 -75
  31. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_destructor.rs +5 -6
  32. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_float.rs +13 -17
  33. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_type_param_in_array.rs +22 -32
  34. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_vtable.rs +11 -16
  35. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/mod.rs +15 -20
  36. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/sizedness.rs +13 -21
  37. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/template_params.rs +20 -26
  38. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/annotations.rs +18 -15
  39. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/comment.rs +2 -2
  40. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/comp.rs +54 -29
  41. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/context.rs +205 -136
  42. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/derive.rs +5 -10
  43. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/dot.rs +3 -4
  44. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/enum_ty.rs +5 -7
  45. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/function.rs +27 -28
  46. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/int.rs +7 -6
  47. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/item.rs +92 -132
  48. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/item_kind.rs +7 -7
  49. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/layout.rs +11 -23
  50. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/module.rs +2 -2
  51. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/objc.rs +22 -33
  52. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/template.rs +26 -33
  53. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/traversal.rs +4 -5
  54. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/ty.rs +63 -88
  55. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/var.rs +73 -38
  56. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/lib.rs +186 -144
  57. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/log_stubs.rs +6 -0
  58. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/as_args.rs +1 -1
  59. data/ext/cargo-vendor/bindgen-0.72.1/options/cli.rs +1151 -0
  60. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/mod.rs +234 -27
  61. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/regex_set.rs +23 -28
  62. data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/time.rs +4 -4
  63. data/ext/cargo-vendor/rb-sys-0.9.130/.cargo-checksum.json +1 -0
  64. data/ext/cargo-vendor/rb-sys-0.9.130/.cargo_vcs_info.json +6 -0
  65. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/Cargo.lock +23 -31
  66. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/Cargo.toml +5 -4
  67. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/Cargo.toml.orig +5 -4
  68. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/main.rs +7 -1
  69. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/stable_api_config.rs +30 -6
  70. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/version.rs +14 -6
  71. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/bindings.rs +1 -0
  72. data/ext/cargo-vendor/rb-sys-0.9.130/src/macros.rs +701 -0
  73. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/memory.rs +17 -6
  74. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/stable_api/compiled.c +169 -10
  75. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/stable_api/compiled.rs +209 -14
  76. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_2_7.rs +770 -0
  77. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_0.rs +773 -0
  78. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_1.rs +766 -0
  79. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_2.rs +764 -0
  80. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_3.rs +777 -0
  81. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_4.rs +788 -0
  82. data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_4_0.rs +784 -0
  83. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/stable_api.rs +213 -9
  84. data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/utils.rs +12 -7
  85. data/ext/cargo-vendor/rb-sys-build-0.9.130/.cargo-checksum.json +1 -0
  86. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/.cargo_vcs_info.json +1 -1
  87. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/Cargo.lock +19 -27
  88. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/Cargo.toml +8 -3
  89. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/Cargo.toml.orig +4 -3
  90. data/ext/cargo-vendor/rb-sys-build-0.9.130/src/bindings/gc_stress.rs +303 -0
  91. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/stable_api.rs +102 -11
  92. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings.rs +19 -13
  93. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/cc.rs +1 -1
  94. data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config.rs +199 -2
  95. data/ext/cargo-vendor/rb-sys-build-0.9.130/tests/fixtures/rubyopt_stdout.rb +1 -0
  96. data/ext/cargo-vendor/rb-sys-build-0.9.130/tests/rubyopt.rs +17 -0
  97. data/ext/cargo-vendor/rb-sys-env-0.2.3/.cargo-checksum.json +1 -0
  98. data/ext/cargo-vendor/rb-sys-env-0.2.3/.cargo_vcs_info.json +6 -0
  99. data/ext/cargo-vendor/rb-sys-env-0.2.3/Cargo.lock +7 -0
  100. data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/Cargo.toml +2 -2
  101. data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/Cargo.toml.orig +2 -2
  102. data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/readme.md +0 -2
  103. data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/ruby_version.rs +3 -1
  104. data/ext/cargo-vendor/rustc-hash-2.1.3/.cargo-checksum.json +1 -0
  105. data/ext/cargo-vendor/rustc-hash-2.1.3/.cargo_vcs_info.json +6 -0
  106. data/ext/cargo-vendor/rustc-hash-2.1.3/.github/workflows/rust.yml +73 -0
  107. data/ext/cargo-vendor/rustc-hash-2.1.3/CHANGELOG.md +41 -0
  108. data/ext/cargo-vendor/rustc-hash-2.1.3/CODE_OF_CONDUCT.md +3 -0
  109. data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.lock +90 -0
  110. data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.toml +50 -0
  111. data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.toml.orig +20 -0
  112. data/ext/cargo-vendor/rustc-hash-2.1.3/LICENSE-APACHE +176 -0
  113. data/ext/cargo-vendor/rustc-hash-2.1.3/LICENSE-MIT +23 -0
  114. data/ext/cargo-vendor/rustc-hash-2.1.3/README.md +42 -0
  115. data/ext/cargo-vendor/rustc-hash-2.1.3/src/lib.rs +472 -0
  116. data/ext/cargo-vendor/rustc-hash-2.1.3/src/random_state.rs +101 -0
  117. data/ext/cargo-vendor/rustc-hash-2.1.3/src/seeded_state.rs +76 -0
  118. data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/.cargo-checksum.json +1 -1
  119. data/ext/cargo-vendor/serde-1.0.229/.cargo_vcs_info.json +6 -0
  120. data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/Cargo.lock +13 -13
  121. data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/Cargo.toml +2 -2
  122. data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/Cargo.toml.orig +2 -2
  123. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde-1.0.229}/README.md +3 -3
  124. data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/build.rs +2 -2
  125. data/ext/cargo-vendor/{serde_core-1.0.228/src → serde-1.0.229/src/core}/de/impls.rs +4 -4
  126. data/ext/cargo-vendor/{serde_core-1.0.228/src → serde-1.0.229/src/core}/lib.rs +2 -2
  127. data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/lib.rs +3 -3
  128. data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/.cargo-checksum.json +1 -1
  129. data/ext/cargo-vendor/serde_core-1.0.229/.cargo_vcs_info.json +6 -0
  130. data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/Cargo.lock +11 -11
  131. data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/Cargo.toml +2 -2
  132. data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/Cargo.toml.orig +2 -2
  133. data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/build.rs +5 -5
  134. data/ext/cargo-vendor/{serde-1.0.228/src/core → serde_core-1.0.229/src}/de/impls.rs +4 -4
  135. data/ext/cargo-vendor/{serde-1.0.228/src/core → serde_core-1.0.229/src}/lib.rs +2 -2
  136. data/ext/cargo-vendor/serde_derive-1.0.229/.cargo-checksum.json +1 -0
  137. data/ext/cargo-vendor/serde_derive-1.0.229/.cargo_vcs_info.json +6 -0
  138. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/Cargo.lock +29 -18
  139. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/Cargo.toml +3 -3
  140. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/Cargo.toml.orig +2 -2
  141. data/ext/cargo-vendor/{serde-1.0.228 → serde_derive-1.0.229}/README.md +3 -3
  142. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/bound.rs +80 -59
  143. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_adjacently.rs +46 -45
  144. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_externally.rs +3 -2
  145. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de.rs +10 -7
  146. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/ast.rs +15 -8
  147. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/attr.rs +18 -31
  148. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/ctxt.rs +3 -4
  149. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/receiver.rs +2 -2
  150. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/lib.rs +1 -1
  151. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/pretend.rs +7 -7
  152. data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/ser.rs +94 -94
  153. data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/.cargo-checksum.json +1 -1
  154. data/ext/cargo-vendor/serde_magnus-0.11.0/.cargo_vcs_info.json +6 -0
  155. data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/Cargo.lock +71 -73
  156. data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/Cargo.toml +2 -2
  157. data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/Cargo.toml.orig +2 -2
  158. data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/README.md +1 -1
  159. data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/deserializer.rs +2 -2
  160. data/ext/cargo-vendor/syn-3.0.9/.cargo-checksum.json +1 -0
  161. data/ext/cargo-vendor/syn-3.0.9/.cargo_vcs_info.json +6 -0
  162. data/ext/cargo-vendor/syn-3.0.9/Cargo.lock +1948 -0
  163. data/ext/cargo-vendor/syn-3.0.9/Cargo.toml +268 -0
  164. data/ext/cargo-vendor/syn-3.0.9/Cargo.toml.orig +95 -0
  165. data/ext/cargo-vendor/{lazycell-1.3.0 → syn-3.0.9}/LICENSE-APACHE +0 -25
  166. data/ext/cargo-vendor/syn-3.0.9/README.md +297 -0
  167. data/ext/cargo-vendor/syn-3.0.9/benches/file.rs +59 -0
  168. data/ext/cargo-vendor/syn-3.0.9/benches/rust.rs +189 -0
  169. data/ext/cargo-vendor/syn-3.0.9/src/attr.rs +841 -0
  170. data/ext/cargo-vendor/syn-3.0.9/src/bigint.rs +68 -0
  171. data/ext/cargo-vendor/syn-3.0.9/src/buffer.rs +462 -0
  172. data/ext/cargo-vendor/syn-3.0.9/src/classify.rs +311 -0
  173. data/ext/cargo-vendor/syn-3.0.9/src/custom_keyword.rs +260 -0
  174. data/ext/cargo-vendor/syn-3.0.9/src/custom_punctuation.rs +305 -0
  175. data/ext/cargo-vendor/syn-3.0.9/src/data.rs +489 -0
  176. data/ext/cargo-vendor/syn-3.0.9/src/derive.rs +260 -0
  177. data/ext/cargo-vendor/syn-3.0.9/src/discouraged.rs +233 -0
  178. data/ext/cargo-vendor/syn-3.0.9/src/drops.rs +58 -0
  179. data/ext/cargo-vendor/syn-3.0.9/src/error.rs +552 -0
  180. data/ext/cargo-vendor/syn-3.0.9/src/export.rs +73 -0
  181. data/ext/cargo-vendor/syn-3.0.9/src/expr.rs +4249 -0
  182. data/ext/cargo-vendor/syn-3.0.9/src/ext.rs +180 -0
  183. data/ext/cargo-vendor/syn-3.0.9/src/file.rs +136 -0
  184. data/ext/cargo-vendor/syn-3.0.9/src/fixup.rs +773 -0
  185. data/ext/cargo-vendor/syn-3.0.9/src/gen/clone.rs +2394 -0
  186. data/ext/cargo-vendor/syn-3.0.9/src/gen/debug.rs +3399 -0
  187. data/ext/cargo-vendor/syn-3.0.9/src/gen/eq.rs +2459 -0
  188. data/ext/cargo-vendor/syn-3.0.9/src/gen/fold.rs +3934 -0
  189. data/ext/cargo-vendor/syn-3.0.9/src/gen/hash.rs +3040 -0
  190. data/ext/cargo-vendor/syn-3.0.9/src/gen/token.css +744 -0
  191. data/ext/cargo-vendor/syn-3.0.9/src/gen/visit.rs +4037 -0
  192. data/ext/cargo-vendor/syn-3.0.9/src/gen/visit_mut.rs +3824 -0
  193. data/ext/cargo-vendor/syn-3.0.9/src/generics.rs +1490 -0
  194. data/ext/cargo-vendor/syn-3.0.9/src/group.rs +294 -0
  195. data/ext/cargo-vendor/syn-3.0.9/src/ident.rs +109 -0
  196. data/ext/cargo-vendor/syn-3.0.9/src/item.rs +3923 -0
  197. data/ext/cargo-vendor/syn-3.0.9/src/lib.rs +1132 -0
  198. data/ext/cargo-vendor/syn-3.0.9/src/lifetime.rs +193 -0
  199. data/ext/cargo-vendor/syn-3.0.9/src/lit.rs +1881 -0
  200. data/ext/cargo-vendor/syn-3.0.9/src/lookahead.rs +350 -0
  201. data/ext/cargo-vendor/syn-3.0.9/src/mac.rs +225 -0
  202. data/ext/cargo-vendor/syn-3.0.9/src/macros.rs +151 -0
  203. data/ext/cargo-vendor/syn-3.0.9/src/meta.rs +427 -0
  204. data/ext/cargo-vendor/syn-3.0.9/src/op.rs +219 -0
  205. data/ext/cargo-vendor/syn-3.0.9/src/parse.rs +1420 -0
  206. data/ext/cargo-vendor/syn-3.0.9/src/parse_macro_input.rs +128 -0
  207. data/ext/cargo-vendor/syn-3.0.9/src/parse_quote.rs +261 -0
  208. data/ext/cargo-vendor/syn-3.0.9/src/pat.rs +994 -0
  209. data/ext/cargo-vendor/syn-3.0.9/src/path.rs +972 -0
  210. data/ext/cargo-vendor/syn-3.0.9/src/precedence.rs +210 -0
  211. data/ext/cargo-vendor/syn-3.0.9/src/print.rs +16 -0
  212. data/ext/cargo-vendor/syn-3.0.9/src/punctuated.rs +1200 -0
  213. data/ext/cargo-vendor/syn-3.0.9/src/restriction.rs +160 -0
  214. data/ext/cargo-vendor/syn-3.0.9/src/scan_expr.rs +270 -0
  215. data/ext/cargo-vendor/syn-3.0.9/src/sealed.rs +4 -0
  216. data/ext/cargo-vendor/syn-3.0.9/src/span.rs +63 -0
  217. data/ext/cargo-vendor/syn-3.0.9/src/spanned.rs +118 -0
  218. data/ext/cargo-vendor/syn-3.0.9/src/stmt.rs +536 -0
  219. data/ext/cargo-vendor/syn-3.0.9/src/thread.rs +60 -0
  220. data/ext/cargo-vendor/syn-3.0.9/src/token.rs +1103 -0
  221. data/ext/cargo-vendor/syn-3.0.9/src/tt.rs +97 -0
  222. data/ext/cargo-vendor/syn-3.0.9/src/ty.rs +1347 -0
  223. data/ext/cargo-vendor/syn-3.0.9/src/verbatim.rs +32 -0
  224. data/ext/cargo-vendor/syn-3.0.9/src/whitespace.rs +65 -0
  225. data/ext/cargo-vendor/syn-3.0.9/tests/common/eq.rs +939 -0
  226. data/ext/cargo-vendor/syn-3.0.9/tests/common/mod.rs +6 -0
  227. data/ext/cargo-vendor/syn-3.0.9/tests/common/parse.rs +51 -0
  228. data/ext/cargo-vendor/syn-3.0.9/tests/common/visit.rs +119 -0
  229. data/ext/cargo-vendor/syn-3.0.9/tests/debug/gen.rs +5394 -0
  230. data/ext/cargo-vendor/syn-3.0.9/tests/debug/mod.rs +147 -0
  231. data/ext/cargo-vendor/syn-3.0.9/tests/macros/mod.rs +7 -0
  232. data/ext/cargo-vendor/syn-3.0.9/tests/regression/issue1108.rs +5 -0
  233. data/ext/cargo-vendor/syn-3.0.9/tests/regression/issue1235.rs +32 -0
  234. data/ext/cargo-vendor/syn-3.0.9/tests/regression.rs +5 -0
  235. data/ext/cargo-vendor/syn-3.0.9/tests/repo/mod.rs +789 -0
  236. data/ext/cargo-vendor/syn-3.0.9/tests/repo/progress.rs +37 -0
  237. data/ext/cargo-vendor/syn-3.0.9/tests/snapshot/mod.rs +68 -0
  238. data/ext/cargo-vendor/syn-3.0.9/tests/test_attribute.rs +231 -0
  239. data/ext/cargo-vendor/syn-3.0.9/tests/test_derive_input.rs +801 -0
  240. data/ext/cargo-vendor/syn-3.0.9/tests/test_expr.rs +1721 -0
  241. data/ext/cargo-vendor/syn-3.0.9/tests/test_generics.rs +363 -0
  242. data/ext/cargo-vendor/syn-3.0.9/tests/test_grouping.rs +59 -0
  243. data/ext/cargo-vendor/syn-3.0.9/tests/test_ident.rs +87 -0
  244. data/ext/cargo-vendor/syn-3.0.9/tests/test_item.rs +374 -0
  245. data/ext/cargo-vendor/syn-3.0.9/tests/test_lit.rs +335 -0
  246. data/ext/cargo-vendor/syn-3.0.9/tests/test_meta.rs +180 -0
  247. data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_buffer.rs +104 -0
  248. data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_quote.rs +175 -0
  249. data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_stream.rs +187 -0
  250. data/ext/cargo-vendor/syn-3.0.9/tests/test_pat.rs +158 -0
  251. data/ext/cargo-vendor/syn-3.0.9/tests/test_path.rs +117 -0
  252. data/ext/cargo-vendor/syn-3.0.9/tests/test_precedence.rs +560 -0
  253. data/ext/cargo-vendor/syn-3.0.9/tests/test_punctuated.rs +92 -0
  254. data/ext/cargo-vendor/syn-3.0.9/tests/test_receiver.rs +275 -0
  255. data/ext/cargo-vendor/syn-3.0.9/tests/test_round_trip.rs +226 -0
  256. data/ext/cargo-vendor/syn-3.0.9/tests/test_shebang.rs +77 -0
  257. data/ext/cargo-vendor/syn-3.0.9/tests/test_size.rs +54 -0
  258. data/ext/cargo-vendor/syn-3.0.9/tests/test_stmt.rs +378 -0
  259. data/ext/cargo-vendor/syn-3.0.9/tests/test_token_trees.rs +38 -0
  260. data/ext/cargo-vendor/syn-3.0.9/tests/test_ty.rs +479 -0
  261. data/ext/cargo-vendor/syn-3.0.9/tests/test_unparenthesize.rs +71 -0
  262. data/ext/cargo-vendor/syn-3.0.9/tests/test_visibility.rs +193 -0
  263. data/ext/cargo-vendor/syn-3.0.9/tests/zzz_stable.rs +33 -0
  264. data/ext/code_ownership/Cargo.toml +1 -1
  265. data/ext/code_ownership/src/lib.rs +2 -2
  266. data/lib/code_ownership/version.rb +1 -1
  267. data/lib/code_ownership.rb +1 -1
  268. metadata +400 -293
  269. data/ext/cargo-vendor/bindgen-0.69.5/.cargo-checksum.json +0 -1
  270. data/ext/cargo-vendor/bindgen-0.69.5/.cargo_vcs_info.json +0 -6
  271. data/ext/cargo-vendor/bindgen-0.69.5/features.rs +0 -296
  272. data/ext/cargo-vendor/lazycell-1.3.0/.cargo-checksum.json +0 -1
  273. data/ext/cargo-vendor/lazycell-1.3.0/.cargo_vcs_info.json +0 -5
  274. data/ext/cargo-vendor/lazycell-1.3.0/CHANGELOG.md +0 -197
  275. data/ext/cargo-vendor/lazycell-1.3.0/Cargo.toml +0 -34
  276. data/ext/cargo-vendor/lazycell-1.3.0/Cargo.toml.orig +0 -27
  277. data/ext/cargo-vendor/lazycell-1.3.0/LICENSE-MIT +0 -26
  278. data/ext/cargo-vendor/lazycell-1.3.0/README.md +0 -73
  279. data/ext/cargo-vendor/lazycell-1.3.0/src/lib.rs +0 -680
  280. data/ext/cargo-vendor/lazycell-1.3.0/src/serde_impl.rs +0 -86
  281. data/ext/cargo-vendor/rb-sys-0.9.117/.cargo-checksum.json +0 -1
  282. data/ext/cargo-vendor/rb-sys-0.9.117/.cargo_vcs_info.json +0 -6
  283. data/ext/cargo-vendor/rb-sys-0.9.117/src/macros.rs +0 -371
  284. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_2_6.rs +0 -324
  285. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_2_7.rs +0 -324
  286. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_0.rs +0 -332
  287. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_1.rs +0 -325
  288. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_2.rs +0 -323
  289. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_3.rs +0 -339
  290. data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_4.rs +0 -339
  291. data/ext/cargo-vendor/rb-sys-build-0.9.117/.cargo-checksum.json +0 -1
  292. data/ext/cargo-vendor/rb-sys-env-0.2.2/.cargo-checksum.json +0 -1
  293. data/ext/cargo-vendor/rb-sys-env-0.2.2/.cargo_vcs_info.json +0 -6
  294. data/ext/cargo-vendor/rustc-hash-1.1.0/.cargo-checksum.json +0 -1
  295. data/ext/cargo-vendor/rustc-hash-1.1.0/.cargo_vcs_info.json +0 -5
  296. data/ext/cargo-vendor/rustc-hash-1.1.0/CODE_OF_CONDUCT.md +0 -40
  297. data/ext/cargo-vendor/rustc-hash-1.1.0/Cargo.toml +0 -25
  298. data/ext/cargo-vendor/rustc-hash-1.1.0/Cargo.toml.orig +0 -13
  299. data/ext/cargo-vendor/rustc-hash-1.1.0/LICENSE-APACHE +0 -201
  300. data/ext/cargo-vendor/rustc-hash-1.1.0/README.md +0 -38
  301. data/ext/cargo-vendor/rustc-hash-1.1.0/src/lib.rs +0 -148
  302. data/ext/cargo-vendor/serde-1.0.228/.cargo_vcs_info.json +0 -6
  303. data/ext/cargo-vendor/serde_core-1.0.228/.cargo_vcs_info.json +0 -6
  304. data/ext/cargo-vendor/serde_derive-1.0.228/.cargo-checksum.json +0 -1
  305. data/ext/cargo-vendor/serde_derive-1.0.228/.cargo_vcs_info.json +0 -6
  306. data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo_vcs_info.json +0 -6
  307. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/LICENSE +0 -0
  308. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/mod.rs +0 -0
  309. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/mod.rs +0 -0
  310. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/helpers.rs +0 -0
  311. /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/parse.rs +0 -0
  312. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/LICENSE-APACHE +0 -0
  313. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/LICENSE-MIT +0 -0
  314. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/bin/release.sh +0 -0
  315. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/features.rs +0 -0
  316. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/readme.md +0 -0
  317. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/hidden.rs +0 -0
  318. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/lib.rs +0 -0
  319. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/ruby_abi_version.rs +0 -0
  320. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/special_consts.rs +0 -0
  321. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/symbol.rs +0 -0
  322. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/tracking_allocator.rs +0 -0
  323. /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/value_type.rs +0 -0
  324. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/LICENSE-APACHE +0 -0
  325. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/LICENSE-MIT +0 -0
  326. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/sanitizer.rs +0 -0
  327. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/wrapper.h +0 -0
  328. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/lib.rs +0 -0
  329. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/flags.rs +0 -0
  330. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/library.rs +0 -0
  331. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/search_path.rs +0 -0
  332. /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/utils.rs +0 -0
  333. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/LICENSE-APACHE +0 -0
  334. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/LICENSE-MIT +0 -0
  335. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/build.rs +0 -0
  336. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/defines.rs +0 -0
  337. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/lib.rs +0 -0
  338. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/rb_env.rs +0 -0
  339. /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/utils.rs +0 -0
  340. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/LICENSE-APACHE +0 -0
  341. /data/ext/cargo-vendor/{rustc-hash-1.1.0 → serde-1.0.229}/LICENSE-MIT +0 -0
  342. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/crates-io.md +0 -0
  343. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/crate_root.rs +0 -0
  344. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/ignored_any.rs +0 -0
  345. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/mod.rs +0 -0
  346. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/value.rs +0 -0
  347. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/format.rs +0 -0
  348. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/macros.rs +0 -0
  349. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/content.rs +0 -0
  350. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/doc.rs +0 -0
  351. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/mod.rs +0 -0
  352. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/seed.rs +0 -0
  353. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/size_hint.rs +0 -0
  354. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/string.rs +0 -0
  355. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/fmt.rs +0 -0
  356. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/impls.rs +0 -0
  357. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/impossible.rs +0 -0
  358. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/mod.rs +0 -0
  359. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/std_error.rs +0 -0
  360. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/integer128.rs +0 -0
  361. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/de.rs +0 -0
  362. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/mod.rs +0 -0
  363. /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/ser.rs +0 -0
  364. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/LICENSE-APACHE +0 -0
  365. /data/ext/cargo-vendor/{serde-1.0.228 → serde_core-1.0.229}/LICENSE-MIT +0 -0
  366. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/README.md +0 -0
  367. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/crate_root.rs +0 -0
  368. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/ignored_any.rs +0 -0
  369. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/mod.rs +0 -0
  370. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/value.rs +0 -0
  371. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/format.rs +0 -0
  372. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/macros.rs +0 -0
  373. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/content.rs +0 -0
  374. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/doc.rs +0 -0
  375. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/mod.rs +0 -0
  376. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/seed.rs +0 -0
  377. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/size_hint.rs +0 -0
  378. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/string.rs +0 -0
  379. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/fmt.rs +0 -0
  380. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/impls.rs +0 -0
  381. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/impossible.rs +0 -0
  382. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/mod.rs +0 -0
  383. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/std_error.rs +0 -0
  384. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/LICENSE-APACHE +0 -0
  385. /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_derive-1.0.229}/LICENSE-MIT +0 -0
  386. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/crates-io.md +0 -0
  387. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_.rs +0 -0
  388. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_internally.rs +0 -0
  389. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_untagged.rs +0 -0
  390. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/identifier.rs +0 -0
  391. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/struct_.rs +0 -0
  392. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/tuple.rs +0 -0
  393. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/unit.rs +0 -0
  394. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/deprecated.rs +0 -0
  395. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/dummy.rs +0 -0
  396. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/fragment.rs +0 -0
  397. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/case.rs +0 -0
  398. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/check.rs +0 -0
  399. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/mod.rs +0 -0
  400. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/name.rs +0 -0
  401. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/respan.rs +0 -0
  402. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/symbol.rs +0 -0
  403. /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/this.rs +0 -0
  404. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/LICENSE +0 -0
  405. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/array_deserializer.rs +0 -0
  406. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/array_enumerator.rs +0 -0
  407. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/enum_deserializer.rs +0 -0
  408. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/hash_deserializer.rs +0 -0
  409. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/mod.rs +0 -0
  410. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/variant_deserializer.rs +0 -0
  411. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/error.rs +0 -0
  412. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/lib.rs +0 -0
  413. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/enums.rs +0 -0
  414. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/map_serializer.rs +0 -0
  415. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/mod.rs +0 -0
  416. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/seq_serializer.rs +0 -0
  417. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/serializer.rs +0 -0
  418. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/struct_serializer.rs +0 -0
  419. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/struct_variant_serializer.rs +0 -0
  420. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/tuple_variant_serializer.rs +0 -0
  421. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_arrays.rs +0 -0
  422. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_booleans.rs +0 -0
  423. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_enums.rs +0 -0
  424. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_floats.rs +0 -0
  425. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_integers.rs +0 -0
  426. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_maps.rs +0 -0
  427. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_options.rs +0 -0
  428. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_results.rs +0 -0
  429. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_strings.rs +0 -0
  430. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_structs.rs +0 -0
  431. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_tuples.rs +0 -0
  432. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_vecs.rs +0 -0
  433. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_arrays.rs +0 -0
  434. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_booleans.rs +0 -0
  435. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_enums.rs +0 -0
  436. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_floats.rs +0 -0
  437. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_integers.rs +0 -0
  438. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_maps.rs +0 -0
  439. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_options.rs +0 -0
  440. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_results.rs +0 -0
  441. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_strings.rs +0 -0
  442. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_structs.rs +0 -0
  443. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_tuples.rs +0 -0
  444. /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_vecs.rs +0 -0
  445. /data/ext/cargo-vendor/{serde_derive-1.0.228 → syn-3.0.9}/LICENSE-MIT +0 -0
@@ -0,0 +1,1103 @@
1
+ //! Tokens representing Rust punctuation, keywords, and delimiters.
2
+ //!
3
+ //! The type names in this module can be difficult to keep straight, so we
4
+ //! prefer to use the [`Token!`] macro instead. This is a type-macro that
5
+ //! expands to the token type of the given token.
6
+ //!
7
+ //! [`Token!`]: crate::Token
8
+ //!
9
+ //! # Example
10
+ //!
11
+ //! The [`ItemStatic`] syntax tree node is defined like this.
12
+ //!
13
+ //! [`ItemStatic`]: crate::ItemStatic
14
+ //!
15
+ //! ```
16
+ //! # use syn::{Attribute, Expr, Ident, Token, Type, Visibility};
17
+ //! #
18
+ //! pub struct ItemStatic {
19
+ //! pub attrs: Vec<Attribute>,
20
+ //! pub vis: Visibility,
21
+ //! pub static_token: Token![static],
22
+ //! pub mutability: Option<Token![mut]>,
23
+ //! pub ident: Ident,
24
+ //! pub colon_token: Token![:],
25
+ //! pub ty: Box<Type>,
26
+ //! pub eq_token: Token![=],
27
+ //! pub expr: Box<Expr>,
28
+ //! pub semi_token: Token![;],
29
+ //! }
30
+ //! ```
31
+ //!
32
+ //! # Parsing
33
+ //!
34
+ //! Keywords and punctuation can be parsed through the [`ParseStream::parse`]
35
+ //! method. Delimiter tokens are parsed using the [`parenthesized!`],
36
+ //! [`bracketed!`] and [`braced!`] macros.
37
+ //!
38
+ //! [`ParseStream::parse`]: crate::parse::ParseBuffer::parse()
39
+ //! [`parenthesized!`]: crate::parenthesized!
40
+ //! [`bracketed!`]: crate::bracketed!
41
+ //! [`braced!`]: crate::braced!
42
+ //!
43
+ //! ```
44
+ //! use syn::{Attribute, Result};
45
+ //! use syn::parse::{Parse, ParseStream};
46
+ //! #
47
+ //! # enum ItemStatic {}
48
+ //!
49
+ //! // Parse the ItemStatic struct shown above.
50
+ //! impl Parse for ItemStatic {
51
+ //! fn parse(input: ParseStream) -> Result<Self> {
52
+ //! # use syn::ItemStatic;
53
+ //! # fn parse(input: ParseStream) -> Result<ItemStatic> {
54
+ //! Ok(ItemStatic {
55
+ //! attrs: input.call(Attribute::parse_outer)?,
56
+ //! vis: input.parse()?,
57
+ //! static_token: input.parse()?,
58
+ //! mutability: input.parse()?,
59
+ //! ident: input.parse()?,
60
+ //! colon_token: input.parse()?,
61
+ //! ty: input.parse()?,
62
+ //! eq_token: input.parse()?,
63
+ //! expr: input.parse()?,
64
+ //! semi_token: input.parse()?,
65
+ //! })
66
+ //! # }
67
+ //! # unimplemented!()
68
+ //! }
69
+ //! }
70
+ //! ```
71
+ //!
72
+ //! # Other operations
73
+ //!
74
+ //! Every keyword and punctuation token supports the following operations.
75
+ //!
76
+ //! - [Peeking] — `input.peek(Token![...])`
77
+ //!
78
+ //! - [Parsing] — `input.parse::<Token![...]>()?`
79
+ //!
80
+ //! - [Printing] — `quote!( ... #the_token ... )`
81
+ //!
82
+ //! - Construction from a [`Span`] — `let the_token = Token![...](sp)`
83
+ //!
84
+ //! - Field access to its span — `let sp = the_token.span`
85
+ //!
86
+ //! [Peeking]: crate::parse::ParseBuffer::peek()
87
+ //! [Parsing]: crate::parse::ParseBuffer::parse()
88
+ //! [Printing]: https://docs.rs/quote/1.0/quote/trait.ToTokens.html
89
+ //! [`Span`]: https://docs.rs/proc-macro2/1.0/proc_macro2/struct.Span.html
90
+
91
+ #[cfg(feature = "parsing")]
92
+ pub(crate) use self::private::CustomToken;
93
+ use self::private::WithSpan;
94
+ #[cfg(feature = "parsing")]
95
+ use crate::buffer::Cursor;
96
+ #[cfg(feature = "parsing")]
97
+ use crate::error::Result;
98
+ #[cfg(feature = "parsing")]
99
+ use crate::lifetime::Lifetime;
100
+ #[cfg(feature = "parsing")]
101
+ use crate::parse::{Parse, ParseStream};
102
+ use crate::span::IntoSpans;
103
+ #[cfg(feature = "extra-traits")]
104
+ use core::cmp;
105
+ #[cfg(feature = "extra-traits")]
106
+ use core::fmt::{self, Debug};
107
+ #[cfg(feature = "extra-traits")]
108
+ use core::hash::{Hash, Hasher};
109
+ use core::ops::{Deref, DerefMut};
110
+ use proc_macro2::extra::DelimSpan;
111
+ use proc_macro2::Span;
112
+ #[cfg(feature = "printing")]
113
+ use proc_macro2::TokenStream;
114
+ #[cfg(any(feature = "parsing", feature = "printing"))]
115
+ use proc_macro2::{Delimiter, Ident};
116
+ #[cfg(feature = "parsing")]
117
+ use proc_macro2::{Literal, Punct, TokenTree};
118
+ #[cfg(feature = "printing")]
119
+ use quote::{ToTokens, TokenStreamExt as _};
120
+
121
+ /// Marker trait for types that represent single tokens.
122
+ ///
123
+ /// This trait is sealed and cannot be implemented for types outside of Syn.
124
+ #[cfg(feature = "parsing")]
125
+ pub trait Token: private::Sealed {
126
+ // Not public API.
127
+ #[doc(hidden)]
128
+ fn peek(cursor: Cursor) -> bool;
129
+
130
+ // Not public API.
131
+ #[doc(hidden)]
132
+ fn display() -> &'static str;
133
+ }
134
+
135
+ pub(crate) mod private {
136
+ #[cfg(feature = "parsing")]
137
+ use crate::buffer::Cursor;
138
+ use proc_macro2::Span;
139
+
140
+ #[cfg(feature = "parsing")]
141
+ pub trait Sealed {}
142
+
143
+ /// Support writing `token.span` rather than `token.spans[0]` on tokens that
144
+ /// hold a single span.
145
+ #[repr(transparent)]
146
+ #[allow(
147
+ unknown_lints,
148
+ renamed_and_removed_lints,
149
+ // False positive: https://github.com/rust-lang/rust/issues/115922
150
+ repr_transparent_non_zst_fields,
151
+ )]
152
+ pub struct WithSpan {
153
+ pub span: Span,
154
+ }
155
+
156
+ // Not public API.
157
+ #[doc(hidden)]
158
+ #[cfg(feature = "parsing")]
159
+ pub trait CustomToken {
160
+ fn peek(cursor: Cursor) -> bool;
161
+ fn display() -> &'static str;
162
+ }
163
+ }
164
+
165
+ #[cfg(feature = "parsing")]
166
+ impl private::Sealed for Ident {}
167
+
168
+ macro_rules! impl_low_level_token {
169
+ ($display:literal $($path:ident)::+ $get:ident) => {
170
+ #[cfg(feature = "parsing")]
171
+ impl Token for $($path)::+ {
172
+ fn peek(cursor: Cursor) -> bool {
173
+ cursor.$get().is_some()
174
+ }
175
+
176
+ fn display() -> &'static str {
177
+ $display
178
+ }
179
+ }
180
+
181
+ #[cfg(feature = "parsing")]
182
+ impl private::Sealed for $($path)::+ {}
183
+ };
184
+ }
185
+
186
+ impl_low_level_token!("punctuation token" Punct punct);
187
+ impl_low_level_token!("literal" Literal literal);
188
+ impl_low_level_token!("token" TokenTree token_tree);
189
+ impl_low_level_token!("group token" proc_macro2::Group any_group);
190
+ impl_low_level_token!("lifetime" Lifetime lifetime);
191
+
192
+ #[cfg(feature = "parsing")]
193
+ impl<T: CustomToken> private::Sealed for T {}
194
+
195
+ #[cfg(feature = "parsing")]
196
+ impl<T: CustomToken> Token for T {
197
+ fn peek(cursor: Cursor) -> bool {
198
+ <Self as CustomToken>::peek(cursor)
199
+ }
200
+
201
+ fn display() -> &'static str {
202
+ <Self as CustomToken>::display()
203
+ }
204
+ }
205
+
206
+ macro_rules! define_keywords {
207
+ ($($token:literal pub struct $name:ident)*) => {
208
+ $(
209
+ #[doc = concat!('`', $token, '`')]
210
+ ///
211
+ /// Don't try to remember the name of this type &mdash; use the
212
+ /// [`Token!`] macro instead.
213
+ ///
214
+ /// [`Token!`]: crate::token
215
+ pub struct $name {
216
+ pub span: Span,
217
+ }
218
+
219
+ #[doc(hidden)]
220
+ #[allow(non_snake_case)]
221
+ pub fn $name<S: IntoSpans<Span>>(span: S) -> $name {
222
+ $name {
223
+ span: span.into_spans(),
224
+ }
225
+ }
226
+
227
+ impl core::default::Default for $name {
228
+ fn default() -> Self {
229
+ $name {
230
+ span: Span::call_site(),
231
+ }
232
+ }
233
+ }
234
+
235
+ #[cfg(feature = "clone-impls")]
236
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
237
+ impl Copy for $name {}
238
+
239
+ #[cfg(feature = "clone-impls")]
240
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
241
+ impl Clone for $name {
242
+ fn clone(&self) -> Self {
243
+ *self
244
+ }
245
+ }
246
+
247
+ #[cfg(feature = "extra-traits")]
248
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
249
+ impl Debug for $name {
250
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
251
+ format_token(f, $token)
252
+ }
253
+ }
254
+
255
+ #[cfg(feature = "extra-traits")]
256
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
257
+ impl cmp::Eq for $name {}
258
+
259
+ #[cfg(feature = "extra-traits")]
260
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
261
+ impl PartialEq for $name {
262
+ fn eq(&self, _other: &$name) -> bool {
263
+ true
264
+ }
265
+ }
266
+
267
+ #[cfg(feature = "extra-traits")]
268
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
269
+ impl Hash for $name {
270
+ fn hash<H: Hasher>(&self, _state: &mut H) {}
271
+ }
272
+
273
+ #[cfg(feature = "printing")]
274
+ #[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
275
+ impl ToTokens for $name {
276
+ fn to_tokens(&self, tokens: &mut TokenStream) {
277
+ printing::keyword($token, self.span, tokens);
278
+ }
279
+ }
280
+
281
+ #[cfg(feature = "parsing")]
282
+ #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))]
283
+ impl Parse for $name {
284
+ fn parse(input: ParseStream) -> Result<Self> {
285
+ Ok($name {
286
+ span: parsing::keyword(input, $token)?,
287
+ })
288
+ }
289
+ }
290
+
291
+ #[cfg(feature = "parsing")]
292
+ impl Token for $name {
293
+ fn peek(cursor: Cursor) -> bool {
294
+ cursor.peek_keyword($token)
295
+ }
296
+
297
+ fn display() -> &'static str {
298
+ concat!("`", $token, "`")
299
+ }
300
+ }
301
+
302
+ #[cfg(feature = "parsing")]
303
+ impl private::Sealed for $name {}
304
+ )*
305
+ };
306
+ }
307
+
308
+ macro_rules! impl_deref_if_len_is_1 {
309
+ ($name:ident/1) => {
310
+ impl Deref for $name {
311
+ type Target = WithSpan;
312
+
313
+ fn deref(&self) -> &Self::Target {
314
+ unsafe { &*(self as *const Self).cast::<WithSpan>() }
315
+ }
316
+ }
317
+
318
+ impl DerefMut for $name {
319
+ fn deref_mut(&mut self) -> &mut Self::Target {
320
+ unsafe { &mut *(self as *mut Self).cast::<WithSpan>() }
321
+ }
322
+ }
323
+ };
324
+
325
+ ($name:ident/$len:literal) => {};
326
+ }
327
+
328
+ macro_rules! define_punctuation_structs {
329
+ ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => {
330
+ $(
331
+ #[cfg_attr(not(doc), repr(transparent))]
332
+ #[allow(
333
+ unknown_lints,
334
+ renamed_and_removed_lints,
335
+ // False positive: https://github.com/rust-lang/rust/issues/115922
336
+ repr_transparent_non_zst_fields,
337
+ )]
338
+ #[doc = concat!('`', $token, '`')]
339
+ ///
340
+ /// Usage:
341
+ #[doc = concat!($usage, '.')]
342
+ ///
343
+ /// Don't try to remember the name of this type &mdash; use the
344
+ /// [`Token!`] macro instead.
345
+ ///
346
+ /// [`Token!`]: crate::token
347
+ pub struct $name {
348
+ pub spans: [Span; $len],
349
+ }
350
+
351
+ #[doc(hidden)]
352
+ #[allow(non_snake_case)]
353
+ pub fn $name<S: IntoSpans<[Span; $len]>>(spans: S) -> $name {
354
+ $name {
355
+ spans: spans.into_spans(),
356
+ }
357
+ }
358
+
359
+ impl core::default::Default for $name {
360
+ fn default() -> Self {
361
+ $name {
362
+ spans: [Span::call_site(); $len],
363
+ }
364
+ }
365
+ }
366
+
367
+ #[cfg(feature = "clone-impls")]
368
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
369
+ impl Copy for $name {}
370
+
371
+ #[cfg(feature = "clone-impls")]
372
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
373
+ impl Clone for $name {
374
+ fn clone(&self) -> Self {
375
+ *self
376
+ }
377
+ }
378
+
379
+ #[cfg(feature = "extra-traits")]
380
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
381
+ impl Debug for $name {
382
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
383
+ format_token(f, $token)
384
+ }
385
+ }
386
+
387
+ #[cfg(feature = "extra-traits")]
388
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
389
+ impl cmp::Eq for $name {}
390
+
391
+ #[cfg(feature = "extra-traits")]
392
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
393
+ impl PartialEq for $name {
394
+ fn eq(&self, _other: &$name) -> bool {
395
+ true
396
+ }
397
+ }
398
+
399
+ #[cfg(feature = "extra-traits")]
400
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
401
+ impl Hash for $name {
402
+ fn hash<H: Hasher>(&self, _state: &mut H) {}
403
+ }
404
+
405
+ impl_deref_if_len_is_1!($name/$len);
406
+ )*
407
+ };
408
+ }
409
+
410
+ macro_rules! define_punctuation {
411
+ ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => {
412
+ $(
413
+ define_punctuation_structs! {
414
+ $token pub struct $name/$len #[doc = $usage]
415
+ }
416
+
417
+ #[cfg(feature = "printing")]
418
+ #[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
419
+ impl ToTokens for $name {
420
+ fn to_tokens(&self, tokens: &mut TokenStream) {
421
+ printing::punct($token, &self.spans, tokens);
422
+ }
423
+ }
424
+
425
+ #[cfg(feature = "parsing")]
426
+ #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))]
427
+ impl Parse for $name {
428
+ fn parse(input: ParseStream) -> Result<Self> {
429
+ Ok($name {
430
+ spans: parsing::punct(input, $token)?,
431
+ })
432
+ }
433
+ }
434
+
435
+ #[cfg(feature = "parsing")]
436
+ impl Token for $name {
437
+ fn peek(cursor: Cursor) -> bool {
438
+ cursor.peek_punct($token)
439
+ }
440
+
441
+ fn display() -> &'static str {
442
+ concat!("`", $token, "`")
443
+ }
444
+ }
445
+
446
+ #[cfg(feature = "parsing")]
447
+ impl private::Sealed for $name {}
448
+ )*
449
+ };
450
+ }
451
+
452
+ macro_rules! define_delimiters {
453
+ ($($delim:ident pub struct $name:ident #[$doc:meta])*) => {
454
+ $(
455
+ #[$doc]
456
+ pub struct $name {
457
+ pub span: DelimSpan,
458
+ }
459
+
460
+ #[doc(hidden)]
461
+ #[allow(non_snake_case)]
462
+ pub fn $name<S: IntoSpans<DelimSpan>>(span: S) -> $name {
463
+ $name {
464
+ span: span.into_spans(),
465
+ }
466
+ }
467
+
468
+ impl core::default::Default for $name {
469
+ fn default() -> Self {
470
+ $name(Span::call_site())
471
+ }
472
+ }
473
+
474
+ #[cfg(feature = "clone-impls")]
475
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
476
+ impl Copy for $name {}
477
+
478
+ #[cfg(feature = "clone-impls")]
479
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
480
+ impl Clone for $name {
481
+ fn clone(&self) -> Self {
482
+ *self
483
+ }
484
+ }
485
+
486
+ #[cfg(feature = "extra-traits")]
487
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
488
+ impl Debug for $name {
489
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
490
+ f.write_str(stringify!($name))
491
+ }
492
+ }
493
+
494
+ #[cfg(feature = "extra-traits")]
495
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
496
+ impl cmp::Eq for $name {}
497
+
498
+ #[cfg(feature = "extra-traits")]
499
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
500
+ impl PartialEq for $name {
501
+ fn eq(&self, _other: &$name) -> bool {
502
+ true
503
+ }
504
+ }
505
+
506
+ #[cfg(feature = "extra-traits")]
507
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
508
+ impl Hash for $name {
509
+ fn hash<H: Hasher>(&self, _state: &mut H) {}
510
+ }
511
+
512
+ impl $name {
513
+ #[cfg(feature = "printing")]
514
+ #[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
515
+ pub fn surround<F>(&self, tokens: &mut TokenStream, f: F)
516
+ where
517
+ F: FnOnce(&mut TokenStream),
518
+ {
519
+ let mut inner = TokenStream::new();
520
+ f(&mut inner);
521
+ printing::delim(Delimiter::$delim, self.span.join(), tokens, inner);
522
+ }
523
+ }
524
+
525
+ #[cfg(feature = "parsing")]
526
+ impl private::Sealed for $name {}
527
+ )*
528
+ };
529
+ }
530
+
531
+ define_punctuation_structs! {
532
+ "_" pub struct Underscore/1 /// wildcard patterns, inferred types, unnamed items in constants, extern crates, use declarations, and destructuring assignment
533
+ }
534
+
535
+ #[cfg(feature = "printing")]
536
+ #[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
537
+ impl ToTokens for Underscore {
538
+ fn to_tokens(&self, tokens: &mut TokenStream) {
539
+ tokens.append(Ident::new("_", self.span));
540
+ }
541
+ }
542
+
543
+ #[cfg(feature = "parsing")]
544
+ #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))]
545
+ impl Parse for Underscore {
546
+ fn parse(input: ParseStream) -> Result<Self> {
547
+ input.step(|cursor| {
548
+ if let Some((ident, rest)) = cursor.ident() {
549
+ if ident == "_" {
550
+ return Ok((Underscore(ident.span()), rest));
551
+ }
552
+ }
553
+ if let Some((punct, rest)) = cursor.punct() {
554
+ if punct.as_char() == '_' {
555
+ return Ok((Underscore(punct.span()), rest));
556
+ }
557
+ }
558
+ Err(cursor.error("expected `_`"))
559
+ })
560
+ }
561
+ }
562
+
563
+ #[cfg(feature = "parsing")]
564
+ impl Token for Underscore {
565
+ fn peek(cursor: Cursor) -> bool {
566
+ if let Some((ident, _rest)) = cursor.ident() {
567
+ return ident == "_";
568
+ }
569
+ if let Some((punct, _rest)) = cursor.punct() {
570
+ return punct.as_char() == '_';
571
+ }
572
+ false
573
+ }
574
+
575
+ fn display() -> &'static str {
576
+ "`_`"
577
+ }
578
+ }
579
+
580
+ #[cfg(feature = "parsing")]
581
+ impl private::Sealed for Underscore {}
582
+
583
+ /// None-delimited group
584
+ pub struct Group {
585
+ pub span: Span,
586
+ }
587
+
588
+ #[doc(hidden)]
589
+ #[allow(non_snake_case)]
590
+ pub fn Group<S: IntoSpans<Span>>(span: S) -> Group {
591
+ Group {
592
+ span: span.into_spans(),
593
+ }
594
+ }
595
+
596
+ impl core::default::Default for Group {
597
+ fn default() -> Self {
598
+ Group {
599
+ span: Span::call_site(),
600
+ }
601
+ }
602
+ }
603
+
604
+ #[cfg(feature = "clone-impls")]
605
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
606
+ impl Copy for Group {}
607
+
608
+ #[cfg(feature = "clone-impls")]
609
+ #[cfg_attr(docsrs, doc(cfg(feature = "clone-impls")))]
610
+ impl Clone for Group {
611
+ fn clone(&self) -> Self {
612
+ *self
613
+ }
614
+ }
615
+
616
+ #[cfg(feature = "extra-traits")]
617
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
618
+ impl Debug for Group {
619
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
620
+ f.write_str("Group")
621
+ }
622
+ }
623
+
624
+ #[cfg(feature = "extra-traits")]
625
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
626
+ impl cmp::Eq for Group {}
627
+
628
+ #[cfg(feature = "extra-traits")]
629
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
630
+ impl PartialEq for Group {
631
+ fn eq(&self, _other: &Group) -> bool {
632
+ true
633
+ }
634
+ }
635
+
636
+ #[cfg(feature = "extra-traits")]
637
+ #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
638
+ impl Hash for Group {
639
+ fn hash<H: Hasher>(&self, _state: &mut H) {}
640
+ }
641
+
642
+ impl Group {
643
+ #[cfg(feature = "printing")]
644
+ #[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
645
+ pub fn surround<F>(&self, tokens: &mut TokenStream, f: F)
646
+ where
647
+ F: FnOnce(&mut TokenStream),
648
+ {
649
+ let mut inner = TokenStream::new();
650
+ f(&mut inner);
651
+ printing::delim(Delimiter::None, self.span, tokens, inner);
652
+ }
653
+ }
654
+
655
+ #[cfg(feature = "parsing")]
656
+ impl private::Sealed for Group {}
657
+
658
+ #[cfg(feature = "parsing")]
659
+ impl Token for Paren {
660
+ fn peek(cursor: Cursor) -> bool {
661
+ cursor.group(Delimiter::Parenthesis).is_some()
662
+ }
663
+
664
+ fn display() -> &'static str {
665
+ "parentheses"
666
+ }
667
+ }
668
+
669
+ #[cfg(feature = "parsing")]
670
+ impl Token for Brace {
671
+ fn peek(cursor: Cursor) -> bool {
672
+ cursor.group(Delimiter::Brace).is_some()
673
+ }
674
+
675
+ fn display() -> &'static str {
676
+ "curly braces"
677
+ }
678
+ }
679
+
680
+ #[cfg(feature = "parsing")]
681
+ impl Token for Bracket {
682
+ fn peek(cursor: Cursor) -> bool {
683
+ cursor.group(Delimiter::Bracket).is_some()
684
+ }
685
+
686
+ fn display() -> &'static str {
687
+ "square brackets"
688
+ }
689
+ }
690
+
691
+ #[cfg(feature = "parsing")]
692
+ impl Token for Group {
693
+ fn peek(cursor: Cursor) -> bool {
694
+ cursor.group(Delimiter::None).is_some()
695
+ }
696
+
697
+ fn display() -> &'static str {
698
+ "invisible group"
699
+ }
700
+ }
701
+
702
+ define_keywords! {
703
+ "abstract" pub struct Abstract
704
+ "as" pub struct As
705
+ "async" pub struct Async
706
+ "auto" pub struct Auto
707
+ "await" pub struct Await
708
+ "become" pub struct Become
709
+ "box" pub struct Box
710
+ "break" pub struct Break
711
+ "const" pub struct Const
712
+ "continue" pub struct Continue
713
+ "crate" pub struct Crate
714
+ "default" pub struct Default
715
+ "do" pub struct Do
716
+ "dyn" pub struct Dyn
717
+ "else" pub struct Else
718
+ "enum" pub struct Enum
719
+ "extern" pub struct Extern
720
+ "final" pub struct Final
721
+ "fn" pub struct Fn
722
+ "for" pub struct For
723
+ "if" pub struct If
724
+ "impl" pub struct Impl
725
+ "in" pub struct In
726
+ "let" pub struct Let
727
+ "loop" pub struct Loop
728
+ "macro" pub struct Macro
729
+ "match" pub struct Match
730
+ "mod" pub struct Mod
731
+ "move" pub struct Move
732
+ "mut" pub struct Mut
733
+ "override" pub struct Override
734
+ "priv" pub struct Priv
735
+ "pub" pub struct Pub
736
+ "raw" pub struct Raw
737
+ "ref" pub struct Ref
738
+ "return" pub struct Return
739
+ "safe" pub struct Safe
740
+ "Self" pub struct SelfType
741
+ "self" pub struct SelfValue
742
+ "static" pub struct Static
743
+ "struct" pub struct Struct
744
+ "super" pub struct Super
745
+ "trait" pub struct Trait
746
+ "try" pub struct Try
747
+ "type" pub struct Type
748
+ "typeof" pub struct Typeof
749
+ "union" pub struct Union
750
+ "unsafe" pub struct Unsafe
751
+ "unsized" pub struct Unsized
752
+ "use" pub struct Use
753
+ "virtual" pub struct Virtual
754
+ "where" pub struct Where
755
+ "while" pub struct While
756
+ "yield" pub struct Yield
757
+ }
758
+
759
+ define_punctuation! {
760
+ "&" pub struct And/1 /// bitwise and logical AND, borrow, references, reference patterns
761
+ "&&" pub struct AndAnd/2 /// lazy AND, borrow, references, reference patterns
762
+ "&=" pub struct AndEq/2 /// bitwise AND assignment
763
+ "@" pub struct At/1 /// subpattern binding
764
+ "^" pub struct Caret/1 /// bitwise and logical XOR
765
+ "^=" pub struct CaretEq/2 /// bitwise XOR assignment
766
+ ":" pub struct Colon/1 /// various separators
767
+ "," pub struct Comma/1 /// various separators
768
+ "$" pub struct Dollar/1 /// macros
769
+ "." pub struct Dot/1 /// field access, tuple index
770
+ ".." pub struct DotDot/2 /// range, struct expressions, patterns, range patterns
771
+ "..." pub struct DotDotDot/3 /// variadic functions, range patterns
772
+ "..=" pub struct DotDotEq/3 /// inclusive range, range patterns
773
+ "=" pub struct Eq/1 /// assignment, attributes, various type definitions
774
+ "==" pub struct EqEq/2 /// equal
775
+ "=>" pub struct FatArrow/2 /// match arms, macros
776
+ ">=" pub struct Ge/2 /// greater than or equal to, generics
777
+ ">" pub struct Gt/1 /// greater than, generics, paths
778
+ "<-" pub struct LArrow/2 /// unused
779
+ "<=" pub struct Le/2 /// less than or equal to
780
+ "<" pub struct Lt/1 /// less than, generics, paths
781
+ "-" pub struct Minus/1 /// subtraction, negation
782
+ "-=" pub struct MinusEq/2 /// subtraction assignment
783
+ "!=" pub struct Ne/2 /// not equal
784
+ "!" pub struct Not/1 /// bitwise and logical NOT, macro calls, inner attributes, never type, negative impls
785
+ "|" pub struct Or/1 /// bitwise and logical OR, closures, patterns in match, if let, and while let
786
+ "|=" pub struct OrEq/2 /// bitwise OR assignment
787
+ "||" pub struct OrOr/2 /// lazy OR, closures
788
+ "::" pub struct PathSep/2 /// path separator
789
+ "%" pub struct Percent/1 /// remainder
790
+ "%=" pub struct PercentEq/2 /// remainder assignment
791
+ "+" pub struct Plus/1 /// addition, trait bounds, macro Kleene matcher
792
+ "+=" pub struct PlusEq/2 /// addition assignment
793
+ "#" pub struct Pound/1 /// attributes
794
+ "?" pub struct Question/1 /// question mark operator, questionably sized, macro Kleene matcher
795
+ "->" pub struct RArrow/2 /// function return type, closure return type, function pointer type
796
+ ";" pub struct Semi/1 /// terminator for various items and statements, array types
797
+ "<<" pub struct Shl/2 /// shift left, nested generics
798
+ "<<=" pub struct ShlEq/3 /// shift left assignment
799
+ ">>" pub struct Shr/2 /// shift right, nested generics
800
+ ">>=" pub struct ShrEq/3 /// shift right assignment, nested generics
801
+ "/" pub struct Slash/1 /// division
802
+ "/=" pub struct SlashEq/2 /// division assignment
803
+ "*" pub struct Star/1 /// multiplication, dereference, raw pointers, macro Kleene matcher, use wildcards
804
+ "*=" pub struct StarEq/2 /// multiplication assignment
805
+ "~" pub struct Tilde/1 /// unused since before Rust 1.0
806
+ }
807
+
808
+ define_delimiters! {
809
+ Brace pub struct Brace /// `{`&hellip;`}`
810
+ Bracket pub struct Bracket /// `[`&hellip;`]`
811
+ Parenthesis pub struct Paren /// `(`&hellip;`)`
812
+ }
813
+
814
+ /// A type-macro that expands to the name of the Rust type representation of a
815
+ /// given token.
816
+ ///
817
+ /// As a type, `Token!` is commonly used in the type of struct fields, the type
818
+ /// of a `let` statement, or in turbofish for a `parse` function.
819
+ ///
820
+ /// ```
821
+ /// use syn::{Ident, Token};
822
+ /// use syn::parse::{Parse, ParseStream, Result};
823
+ ///
824
+ /// // `struct Foo;`
825
+ /// pub struct UnitStruct {
826
+ /// struct_token: Token![struct],
827
+ /// ident: Ident,
828
+ /// semi_token: Token![;],
829
+ /// }
830
+ ///
831
+ /// impl Parse for UnitStruct {
832
+ /// fn parse(input: ParseStream) -> Result<Self> {
833
+ /// let struct_token: Token![struct] = input.parse()?;
834
+ /// let ident: Ident = input.parse()?;
835
+ /// let semi_token = input.parse::<Token![;]>()?;
836
+ /// Ok(UnitStruct { struct_token, ident, semi_token })
837
+ /// }
838
+ /// }
839
+ /// ```
840
+ ///
841
+ /// As an expression, `Token!` is used for peeking tokens or instantiating
842
+ /// tokens from a span.
843
+ ///
844
+ /// ```
845
+ /// # use syn::{Ident, Token};
846
+ /// # use syn::parse::{Parse, ParseStream, Result};
847
+ /// #
848
+ /// # struct UnitStruct {
849
+ /// # struct_token: Token![struct],
850
+ /// # ident: Ident,
851
+ /// # semi_token: Token![;],
852
+ /// # }
853
+ /// #
854
+ /// # impl Parse for UnitStruct {
855
+ /// # fn parse(input: ParseStream) -> Result<Self> {
856
+ /// # unimplemented!()
857
+ /// # }
858
+ /// # }
859
+ /// #
860
+ /// fn make_unit_struct(name: Ident) -> UnitStruct {
861
+ /// let span = name.span();
862
+ /// UnitStruct {
863
+ /// struct_token: Token![struct](span),
864
+ /// ident: name,
865
+ /// semi_token: Token![;](span),
866
+ /// }
867
+ /// }
868
+ ///
869
+ /// # fn parse(input: ParseStream) -> Result<()> {
870
+ /// if input.peek(Token![struct]) {
871
+ /// let unit_struct: UnitStruct = input.parse()?;
872
+ /// /* ... */
873
+ /// }
874
+ /// # Ok(())
875
+ /// # }
876
+ /// ```
877
+ ///
878
+ /// See the [token module] documentation for details and examples.
879
+ ///
880
+ /// [token module]: crate::token
881
+ #[macro_export]
882
+ macro_rules! Token {
883
+ [abstract] => { $crate::token::Abstract };
884
+ [as] => { $crate::token::As };
885
+ [async] => { $crate::token::Async };
886
+ [auto] => { $crate::token::Auto };
887
+ [await] => { $crate::token::Await };
888
+ [become] => { $crate::token::Become };
889
+ [box] => { $crate::token::Box };
890
+ [break] => { $crate::token::Break };
891
+ [const] => { $crate::token::Const };
892
+ [continue] => { $crate::token::Continue };
893
+ [crate] => { $crate::token::Crate };
894
+ [default] => { $crate::token::Default };
895
+ [do] => { $crate::token::Do };
896
+ [dyn] => { $crate::token::Dyn };
897
+ [else] => { $crate::token::Else };
898
+ [enum] => { $crate::token::Enum };
899
+ [extern] => { $crate::token::Extern };
900
+ [final] => { $crate::token::Final };
901
+ [fn] => { $crate::token::Fn };
902
+ [for] => { $crate::token::For };
903
+ [if] => { $crate::token::If };
904
+ [impl] => { $crate::token::Impl };
905
+ [in] => { $crate::token::In };
906
+ [let] => { $crate::token::Let };
907
+ [loop] => { $crate::token::Loop };
908
+ [macro] => { $crate::token::Macro };
909
+ [match] => { $crate::token::Match };
910
+ [mod] => { $crate::token::Mod };
911
+ [move] => { $crate::token::Move };
912
+ [mut] => { $crate::token::Mut };
913
+ [override] => { $crate::token::Override };
914
+ [priv] => { $crate::token::Priv };
915
+ [pub] => { $crate::token::Pub };
916
+ [raw] => { $crate::token::Raw };
917
+ [ref] => { $crate::token::Ref };
918
+ [return] => { $crate::token::Return };
919
+ [safe] => { $crate::token::Safe };
920
+ [Self] => { $crate::token::SelfType };
921
+ [self] => { $crate::token::SelfValue };
922
+ [static] => { $crate::token::Static };
923
+ [struct] => { $crate::token::Struct };
924
+ [super] => { $crate::token::Super };
925
+ [trait] => { $crate::token::Trait };
926
+ [try] => { $crate::token::Try };
927
+ [type] => { $crate::token::Type };
928
+ [typeof] => { $crate::token::Typeof };
929
+ [union] => { $crate::token::Union };
930
+ [unsafe] => { $crate::token::Unsafe };
931
+ [unsized] => { $crate::token::Unsized };
932
+ [use] => { $crate::token::Use };
933
+ [virtual] => { $crate::token::Virtual };
934
+ [where] => { $crate::token::Where };
935
+ [while] => { $crate::token::While };
936
+ [yield] => { $crate::token::Yield };
937
+ [&] => { $crate::token::And };
938
+ [&&] => { $crate::token::AndAnd };
939
+ [&=] => { $crate::token::AndEq };
940
+ [@] => { $crate::token::At };
941
+ [^] => { $crate::token::Caret };
942
+ [^=] => { $crate::token::CaretEq };
943
+ [:] => { $crate::token::Colon };
944
+ [,] => { $crate::token::Comma };
945
+ [$] => { $crate::token::Dollar };
946
+ [.] => { $crate::token::Dot };
947
+ [..] => { $crate::token::DotDot };
948
+ [...] => { $crate::token::DotDotDot };
949
+ [..=] => { $crate::token::DotDotEq };
950
+ [=] => { $crate::token::Eq };
951
+ [==] => { $crate::token::EqEq };
952
+ [=>] => { $crate::token::FatArrow };
953
+ [>=] => { $crate::token::Ge };
954
+ [>] => { $crate::token::Gt };
955
+ [<-] => { $crate::token::LArrow };
956
+ [<=] => { $crate::token::Le };
957
+ [<] => { $crate::token::Lt };
958
+ [-] => { $crate::token::Minus };
959
+ [-=] => { $crate::token::MinusEq };
960
+ [!=] => { $crate::token::Ne };
961
+ [!] => { $crate::token::Not };
962
+ [|] => { $crate::token::Or };
963
+ [|=] => { $crate::token::OrEq };
964
+ [||] => { $crate::token::OrOr };
965
+ [::] => { $crate::token::PathSep };
966
+ [%] => { $crate::token::Percent };
967
+ [%=] => { $crate::token::PercentEq };
968
+ [+] => { $crate::token::Plus };
969
+ [+=] => { $crate::token::PlusEq };
970
+ [#] => { $crate::token::Pound };
971
+ [?] => { $crate::token::Question };
972
+ [->] => { $crate::token::RArrow };
973
+ [;] => { $crate::token::Semi };
974
+ [<<] => { $crate::token::Shl };
975
+ [<<=] => { $crate::token::ShlEq };
976
+ [>>] => { $crate::token::Shr };
977
+ [>>=] => { $crate::token::ShrEq };
978
+ [/] => { $crate::token::Slash };
979
+ [/=] => { $crate::token::SlashEq };
980
+ [*] => { $crate::token::Star };
981
+ [*=] => { $crate::token::StarEq };
982
+ [~] => { $crate::token::Tilde };
983
+ [_] => { $crate::token::Underscore };
984
+ }
985
+
986
+ #[cfg(feature = "extra-traits")]
987
+ fn format_token(formatter: &mut fmt::Formatter, repr: &str) -> fmt::Result {
988
+ write!(formatter, "Token![{}]", repr)
989
+ }
990
+
991
+ // Not public API.
992
+ #[doc(hidden)]
993
+ #[cfg(feature = "parsing")]
994
+ pub(crate) mod parsing {
995
+ use crate::buffer::Cursor;
996
+ use crate::error::{Error, Result};
997
+ use crate::parse::ParseStream;
998
+ use alloc::format;
999
+ use proc_macro2::{Spacing, Span};
1000
+
1001
+ pub(crate) fn keyword(input: ParseStream, token: &str) -> Result<Span> {
1002
+ input.step(|cursor| {
1003
+ if let Some((ident, rest)) = cursor.ident() {
1004
+ if ident == token {
1005
+ return Ok((ident.span(), rest));
1006
+ }
1007
+ }
1008
+ Err(cursor.error(format!("expected `{}`", token)))
1009
+ })
1010
+ }
1011
+
1012
+ #[doc(hidden)]
1013
+ pub fn punct<const N: usize>(input: ParseStream, token: &str) -> Result<[Span; N]> {
1014
+ let mut spans = [input.span(); N];
1015
+ punct_helper(input, token, &mut spans)?;
1016
+ Ok(spans)
1017
+ }
1018
+
1019
+ fn punct_helper(input: ParseStream, token: &str, spans: &mut [Span]) -> Result<()> {
1020
+ input.step(|cursor| {
1021
+ let mut cursor = *cursor;
1022
+ assert_eq!(token.len(), spans.len());
1023
+
1024
+ for (i, ch) in token.chars().enumerate() {
1025
+ match cursor.punct() {
1026
+ Some((punct, rest)) => {
1027
+ spans[i] = punct.span();
1028
+ if punct.as_char() != ch {
1029
+ break;
1030
+ } else if i == token.len() - 1 {
1031
+ return Ok(((), rest));
1032
+ } else if punct.spacing() != Spacing::Joint {
1033
+ break;
1034
+ }
1035
+ cursor = rest;
1036
+ }
1037
+ None => break,
1038
+ }
1039
+ }
1040
+
1041
+ Err(Error::new(spans[0], format!("expected `{}`", token)))
1042
+ })
1043
+ }
1044
+
1045
+ #[doc(hidden)]
1046
+ pub fn peek_punct(mut cursor: Cursor, token: &str) -> bool {
1047
+ for (i, ch) in token.chars().enumerate() {
1048
+ match cursor.punct() {
1049
+ Some((punct, rest)) => {
1050
+ if punct.as_char() != ch {
1051
+ break;
1052
+ } else if i == token.len() - 1 {
1053
+ return true;
1054
+ } else if punct.spacing() != Spacing::Joint {
1055
+ break;
1056
+ }
1057
+ cursor = rest;
1058
+ }
1059
+ None => break,
1060
+ }
1061
+ }
1062
+ false
1063
+ }
1064
+ }
1065
+
1066
+ // Not public API.
1067
+ #[doc(hidden)]
1068
+ #[cfg(feature = "printing")]
1069
+ pub(crate) mod printing {
1070
+ use crate::ext::PunctExt as _;
1071
+ use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream};
1072
+ use quote::TokenStreamExt as _;
1073
+
1074
+ #[doc(hidden)]
1075
+ pub fn punct(s: &str, spans: &[Span], tokens: &mut TokenStream) {
1076
+ assert_eq!(s.len(), spans.len());
1077
+
1078
+ let mut chars = s.chars();
1079
+ let mut spans = spans.iter();
1080
+ let ch = chars.next_back().unwrap();
1081
+ let span = spans.next_back().unwrap();
1082
+ for (ch, span) in chars.zip(spans) {
1083
+ tokens.append(Punct::new_spanned(ch, Spacing::Joint, *span));
1084
+ }
1085
+
1086
+ tokens.append(Punct::new_spanned(ch, Spacing::Alone, *span));
1087
+ }
1088
+
1089
+ pub(crate) fn keyword(s: &str, span: Span, tokens: &mut TokenStream) {
1090
+ tokens.append(Ident::new(s, span));
1091
+ }
1092
+
1093
+ pub(crate) fn delim(
1094
+ delim: Delimiter,
1095
+ span: Span,
1096
+ tokens: &mut TokenStream,
1097
+ inner: TokenStream,
1098
+ ) {
1099
+ let mut g = Group::new(delim, inner);
1100
+ g.set_span(span);
1101
+ tokens.append(g);
1102
+ }
1103
+ }