html-to-markdown 2.23.4 → 2.24.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 (585) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +7 -7
  3. data/README.md +9 -7
  4. data/ext/html-to-markdown-rb/native/Cargo.lock +21 -21
  5. data/ext/html-to-markdown-rb/native/Cargo.toml +1 -3
  6. data/lib/html_to_markdown/cli_proxy.rb +5 -2
  7. data/lib/html_to_markdown/version.rb +1 -1
  8. data/rust-vendor/cc/.cargo-checksum.json +1 -1
  9. data/rust-vendor/cc/.cargo_vcs_info.json +1 -1
  10. data/rust-vendor/cc/CHANGELOG.md +7 -0
  11. data/rust-vendor/cc/Cargo.lock +1 -1
  12. data/rust-vendor/cc/Cargo.toml +1 -1
  13. data/rust-vendor/cc/Cargo.toml.orig +1 -1
  14. data/rust-vendor/cc/src/target/generated.rs +1 -0
  15. data/rust-vendor/cc/src/target/parser.rs +4 -0
  16. data/rust-vendor/html-to-markdown-rs/README.md +1 -1
  17. data/rust-vendor/html-to-markdown-rs/src/convert_api.rs +90 -15
  18. data/rust-vendor/html-to-markdown-rs/src/converter/block/preformatted.rs +15 -4
  19. data/rust-vendor/html-to-markdown-rs/src/converter/handlers/graphic.rs +5 -3
  20. data/rust-vendor/html-to-markdown-rs/src/converter/media/svg.rs +5 -1
  21. data/rust-vendor/html-to-markdown-rs/src/converter/text/processing.rs +15 -8
  22. data/rust-vendor/html-to-markdown-rs/src/converter/utility/preprocessing.rs +43 -18
  23. data/rust-vendor/html-to-markdown-rs/src/lib.rs +6 -6
  24. data/rust-vendor/html-to-markdown-rs/src/validation.rs +68 -29
  25. data/rust-vendor/html-to-markdown-rs/tests/issue_190_regressions.rs +121 -0
  26. data/rust-vendor/html-to-markdown-rs/tests/skip_images_test.rs +21 -0
  27. data/rust-vendor/proc-macro2/.cargo-checksum.json +1 -1
  28. data/rust-vendor/proc-macro2/.cargo_vcs_info.json +1 -1
  29. data/rust-vendor/proc-macro2/Cargo.lock +14 -89
  30. data/rust-vendor/proc-macro2/Cargo.toml +1 -1
  31. data/rust-vendor/proc-macro2/Cargo.toml.orig +1 -1
  32. data/rust-vendor/proc-macro2/src/fallback.rs +37 -23
  33. data/rust-vendor/proc-macro2/src/lib.rs +1 -1
  34. data/rust-vendor/quote/.cargo-checksum.json +1 -1
  35. data/rust-vendor/quote/.cargo_vcs_info.json +1 -1
  36. data/rust-vendor/quote/.github/workflows/ci.yml +1 -1
  37. data/rust-vendor/quote/Cargo.lock +17 -17
  38. data/rust-vendor/quote/Cargo.toml +1 -1
  39. data/rust-vendor/quote/Cargo.toml.orig +1 -1
  40. data/rust-vendor/quote/src/format.rs +2 -2
  41. data/rust-vendor/quote/src/lib.rs +1 -1
  42. data/rust-vendor/quote/src/runtime.rs +2 -2
  43. data/rust-vendor/quote/tests/test.rs +6 -0
  44. data/rust-vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr +2 -2
  45. data/rust-vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr +2 -2
  46. data/rust-vendor/quote/tests/ui/does-not-have-iter-separated.stderr +2 -2
  47. data/rust-vendor/quote/tests/ui/does-not-have-iter.stderr +2 -2
  48. data/rust-vendor/quote/tests/ui/not-repeatable.stderr +8 -8
  49. data/rust-vendor/siphasher/.cargo-checksum.json +1 -1
  50. data/rust-vendor/siphasher/.cargo_vcs_info.json +1 -1
  51. data/rust-vendor/siphasher/.github/workflows/issues.yml +17 -0
  52. data/rust-vendor/siphasher/COPYING +1 -1
  53. data/rust-vendor/siphasher/Cargo.lock +89 -0
  54. data/rust-vendor/siphasher/Cargo.toml +23 -13
  55. data/rust-vendor/siphasher/Cargo.toml.orig +1 -1
  56. data/rust-vendor/siphasher/src/common.rs +65 -0
  57. data/rust-vendor/siphasher/src/lib.rs +1 -1
  58. data/rust-vendor/siphasher/src/sip.rs +2 -68
  59. data/rust-vendor/siphasher/src/sip128.rs +15 -74
  60. data/rust-vendor/siphasher/src/tests.rs +1 -1
  61. data/rust-vendor/siphasher/src/tests128.rs +1 -1
  62. data/rust-vendor/uuid/.cargo-checksum.json +1 -1
  63. data/rust-vendor/uuid/.cargo_vcs_info.json +1 -1
  64. data/rust-vendor/uuid/Cargo.lock +125 -96
  65. data/rust-vendor/uuid/Cargo.toml +4 -11
  66. data/rust-vendor/uuid/Cargo.toml.orig +5 -14
  67. data/rust-vendor/uuid/README.md +3 -3
  68. data/rust-vendor/uuid/src/builder.rs +2 -1
  69. data/rust-vendor/uuid/src/external/serde_support.rs +209 -142
  70. data/rust-vendor/uuid/src/lib.rs +9 -11
  71. data/rust-vendor/uuid/src/macros.rs +9 -54
  72. data/rust-vendor/uuid/src/non_nil.rs +49 -2
  73. data/rust-vendor/web_atoms/.cargo-checksum.json +1 -1
  74. data/rust-vendor/web_atoms/.cargo_vcs_info.json +1 -1
  75. data/rust-vendor/web_atoms/Cargo.lock +1 -1
  76. data/rust-vendor/web_atoms/Cargo.toml +1 -1
  77. data/rust-vendor/web_atoms/Cargo.toml.orig +1 -1
  78. data/rust-vendor/web_atoms/local_names.txt +3 -0
  79. data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
  80. data/rust-vendor/zerocopy/.cargo_vcs_info.json +1 -1
  81. data/rust-vendor/zerocopy/Cargo.lock +5 -9
  82. data/rust-vendor/zerocopy/Cargo.toml +10 -18
  83. data/rust-vendor/zerocopy/Cargo.toml.orig +6 -14
  84. data/rust-vendor/zerocopy/Cargo.toml.std +58 -0
  85. data/rust-vendor/zerocopy/agent_docs/ui_tests.md +5 -5
  86. data/rust-vendor/zerocopy/cargo.sh +1 -1
  87. data/rust-vendor/zerocopy/ci/check_fmt.sh +1 -1
  88. data/rust-vendor/zerocopy/ci/check_readme.sh +1 -1
  89. data/rust-vendor/zerocopy/ci/check_stale_stderr.sh +44 -0
  90. data/rust-vendor/zerocopy/githooks/pre-push +2 -0
  91. data/rust-vendor/zerocopy/src/byte_slice.rs +1 -1
  92. data/rust-vendor/zerocopy/src/byteorder.rs +0 -1
  93. data/rust-vendor/zerocopy/src/impls.rs +334 -118
  94. data/rust-vendor/zerocopy/src/layout.rs +9 -0
  95. data/rust-vendor/zerocopy/src/lib.rs +163 -74
  96. data/rust-vendor/zerocopy/src/macros.rs +4 -8
  97. data/rust-vendor/zerocopy/src/pointer/inner.rs +4 -4
  98. data/rust-vendor/zerocopy/src/pointer/invariant.rs +22 -5
  99. data/rust-vendor/zerocopy/src/pointer/mod.rs +155 -18
  100. data/rust-vendor/zerocopy/src/pointer/ptr.rs +133 -182
  101. data/rust-vendor/zerocopy/src/pointer/transmute.rs +99 -106
  102. data/rust-vendor/zerocopy/src/ref.rs +4 -4
  103. data/rust-vendor/zerocopy/src/util/macro_util.rs +73 -127
  104. data/rust-vendor/zerocopy/src/util/macros.rs +61 -150
  105. data/rust-vendor/zerocopy/src/wrappers.rs +249 -3
  106. data/rust-vendor/zerocopy/tests/include.rs +67 -0
  107. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-bytes.rs +1 -3
  108. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-bytes.stderr +6 -6
  109. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-zeros.rs +1 -3
  110. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-zeros.stderr +4 -4
  111. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-immutable.rs +1 -3
  112. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-immutable.stderr +6 -6
  113. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-into-bytes.rs +1 -3
  114. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-into-bytes.stderr +6 -6
  115. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-issue-1296.rs +1 -3
  116. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-issue-1296.stderr +8 -8
  117. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-known-layout.rs +1 -3
  118. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-known-layout.stderr +6 -6
  119. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-try-from-bytes.rs +1 -3
  120. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-try-from-bytes.stderr +6 -6
  121. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-unaligned.rs +1 -3
  122. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-unaligned.stderr +4 -4
  123. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_not_from_bytes.rs +3 -5
  124. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_not_from_bytes.stderr +10 -10
  125. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_wrong_size.rs +1 -4
  126. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_wrong_size.stderr +3 -3
  127. data/rust-vendor/zerocopy/tests/ui-msrv/invalid-impls/invalid-impls.rs +0 -1
  128. data/rust-vendor/zerocopy/tests/ui-msrv/invalid-impls/invalid-impls.stderr +35 -35
  129. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-dst-not-frombytes.rs +1 -3
  130. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-dst-not-frombytes.stderr +6 -6
  131. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.rs +1 -3
  132. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.stderr +10 -10
  133. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.rs +0 -2
  134. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.stderr +2 -2
  135. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-frombytes.rs +0 -2
  136. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-frombytes.stderr +2 -2
  137. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-intobytes.rs +0 -2
  138. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-intobytes.stderr +2 -2
  139. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-unsized.rs +0 -2
  140. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-unsized.stderr +2 -2
  141. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-dst-not-references.rs +0 -2
  142. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-dst-not-references.stderr +2 -2
  143. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-immutable.rs +0 -2
  144. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-immutable.stderr +2 -2
  145. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-a-reference.rs +0 -2
  146. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-a-reference.stderr +2 -2
  147. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-frombytes.rs +0 -2
  148. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-frombytes.stderr +2 -2
  149. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-intobytes.rs +0 -2
  150. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-intobytes.stderr +2 -2
  151. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.rs +0 -2
  152. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.stderr +2 -2
  153. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ptr-to-usize.rs +0 -2
  154. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ptr-to-usize.stderr +4 -4
  155. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.rs +0 -2
  156. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.stderr +6 -6
  157. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.rs +0 -2
  158. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.stderr +6 -6
  159. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-frombytes.rs +1 -3
  160. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-frombytes.stderr +6 -6
  161. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-nocell.rs +1 -3
  162. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-nocell.stderr +6 -6
  163. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-unsized.rs +0 -2
  164. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-unsized.stderr +2 -2
  165. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.rs +0 -2
  166. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.stderr +8 -8
  167. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-a-reference.rs +0 -2
  168. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-a-reference.stderr +2 -2
  169. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-intobytes.rs +1 -3
  170. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-intobytes.stderr +12 -12
  171. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-nocell.rs +1 -3
  172. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-nocell.stderr +12 -12
  173. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.rs +0 -2
  174. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.stderr +2 -2
  175. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-decrease.rs +1 -3
  176. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-decrease.stderr +2 -2
  177. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase-allow-shrink.rs +1 -3
  178. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase-allow-shrink.stderr +2 -2
  179. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase.rs +1 -3
  180. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase.stderr +2 -2
  181. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-src-not-intobytes.rs +1 -3
  182. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-src-not-intobytes.stderr +6 -6
  183. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-dst-not-tryfrombytes.rs +1 -3
  184. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-dst-not-tryfrombytes.stderr +12 -12
  185. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-decrease.rs +1 -3
  186. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-decrease.stderr +2 -2
  187. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-increase.rs +1 -3
  188. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-increase.stderr +2 -2
  189. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-src-not-intobytes.rs +1 -3
  190. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-src-not-intobytes.stderr +4 -4
  191. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-alignment-increase.rs +1 -3
  192. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-alignment-increase.stderr +2 -2
  193. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.rs +1 -3
  194. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.stderr +16 -16
  195. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-decrease.rs +1 -3
  196. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-decrease.stderr +2 -2
  197. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-increase.rs +1 -3
  198. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-increase.stderr +4 -4
  199. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-frombytes.rs +0 -2
  200. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-frombytes.stderr +6 -6
  201. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-intobytes.rs +0 -2
  202. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-intobytes.stderr +6 -6
  203. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-alignment-increase.rs +1 -3
  204. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-alignment-increase.stderr +2 -2
  205. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.rs +0 -2
  206. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.stderr +4 -4
  207. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +1 -3
  208. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +16 -16
  209. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-decrease.rs +1 -3
  210. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-decrease.stderr +2 -2
  211. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-increase.rs +1 -3
  212. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-increase.stderr +2 -2
  213. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.rs +1 -3
  214. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.stderr +8 -8
  215. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-bytes.rs +1 -3
  216. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-bytes.stderr +15 -15
  217. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-zeros.rs +1 -3
  218. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-zeros.stderr +12 -12
  219. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-immutable.rs +1 -3
  220. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-immutable.stderr +13 -13
  221. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-into-bytes.rs +1 -3
  222. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-into-bytes.stderr +8 -8
  223. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs +1 -3
  224. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.stderr +16 -16
  225. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-known-layout.rs +1 -3
  226. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-known-layout.stderr +8 -8
  227. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-try-from-bytes.rs +1 -3
  228. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-try-from-bytes.stderr +15 -15
  229. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-unaligned.rs +1 -3
  230. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-unaligned.stderr +5 -5
  231. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_not_from_bytes.rs +3 -5
  232. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_not_from_bytes.stderr +21 -21
  233. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_wrong_size.rs +1 -4
  234. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_wrong_size.stderr +8 -8
  235. data/rust-vendor/zerocopy/tests/ui-nightly/invalid-impls/invalid-impls.rs +0 -1
  236. data/rust-vendor/zerocopy/tests/ui-nightly/invalid-impls/invalid-impls.stderr +35 -51
  237. data/rust-vendor/zerocopy/tests/ui-nightly/ptr-is-invariant-over-v.stderr +2 -2
  238. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-dst-not-frombytes.rs +1 -3
  239. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-dst-not-frombytes.stderr +15 -15
  240. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.rs +1 -3
  241. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.stderr +7 -7
  242. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.rs +0 -2
  243. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.stderr +2 -2
  244. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-frombytes.rs +0 -2
  245. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr +12 -12
  246. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-intobytes.rs +0 -2
  247. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr +5 -5
  248. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-unsized.rs +0 -2
  249. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-unsized.stderr +3 -3
  250. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-dst-not-references.rs +0 -2
  251. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr +3 -3
  252. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-immutable.rs +0 -2
  253. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-immutable.stderr +2 -2
  254. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-a-reference.rs +0 -2
  255. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr +3 -3
  256. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-frombytes.rs +0 -2
  257. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr +12 -12
  258. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-intobytes.rs +0 -2
  259. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr +5 -5
  260. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.rs +0 -2
  261. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.stderr +3 -3
  262. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ptr-to-usize.rs +0 -2
  263. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ptr-to-usize.stderr +4 -4
  264. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.rs +0 -2
  265. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.stderr +6 -6
  266. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.rs +0 -2
  267. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.stderr +6 -6
  268. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-frombytes.rs +1 -3
  269. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr +16 -16
  270. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-nocell.rs +1 -3
  271. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-nocell.stderr +14 -14
  272. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-unsized.rs +0 -2
  273. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-unsized.stderr +3 -3
  274. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.rs +0 -2
  275. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr +9 -9
  276. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-a-reference.rs +0 -2
  277. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr +3 -3
  278. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-intobytes.rs +1 -3
  279. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr +18 -18
  280. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-nocell.rs +1 -3
  281. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-nocell.stderr +28 -28
  282. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.rs +0 -2
  283. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.stderr +3 -3
  284. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-decrease.rs +1 -3
  285. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-decrease.stderr +4 -4
  286. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase-allow-shrink.rs +1 -3
  287. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase-allow-shrink.stderr +4 -4
  288. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase.rs +1 -3
  289. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase.stderr +4 -4
  290. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-src-not-intobytes.rs +1 -3
  291. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-src-not-intobytes.stderr +8 -8
  292. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.rs +1 -3
  293. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr +43 -43
  294. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-decrease.rs +1 -3
  295. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-decrease.stderr +2 -2
  296. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-increase.rs +1 -3
  297. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-increase.stderr +2 -2
  298. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-src-not-intobytes.rs +1 -3
  299. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-src-not-intobytes.stderr +8 -8
  300. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-alignment-increase.rs +1 -3
  301. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-alignment-increase.stderr +4 -4
  302. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.rs +1 -3
  303. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.stderr +51 -51
  304. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-decrease.rs +1 -3
  305. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-decrease.stderr +2 -2
  306. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-increase.rs +1 -3
  307. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-increase.stderr +4 -4
  308. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-frombytes.rs +0 -2
  309. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-frombytes.stderr +29 -29
  310. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-intobytes.rs +0 -2
  311. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-intobytes.stderr +22 -22
  312. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-alignment-increase.rs +1 -3
  313. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-alignment-increase.stderr +4 -4
  314. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-mutable.rs +0 -2
  315. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-mutable.stderr +6 -6
  316. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +1 -3
  317. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +56 -56
  318. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-decrease.rs +1 -3
  319. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-decrease.stderr +2 -2
  320. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-increase.rs +1 -3
  321. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-increase.stderr +4 -4
  322. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.rs +1 -3
  323. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.stderr +21 -21
  324. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-bytes.rs +1 -3
  325. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-bytes.stderr +15 -15
  326. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-zeros.rs +1 -3
  327. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-zeros.stderr +12 -12
  328. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-immutable.rs +1 -3
  329. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-immutable.stderr +13 -13
  330. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-into-bytes.rs +1 -3
  331. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-into-bytes.stderr +8 -8
  332. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-issue-1296.rs +1 -3
  333. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-issue-1296.stderr +16 -16
  334. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-known-layout.rs +1 -3
  335. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-known-layout.stderr +8 -8
  336. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-try-from-bytes.rs +1 -3
  337. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-try-from-bytes.stderr +15 -15
  338. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-unaligned.rs +1 -3
  339. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-unaligned.stderr +5 -5
  340. data/rust-vendor/zerocopy/tests/ui-stable/include_value_not_from_bytes.rs +3 -5
  341. data/rust-vendor/zerocopy/tests/ui-stable/include_value_not_from_bytes.stderr +21 -21
  342. data/rust-vendor/zerocopy/tests/ui-stable/include_value_wrong_size.rs +1 -4
  343. data/rust-vendor/zerocopy/tests/ui-stable/include_value_wrong_size.stderr +8 -8
  344. data/rust-vendor/zerocopy/tests/ui-stable/invalid-impls/invalid-impls.rs +0 -1
  345. data/rust-vendor/zerocopy/tests/ui-stable/invalid-impls/invalid-impls.stderr +37 -37
  346. data/rust-vendor/zerocopy/tests/ui-stable/ptr-is-invariant-over-v.stderr +2 -2
  347. data/rust-vendor/zerocopy/tests/ui-stable/transmute-dst-not-frombytes.rs +1 -3
  348. data/rust-vendor/zerocopy/tests/ui-stable/transmute-dst-not-frombytes.stderr +15 -15
  349. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.rs +1 -3
  350. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.stderr +6 -6
  351. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.rs +0 -2
  352. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.stderr +2 -2
  353. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-frombytes.rs +0 -2
  354. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr +11 -11
  355. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-intobytes.rs +0 -2
  356. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr +4 -4
  357. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-unsized.rs +0 -2
  358. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-unsized.stderr +2 -2
  359. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-not-references.rs +0 -2
  360. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-not-references.stderr +3 -3
  361. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-immutable.rs +0 -2
  362. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-immutable.stderr +2 -2
  363. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-a-reference.rs +0 -2
  364. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-a-reference.stderr +3 -3
  365. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-frombytes.rs +0 -2
  366. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-frombytes.stderr +11 -11
  367. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-intobytes.rs +0 -2
  368. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-intobytes.stderr +4 -4
  369. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.rs +0 -2
  370. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.stderr +2 -2
  371. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ptr-to-usize.rs +0 -2
  372. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ptr-to-usize.stderr +9 -5
  373. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.rs +0 -2
  374. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.stderr +6 -6
  375. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.rs +0 -2
  376. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.stderr +6 -6
  377. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-frombytes.rs +1 -3
  378. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr +16 -16
  379. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-nocell.rs +1 -3
  380. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-nocell.stderr +14 -14
  381. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-unsized.rs +0 -2
  382. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-unsized.stderr +2 -2
  383. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.rs +0 -2
  384. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.stderr +9 -9
  385. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-a-reference.rs +0 -2
  386. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-a-reference.stderr +3 -3
  387. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-intobytes.rs +1 -3
  388. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-intobytes.stderr +18 -18
  389. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-nocell.rs +1 -3
  390. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-nocell.stderr +28 -28
  391. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.rs +0 -2
  392. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.stderr +2 -2
  393. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-decrease.rs +1 -3
  394. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-decrease.stderr +4 -4
  395. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase-allow-shrink.rs +1 -3
  396. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase-allow-shrink.stderr +4 -4
  397. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase.rs +1 -3
  398. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase.stderr +4 -4
  399. data/rust-vendor/zerocopy/tests/ui-stable/transmute-src-not-intobytes.rs +1 -3
  400. data/rust-vendor/zerocopy/tests/ui-stable/transmute-src-not-intobytes.stderr +8 -8
  401. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-dst-not-tryfrombytes.rs +1 -3
  402. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr +42 -42
  403. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-decrease.rs +1 -3
  404. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-decrease.stderr +2 -2
  405. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-increase.rs +1 -3
  406. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-increase.stderr +2 -2
  407. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-src-not-intobytes.rs +1 -3
  408. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-src-not-intobytes.stderr +7 -7
  409. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-alignment-increase.rs +1 -3
  410. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-alignment-increase.stderr +2 -2
  411. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.rs +1 -3
  412. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.stderr +49 -49
  413. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-decrease.rs +1 -3
  414. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-decrease.stderr +2 -2
  415. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-increase.rs +1 -3
  416. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-increase.stderr +4 -4
  417. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-frombytes.rs +0 -2
  418. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-frombytes.stderr +26 -26
  419. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-intobytes.rs +0 -2
  420. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-intobytes.stderr +19 -19
  421. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-alignment-increase.rs +1 -3
  422. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-alignment-increase.stderr +2 -2
  423. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.rs +0 -2
  424. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.stderr +6 -6
  425. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +1 -3
  426. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +54 -54
  427. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-decrease.rs +1 -3
  428. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-decrease.stderr +2 -2
  429. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-increase.rs +1 -3
  430. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-increase.stderr +2 -2
  431. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs +1 -3
  432. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.stderr +19 -19
  433. data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
  434. data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
  435. data/rust-vendor/zerocopy-derive/Cargo.lock +3 -11
  436. data/rust-vendor/zerocopy-derive/Cargo.toml +13 -11
  437. data/rust-vendor/zerocopy-derive/Cargo.toml.orig +7 -10
  438. data/rust-vendor/zerocopy-derive/src/derive/from_bytes.rs +188 -0
  439. data/rust-vendor/zerocopy-derive/src/derive/into_bytes.rs +158 -0
  440. data/rust-vendor/zerocopy-derive/src/derive/known_layout.rs +348 -0
  441. data/rust-vendor/zerocopy-derive/src/derive/mod.rs +130 -0
  442. data/rust-vendor/zerocopy-derive/src/derive/try_from_bytes.rs +729 -0
  443. data/rust-vendor/zerocopy-derive/src/derive/unaligned.rs +78 -0
  444. data/rust-vendor/zerocopy-derive/src/lib.rs +31 -1893
  445. data/rust-vendor/zerocopy-derive/src/output_tests/expected/eq.expected.rs +17 -0
  446. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_enum.expected.rs +64 -0
  447. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_struct.expected.rs +64 -0
  448. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_union.expected.rs +144 -0
  449. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_zeros.expected.rs +39 -0
  450. data/rust-vendor/zerocopy-derive/src/output_tests/expected/hash.expected.rs +24 -0
  451. data/rust-vendor/zerocopy-derive/src/output_tests/expected/immutable.expected.rs +17 -0
  452. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.expected.rs +17 -0
  453. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_basic.expected.rs +25 -0
  454. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_empty.expected.rs +17 -0
  455. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_trailing.expected.rs +25 -0
  456. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs +21 -0
  457. data/rust-vendor/zerocopy-derive/src/output_tests/expected/known_layout_repr_c_struct.expected.rs +135 -0
  458. data/rust-vendor/zerocopy-derive/src/output_tests/expected/known_layout_struct.expected.rs +34 -0
  459. data/rust-vendor/zerocopy-derive/src/output_tests/expected/split_at_repr_c.expected.rs +22 -0
  460. data/rust-vendor/zerocopy-derive/src/output_tests/expected/split_at_repr_transparent.expected.rs +22 -0
  461. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes.expected.rs +22 -0
  462. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_1.expected.rs +2802 -0
  463. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_2.expected.rs +2802 -0
  464. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_3.expected.rs +2802 -0
  465. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs +22 -0
  466. data/rust-vendor/zerocopy-derive/src/output_tests/expected/unaligned.expected.rs +17 -0
  467. data/rust-vendor/zerocopy-derive/src/output_tests/mod.rs +960 -0
  468. data/rust-vendor/zerocopy-derive/src/util.rs +757 -0
  469. data/rust-vendor/zerocopy-derive/tests/deprecated.rs +6 -0
  470. data/rust-vendor/zerocopy-derive/tests/enum_from_zeros.rs +9 -0
  471. data/rust-vendor/zerocopy-derive/tests/enum_known_layout.rs +4 -0
  472. data/rust-vendor/zerocopy-derive/tests/enum_no_cell.rs +4 -0
  473. data/rust-vendor/zerocopy-derive/tests/enum_to_bytes.rs +14 -0
  474. data/rust-vendor/zerocopy-derive/tests/enum_try_from_bytes.rs +37 -15
  475. data/rust-vendor/zerocopy-derive/tests/enum_unaligned.rs +4 -0
  476. data/rust-vendor/zerocopy-derive/tests/eq.rs +1 -0
  477. data/rust-vendor/zerocopy-derive/tests/hash.rs +1 -0
  478. data/rust-vendor/zerocopy-derive/tests/hygiene.rs +3 -1
  479. data/rust-vendor/zerocopy-derive/tests/include.rs +26 -4
  480. data/rust-vendor/zerocopy-derive/tests/issue_2117.rs +1 -0
  481. data/rust-vendor/zerocopy-derive/tests/issue_2835.rs +2 -1
  482. data/rust-vendor/zerocopy-derive/tests/issue_2880.rs +292 -0
  483. data/rust-vendor/zerocopy-derive/tests/issue_2915.rs +78 -0
  484. data/rust-vendor/zerocopy-derive/tests/paths_and_modules.rs +3 -0
  485. data/rust-vendor/zerocopy-derive/tests/priv_in_pub.rs +2 -0
  486. data/rust-vendor/zerocopy-derive/tests/struct_from_bytes.rs +6 -0
  487. data/rust-vendor/zerocopy-derive/tests/struct_from_zeros.rs +6 -0
  488. data/rust-vendor/zerocopy-derive/tests/struct_known_layout.rs +9 -0
  489. data/rust-vendor/zerocopy-derive/tests/struct_no_cell.rs +8 -0
  490. data/rust-vendor/zerocopy-derive/tests/struct_to_bytes.rs +17 -0
  491. data/rust-vendor/zerocopy-derive/tests/struct_try_from_bytes.rs +29 -65
  492. data/rust-vendor/zerocopy-derive/tests/struct_unaligned.rs +7 -0
  493. data/rust-vendor/zerocopy-derive/tests/ui-msrv/derive_transparent.rs +3 -2
  494. data/rust-vendor/zerocopy-derive/tests/ui-msrv/derive_transparent.stderr +32 -32
  495. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum.rs +48 -1
  496. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum.stderr +129 -126
  497. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum_from_bytes_u8_too_few.rs +2 -1
  498. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum_from_bytes_u8_too_few.stderr +6 -6
  499. data/rust-vendor/zerocopy-derive/tests/ui-msrv/late_compile_pass.rs +9 -2
  500. data/rust-vendor/zerocopy-derive/tests/ui-msrv/late_compile_pass.stderr +37 -37
  501. data/rust-vendor/zerocopy-derive/tests/ui-msrv/mid_compile_pass.rs +6 -2
  502. data/rust-vendor/zerocopy-derive/tests/ui-msrv/mid_compile_pass.stderr +26 -26
  503. data/rust-vendor/zerocopy-derive/tests/ui-msrv/msrv_specific.rs +3 -2
  504. data/rust-vendor/zerocopy-derive/tests/ui-msrv/msrv_specific.stderr +7 -7
  505. data/rust-vendor/zerocopy-derive/tests/ui-msrv/privacy.rs +66 -29
  506. data/rust-vendor/zerocopy-derive/tests/ui-msrv/privacy.stderr +78 -78
  507. data/rust-vendor/zerocopy-derive/tests/ui-msrv/struct.rs +34 -2
  508. data/rust-vendor/zerocopy-derive/tests/ui-msrv/struct.stderr +79 -79
  509. data/rust-vendor/zerocopy-derive/tests/ui-msrv/union.rs +12 -1
  510. data/rust-vendor/zerocopy-derive/tests/ui-msrv/union.stderr +29 -29
  511. data/rust-vendor/zerocopy-derive/tests/ui-msrv/union_into_bytes_cfg/union_into_bytes_cfg.rs +3 -2
  512. data/rust-vendor/zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.rs +3 -2
  513. data/rust-vendor/zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.stderr +2 -2
  514. data/rust-vendor/zerocopy-derive/tests/ui-nightly/derive_transparent.rs +3 -2
  515. data/rust-vendor/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr +57 -57
  516. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.rs +48 -1
  517. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.stderr +200 -192
  518. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum_from_bytes_u8_too_few.rs +2 -1
  519. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum_from_bytes_u8_too_few.stderr +6 -6
  520. data/rust-vendor/zerocopy-derive/tests/ui-nightly/late_compile_pass.rs +9 -2
  521. data/rust-vendor/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr +105 -105
  522. data/rust-vendor/zerocopy-derive/tests/ui-nightly/mid_compile_pass.rs +6 -2
  523. data/rust-vendor/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr +29 -29
  524. data/rust-vendor/zerocopy-derive/tests/ui-nightly/privacy.rs +66 -29
  525. data/rust-vendor/zerocopy-derive/tests/ui-nightly/privacy.stderr +15 -15
  526. data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.rs +34 -2
  527. data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.stderr +130 -129
  528. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.rs +12 -1
  529. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.stderr +42 -42
  530. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.rs +3 -2
  531. data/rust-vendor/zerocopy-derive/tests/ui-stable/derive_transparent.rs +3 -2
  532. data/rust-vendor/zerocopy-derive/tests/ui-stable/derive_transparent.stderr +57 -57
  533. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.rs +48 -1
  534. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.stderr +201 -186
  535. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum_from_bytes_u8_too_few.rs +2 -1
  536. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum_from_bytes_u8_too_few.stderr +6 -6
  537. data/rust-vendor/zerocopy-derive/tests/ui-stable/late_compile_pass.rs +9 -2
  538. data/rust-vendor/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr +105 -105
  539. data/rust-vendor/zerocopy-derive/tests/ui-stable/mid_compile_pass.rs +6 -2
  540. data/rust-vendor/zerocopy-derive/tests/ui-stable/mid_compile_pass.stderr +29 -29
  541. data/rust-vendor/zerocopy-derive/tests/ui-stable/privacy.rs +66 -29
  542. data/rust-vendor/zerocopy-derive/tests/ui-stable/privacy.stderr +15 -15
  543. data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.rs +34 -2
  544. data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.stderr +158 -129
  545. data/rust-vendor/zerocopy-derive/tests/ui-stable/union.rs +12 -1
  546. data/rust-vendor/zerocopy-derive/tests/ui-stable/union.stderr +48 -44
  547. data/rust-vendor/zerocopy-derive/tests/ui-stable/union_into_bytes_cfg/union_into_bytes_cfg.rs +3 -2
  548. data/rust-vendor/zerocopy-derive/tests/union_from_bytes.rs +15 -0
  549. data/rust-vendor/zerocopy-derive/tests/union_from_zeros.rs +14 -0
  550. data/rust-vendor/zerocopy-derive/tests/union_known_layout.rs +5 -0
  551. data/rust-vendor/zerocopy-derive/tests/union_no_cell.rs +5 -0
  552. data/rust-vendor/zerocopy-derive/tests/union_to_bytes.rs +5 -0
  553. data/rust-vendor/zerocopy-derive/tests/union_try_from_bytes.rs +34 -74
  554. data/rust-vendor/zerocopy-derive/tests/union_unaligned.rs +4 -1
  555. data/rust-vendor/zerocopy-derive/tests/unsafe_cell.rs +3 -0
  556. data/rust-vendor/zmij/.cargo-checksum.json +1 -1
  557. data/rust-vendor/zmij/.cargo_vcs_info.json +1 -1
  558. data/rust-vendor/zmij/Cargo.lock +10 -10
  559. data/rust-vendor/zmij/Cargo.toml +1 -1
  560. data/rust-vendor/zmij/Cargo.toml.orig +1 -1
  561. data/rust-vendor/zmij/README.md +1 -1
  562. data/rust-vendor/zmij/src/lib.rs +132 -158
  563. data/rust-vendor/zune-jpeg/.cargo-checksum.json +1 -1
  564. data/rust-vendor/zune-jpeg/.cargo_vcs_info.json +1 -1
  565. data/rust-vendor/zune-jpeg/Cargo.lock +1 -1
  566. data/rust-vendor/zune-jpeg/Cargo.toml +1 -1
  567. data/rust-vendor/zune-jpeg/Cargo.toml.orig +1 -1
  568. data/rust-vendor/zune-jpeg/src/bitstream.rs +1 -1
  569. data/rust-vendor/zune-jpeg/src/components.rs +2 -1
  570. data/rust-vendor/zune-jpeg/src/decoder.rs +3 -23
  571. data/rust-vendor/zune-jpeg/src/headers.rs +19 -1
  572. data/rust-vendor/zune-jpeg/src/lib.rs +1 -0
  573. data/rust-vendor/zune-jpeg/src/mcu.rs +6 -6
  574. data/rust-vendor/zune-jpeg/src/mcu_prog.rs +22 -34
  575. data/rust-vendor/zune-jpeg/src/upsampler/avx2.rs +3 -1
  576. data/rust-vendor/zune-jpeg/src/upsampler/neon.rs +13 -23
  577. data/rust-vendor/zune-jpeg/src/upsampler/portable_simd.rs +4 -1
  578. data/rust-vendor/zune-jpeg/src/upsampler/scalar.rs +4 -1
  579. metadata +41 -8
  580. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-unsized.stderr +0 -183
  581. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-unsized.stderr +0 -183
  582. data/rust-vendor/zerocopy-derive/src/enum.rs +0 -456
  583. data/rust-vendor/zerocopy-derive/src/ext.rs +0 -123
  584. data/rust-vendor/zerocopy-derive/src/output_tests.rs +0 -5608
  585. data/rust-vendor/zerocopy-derive/tests/crate_path.rs +0 -189
@@ -9,12 +9,14 @@
9
9
  // option. This file may not be copied, modified, or distributed
10
10
  // except according to those terms.
11
11
 
12
+ use core::marker::PhantomData;
13
+
12
14
  use crate::{
13
15
  error::*,
14
16
  fmt::{Braced, Hyphenated, Simple, Urn},
15
17
  non_nil::NonNilUuid,
16
18
  std::fmt,
17
- Uuid,
19
+ Bytes, Uuid,
18
20
  };
19
21
  use serde_core::{
20
22
  de::{self, Error as _},
@@ -64,116 +66,217 @@ impl Serialize for Braced {
64
66
  }
65
67
  }
66
68
 
69
+ struct UuidReadableVisitor<T> {
70
+ expecting: &'static str,
71
+ _marker: PhantomData<T>,
72
+ }
73
+
74
+ impl<'vi, T: UuidDeserialize> de::Visitor<'vi> for UuidReadableVisitor<T> {
75
+ type Value = T;
76
+
77
+ fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
78
+ formatter.write_str(self.expecting)
79
+ }
80
+
81
+ fn visit_str<E: de::Error>(self, value: &str) -> Result<T, E> {
82
+ T::from_str(value).map_err(de_error)
83
+ }
84
+
85
+ fn visit_bytes<E: de::Error>(self, value: &[u8]) -> Result<T, E> {
86
+ T::from_slice(value).map_err(de_error)
87
+ }
88
+
89
+ fn visit_seq<A>(self, mut seq: A) -> Result<T, A::Error>
90
+ where
91
+ A: de::SeqAccess<'vi>,
92
+ {
93
+ #[rustfmt::skip]
94
+ let bytes = [
95
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(0, &self)) },
96
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(1, &self)) },
97
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(2, &self)) },
98
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(3, &self)) },
99
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(4, &self)) },
100
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(5, &self)) },
101
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(6, &self)) },
102
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(7, &self)) },
103
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(8, &self)) },
104
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(9, &self)) },
105
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(10, &self)) },
106
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(11, &self)) },
107
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(12, &self)) },
108
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(13, &self)) },
109
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(14, &self)) },
110
+ match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(15, &self)) },
111
+ ];
112
+
113
+ T::from_bytes(bytes).map_err(de_error)
114
+ }
115
+ }
116
+
117
+ struct UuidBytesVisitor<T> {
118
+ _marker: PhantomData<T>,
119
+ }
120
+
121
+ impl<'vi, T: UuidDeserialize> de::Visitor<'vi> for UuidBytesVisitor<T> {
122
+ type Value = T;
123
+
124
+ fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
125
+ write!(formatter, "a 16 byte array")
126
+ }
127
+
128
+ fn visit_bytes<E: de::Error>(self, value: &[u8]) -> Result<T, E> {
129
+ T::from_slice(value).map_err(de_error)
130
+ }
131
+ }
132
+
133
+ fn de_error<E: de::Error>(e: Error) -> E {
134
+ E::custom(format_args!("UUID parsing failed: {}", e))
135
+ }
136
+
137
+ trait UuidDeserialize {
138
+ fn from_str(formatted: &str) -> Result<Self, Error>
139
+ where
140
+ Self: Sized;
141
+ fn from_slice(bytes: &[u8]) -> Result<Self, Error>
142
+ where
143
+ Self: Sized;
144
+ fn from_bytes(bytes: Bytes) -> Result<Self, Error>
145
+ where
146
+ Self: Sized;
147
+ }
148
+
149
+ impl UuidDeserialize for Uuid {
150
+ fn from_str(formatted: &str) -> Result<Self, Error> {
151
+ formatted.parse()
152
+ }
153
+
154
+ fn from_slice(bytes: &[u8]) -> Result<Self, Error> {
155
+ Uuid::from_slice(bytes)
156
+ }
157
+
158
+ fn from_bytes(bytes: Bytes) -> Result<Self, Error> {
159
+ Ok(Uuid::from_bytes(bytes))
160
+ }
161
+ }
162
+
67
163
  impl<'de> Deserialize<'de> for Uuid {
68
164
  fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
69
- fn de_error<E: de::Error>(e: Error) -> E {
70
- E::custom(format_args!("UUID parsing failed: {}", e))
165
+ if deserializer.is_human_readable() {
166
+ deserializer.deserialize_str(UuidReadableVisitor {
167
+ expecting: "a formatted UUID string",
168
+ _marker: PhantomData::<Uuid>,
169
+ })
170
+ } else {
171
+ deserializer.deserialize_bytes(UuidBytesVisitor {
172
+ _marker: PhantomData::<Uuid>,
173
+ })
71
174
  }
175
+ }
176
+ }
72
177
 
73
- if deserializer.is_human_readable() {
74
- struct UuidVisitor;
75
-
76
- impl<'vi> de::Visitor<'vi> for UuidVisitor {
77
- type Value = Uuid;
78
-
79
- fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
80
- write!(formatter, "a UUID string")
81
- }
82
-
83
- fn visit_str<E: de::Error>(self, value: &str) -> Result<Uuid, E> {
84
- value.parse::<Uuid>().map_err(de_error)
85
- }
86
-
87
- fn visit_bytes<E: de::Error>(self, value: &[u8]) -> Result<Uuid, E> {
88
- Uuid::from_slice(value).map_err(de_error)
89
- }
90
-
91
- fn visit_seq<A>(self, mut seq: A) -> Result<Uuid, A::Error>
92
- where
93
- A: de::SeqAccess<'vi>,
94
- {
95
- #[rustfmt::skip]
96
- let bytes = [
97
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(0, &self)) },
98
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(1, &self)) },
99
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(2, &self)) },
100
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(3, &self)) },
101
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(4, &self)) },
102
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(5, &self)) },
103
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(6, &self)) },
104
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(7, &self)) },
105
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(8, &self)) },
106
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(9, &self)) },
107
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(10, &self)) },
108
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(11, &self)) },
109
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(12, &self)) },
110
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(13, &self)) },
111
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(14, &self)) },
112
- match seq.next_element()? { Some(e) => e, None => return Err(A::Error::invalid_length(15, &self)) },
113
- ];
114
-
115
- Ok(Uuid::from_bytes(bytes))
116
- }
117
- }
178
+ impl UuidDeserialize for Braced {
179
+ fn from_str(formatted: &str) -> Result<Self, Error> {
180
+ formatted.parse()
181
+ }
118
182
 
119
- deserializer.deserialize_str(UuidVisitor)
120
- } else {
121
- struct UuidBytesVisitor;
183
+ fn from_slice(bytes: &[u8]) -> Result<Self, Error> {
184
+ Ok(Uuid::from_slice(bytes)?.into())
185
+ }
122
186
 
123
- impl<'vi> de::Visitor<'vi> for UuidBytesVisitor {
124
- type Value = Uuid;
187
+ fn from_bytes(bytes: Bytes) -> Result<Self, Error> {
188
+ Ok(Uuid::from_bytes(bytes).into())
189
+ }
190
+ }
125
191
 
126
- fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
127
- write!(formatter, "bytes")
128
- }
192
+ impl<'de> Deserialize<'de> for Braced {
193
+ fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
194
+ deserializer.deserialize_str(UuidReadableVisitor {
195
+ expecting: "a UUID string in the braced format",
196
+ _marker: PhantomData::<Braced>,
197
+ })
198
+ }
199
+ }
129
200
 
130
- fn visit_bytes<E: de::Error>(self, value: &[u8]) -> Result<Uuid, E> {
131
- Uuid::from_slice(value).map_err(de_error)
132
- }
133
- }
201
+ impl UuidDeserialize for Hyphenated {
202
+ fn from_str(formatted: &str) -> Result<Self, Error> {
203
+ formatted.parse()
204
+ }
134
205
 
135
- deserializer.deserialize_bytes(UuidBytesVisitor)
136
- }
206
+ fn from_slice(bytes: &[u8]) -> Result<Self, Error> {
207
+ Ok(Uuid::from_slice(bytes)?.into())
208
+ }
209
+
210
+ fn from_bytes(bytes: Bytes) -> Result<Self, Error> {
211
+ Ok(Uuid::from_bytes(bytes).into())
137
212
  }
138
213
  }
139
214
 
140
- impl<'de> Deserialize<'de> for NonNilUuid {
141
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
142
- where
143
- D: serde_core::Deserializer<'de>,
144
- {
145
- let uuid = Uuid::deserialize(deserializer)?;
215
+ impl<'de> Deserialize<'de> for Hyphenated {
216
+ fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
217
+ deserializer.deserialize_str(UuidReadableVisitor {
218
+ expecting: "a UUID string in the hyphenated format",
219
+ _marker: PhantomData::<Hyphenated>,
220
+ })
221
+ }
222
+ }
146
223
 
147
- NonNilUuid::try_from(uuid).map_err(|_| {
148
- de::Error::invalid_value(de::Unexpected::Other("nil UUID"), &"a non-nil UUID")
224
+ impl UuidDeserialize for Simple {
225
+ fn from_str(formatted: &str) -> Result<Self, Error> {
226
+ formatted.parse()
227
+ }
228
+
229
+ fn from_slice(bytes: &[u8]) -> Result<Self, Error> {
230
+ Ok(Uuid::from_slice(bytes)?.into())
231
+ }
232
+
233
+ fn from_bytes(bytes: Bytes) -> Result<Self, Error> {
234
+ Ok(Uuid::from_bytes(bytes).into())
235
+ }
236
+ }
237
+
238
+ impl<'de> Deserialize<'de> for Simple {
239
+ fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
240
+ deserializer.deserialize_str(UuidReadableVisitor {
241
+ expecting: "a UUID string in the simple format",
242
+ _marker: PhantomData::<Simple>,
149
243
  })
150
244
  }
151
245
  }
152
246
 
153
- enum ExpectedFormat {
154
- Simple,
155
- Braced,
156
- Urn,
247
+ impl UuidDeserialize for Urn {
248
+ fn from_str(formatted: &str) -> Result<Self, Error> {
249
+ formatted.parse()
250
+ }
251
+
252
+ fn from_slice(bytes: &[u8]) -> Result<Self, Error> {
253
+ Ok(Uuid::from_slice(bytes)?.into())
254
+ }
255
+
256
+ fn from_bytes(bytes: Bytes) -> Result<Self, Error> {
257
+ Ok(Uuid::from_bytes(bytes).into())
258
+ }
157
259
  }
158
260
 
159
- impl std::fmt::Display for ExpectedFormat {
160
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
161
- let s = match self {
162
- ExpectedFormat::Simple => "a simple Uuid string like 67e5504410b1426f9247bb680e5fe0c8",
163
- ExpectedFormat::Braced => {
164
- "a braced Uuid string like {67e55044-10b1-426f-9247-bb680e5fe0c8}"
165
- }
166
- ExpectedFormat::Urn => {
167
- "a URN Uuid string like urn:uuid:67e55044-10b1-426f-9247-bb680e5fe0c8"
168
- }
169
- };
170
- f.write_str(s)
261
+ impl<'de> Deserialize<'de> for Urn {
262
+ fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
263
+ deserializer.deserialize_str(UuidReadableVisitor {
264
+ expecting: "a UUID string in the URN format",
265
+ _marker: PhantomData::<Urn>,
266
+ })
171
267
  }
172
268
  }
173
269
 
174
- impl de::Expected for ExpectedFormat {
175
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
176
- <ExpectedFormat as std::fmt::Display>::fmt(self, formatter)
270
+ impl<'de> Deserialize<'de> for NonNilUuid {
271
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
272
+ where
273
+ D: serde_core::Deserializer<'de>,
274
+ {
275
+ let uuid = Uuid::deserialize(deserializer)?;
276
+
277
+ NonNilUuid::try_from(uuid).map_err(|_| {
278
+ de::Error::invalid_value(de::Unexpected::Other("nil UUID"), &"a non-nil UUID")
279
+ })
177
280
  }
178
281
  }
179
282
 
@@ -279,11 +382,7 @@ pub mod compact {
279
382
  /// }
280
383
  /// ```
281
384
  pub mod simple {
282
- use serde_core::{de, Deserialize};
283
-
284
- use crate::{parser::parse_simple, Uuid};
285
-
286
- use super::ExpectedFormat;
385
+ use super::*;
287
386
 
288
387
  /// Serialize from a [`Uuid`] as a `uuid::fmt::Simple`
289
388
  ///
@@ -314,11 +413,7 @@ pub mod simple {
314
413
  where
315
414
  D: serde_core::Deserializer<'de>,
316
415
  {
317
- let s = <&str as Deserialize>::deserialize(deserializer)?;
318
- let bytes = parse_simple(s.as_bytes()).map_err(|_| {
319
- de::Error::invalid_value(de::Unexpected::Str(s), &ExpectedFormat::Simple)
320
- })?;
321
- Ok(Uuid::from_bytes(bytes))
416
+ Ok(Simple::deserialize(deserializer)?.into())
322
417
  }
323
418
 
324
419
  #[cfg(test)]
@@ -326,7 +421,7 @@ pub mod simple {
326
421
  use serde::de::{self, Error};
327
422
  use serde_test::{Readable, Token};
328
423
 
329
- use crate::{external::serde_support::ExpectedFormat, Uuid};
424
+ use super::*;
330
425
 
331
426
  const HYPHENATED_UUID_STR: &str = "f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4";
332
427
  const SIMPLE_UUID_STR: &str = "f9168c5eceb24faab6bf329bf39fa1e4";
@@ -377,13 +472,7 @@ pub mod simple {
377
472
  Token::BorrowedStr(HYPHENATED_UUID_STR),
378
473
  Token::TupleStructEnd,
379
474
  ],
380
- &format!(
381
- "{}",
382
- de::value::Error::invalid_value(
383
- de::Unexpected::Str(HYPHENATED_UUID_STR),
384
- &ExpectedFormat::Simple,
385
- )
386
- ),
475
+ &format!("{}", de::value::Error::custom("UUID parsing failed: invalid group length in group 4: expected 12, found 12")),
387
476
  );
388
477
  }
389
478
  }
@@ -411,11 +500,7 @@ pub mod simple {
411
500
  /// }
412
501
  /// ```
413
502
  pub mod braced {
414
- use serde_core::{de, Deserialize};
415
-
416
- use crate::parser::parse_braced;
417
-
418
- use super::ExpectedFormat;
503
+ use super::*;
419
504
 
420
505
  /// Serialize from a [`Uuid`] as a `uuid::fmt::Braced`
421
506
  ///
@@ -446,19 +531,16 @@ pub mod braced {
446
531
  where
447
532
  D: serde_core::Deserializer<'de>,
448
533
  {
449
- let s = <&str as Deserialize>::deserialize(deserializer)?;
450
- let bytes = parse_braced(s.as_bytes()).map_err(|_| {
451
- de::Error::invalid_value(de::Unexpected::Str(s), &ExpectedFormat::Braced)
452
- })?;
453
- Ok(crate::Uuid::from_bytes(bytes))
534
+ Ok(Braced::deserialize(deserializer)?.into())
454
535
  }
455
536
 
456
537
  #[cfg(test)]
457
538
  mod tests {
539
+
458
540
  use serde::de::{self, Error};
459
541
  use serde_test::{Readable, Token};
460
542
 
461
- use crate::{external::serde_support::ExpectedFormat, Uuid};
543
+ use super::*;
462
544
 
463
545
  const HYPHENATED_UUID_STR: &str = "f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4";
464
546
  const BRACED_UUID_STR: &str = "{f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4}";
@@ -509,13 +591,7 @@ pub mod braced {
509
591
  Token::BorrowedStr(HYPHENATED_UUID_STR),
510
592
  Token::TupleStructEnd,
511
593
  ],
512
- &format!(
513
- "{}",
514
- de::value::Error::invalid_value(
515
- de::Unexpected::Str(HYPHENATED_UUID_STR),
516
- &ExpectedFormat::Braced,
517
- )
518
- ),
594
+ &format!("{}", de::value::Error::custom("UUID parsing failed: invalid group length in group 4: expected 12, found 12")),
519
595
  );
520
596
  }
521
597
  }
@@ -543,11 +619,7 @@ pub mod braced {
543
619
  /// }
544
620
  /// ```
545
621
  pub mod urn {
546
- use serde_core::{de, Deserialize};
547
-
548
- use crate::parser::parse_urn;
549
-
550
- use super::ExpectedFormat;
622
+ use super::*;
551
623
 
552
624
  /// Serialize from a [`Uuid`] as a `uuid::fmt::Urn`
553
625
  ///
@@ -578,10 +650,7 @@ pub mod urn {
578
650
  where
579
651
  D: serde_core::Deserializer<'de>,
580
652
  {
581
- let s = <&str as Deserialize>::deserialize(deserializer)?;
582
- let bytes = parse_urn(s.as_bytes())
583
- .map_err(|_| de::Error::invalid_value(de::Unexpected::Str(s), &ExpectedFormat::Urn))?;
584
- Ok(crate::Uuid::from_bytes(bytes))
653
+ Ok(Urn::deserialize(deserializer)?.into())
585
654
  }
586
655
 
587
656
  #[cfg(test)]
@@ -589,7 +658,7 @@ pub mod urn {
589
658
  use serde::de::{self, Error};
590
659
  use serde_test::{Readable, Token};
591
660
 
592
- use crate::{external::serde_support::ExpectedFormat, Uuid};
661
+ use super::*;
593
662
 
594
663
  const HYPHENATED_UUID_STR: &str = "f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4";
595
664
  const URN_UUID_STR: &str = "urn:uuid:f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4";
@@ -640,13 +709,7 @@ pub mod urn {
640
709
  Token::BorrowedStr(HYPHENATED_UUID_STR),
641
710
  Token::TupleStructEnd,
642
711
  ],
643
- &format!(
644
- "{}",
645
- de::value::Error::invalid_value(
646
- de::Unexpected::Str(HYPHENATED_UUID_STR),
647
- &ExpectedFormat::Urn,
648
- )
649
- ),
712
+ &format!("{}", de::value::Error::custom("UUID parsing failed: invalid group length in group 4: expected 12, found 12")),
650
713
  );
651
714
  }
652
715
  }
@@ -708,6 +771,7 @@ mod serde_tests {
708
771
  let uuid_str = "f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4";
709
772
  let u = Uuid::parse_str(uuid_str).unwrap();
710
773
  serde_test::assert_ser_tokens(&u.hyphenated(), &[Token::Str(uuid_str)]);
774
+ serde_test::assert_de_tokens(&u.hyphenated(), &[Token::Str(uuid_str)]);
711
775
  }
712
776
 
713
777
  #[test]
@@ -715,6 +779,7 @@ mod serde_tests {
715
779
  let uuid_str = "f9168c5eceb24faab6bf329bf39fa1e4";
716
780
  let u = Uuid::parse_str(uuid_str).unwrap();
717
781
  serde_test::assert_ser_tokens(&u.simple(), &[Token::Str(uuid_str)]);
782
+ serde_test::assert_de_tokens(&u.simple(), &[Token::Str(uuid_str)]);
718
783
  }
719
784
 
720
785
  #[test]
@@ -722,6 +787,7 @@ mod serde_tests {
722
787
  let uuid_str = "urn:uuid:f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4";
723
788
  let u = Uuid::parse_str(uuid_str).unwrap();
724
789
  serde_test::assert_ser_tokens(&u.urn(), &[Token::Str(uuid_str)]);
790
+ serde_test::assert_de_tokens(&u.urn(), &[Token::Str(uuid_str)]);
725
791
  }
726
792
 
727
793
  #[test]
@@ -729,6 +795,7 @@ mod serde_tests {
729
795
  let uuid_str = "{f9168c5e-ceb2-4faa-b6bf-329bf39fa1e4}";
730
796
  let u = Uuid::parse_str(uuid_str).unwrap();
731
797
  serde_test::assert_ser_tokens(&u.braced(), &[Token::Str(uuid_str)]);
798
+ serde_test::assert_de_tokens(&u.braced(), &[Token::Str(uuid_str)]);
732
799
  }
733
800
 
734
801
  #[test]
@@ -38,7 +38,7 @@
38
38
  //!
39
39
  //! ```toml
40
40
  //! [dependencies.uuid]
41
- //! version = "1.19.0"
41
+ //! version = "1.20.0"
42
42
  //! # Lets you generate random UUIDs
43
43
  //! features = [
44
44
  //! "v4",
@@ -99,7 +99,6 @@
99
99
  //!
100
100
  //! Other crate features can also be useful beyond the version support:
101
101
  //!
102
- //! * `macro-diagnostics` - enhances the diagnostics of `uuid!` macro.
103
102
  //! * `serde` - adds the ability to serialize and deserialize a UUID using
104
103
  //! `serde`.
105
104
  //! * `borsh` - adds the ability to serialize and deserialize a UUID using
@@ -139,7 +138,7 @@
139
138
  //!
140
139
  //! ```toml
141
140
  //! [dependencies.uuid]
142
- //! version = "1.19.0"
141
+ //! version = "1.20.0"
143
142
  //! features = [
144
143
  //! "v4",
145
144
  //! "v7",
@@ -154,7 +153,7 @@
154
153
  //!
155
154
  //! ```toml
156
155
  //! [dependencies.uuid]
157
- //! version = "1.19.0"
156
+ //! version = "1.20.0"
158
157
  //! default-features = false
159
158
  //! ```
160
159
  //!
@@ -212,7 +211,7 @@
212
211
  #![doc(
213
212
  html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
214
213
  html_favicon_url = "https://www.rust-lang.org/favicon.ico",
215
- html_root_url = "https://docs.rs/uuid/1.19.0"
214
+ html_root_url = "https://docs.rs/uuid/1.20.0"
216
215
  )]
217
216
 
218
217
  #[cfg(any(feature = "std", test))]
@@ -270,10 +269,6 @@ mod sha1;
270
269
 
271
270
  mod external;
272
271
 
273
- #[doc(hidden)]
274
- #[cfg(feature = "macro-diagnostics")]
275
- pub extern crate uuid_macro_internal;
276
-
277
272
  #[doc(hidden)]
278
273
  pub mod __macro_support {
279
274
  pub use crate::std::result::Result::{Err, Ok};
@@ -813,10 +808,13 @@ impl Uuid {
813
808
 
814
809
  /// Returns the bytes of the UUID in little-endian order.
815
810
  ///
816
- /// The bytes will be flipped to convert into little-endian order. This is
817
- /// based on the endianness of the UUID, rather than the target environment
811
+ /// The bytes for each field will be flipped to convert into little-endian order.
812
+ /// This is based on the endianness of the UUID, rather than the target environment
818
813
  /// so bytes will be flipped on both big and little endian machines.
819
814
  ///
815
+ /// Note that ordering is applied to each _field_, rather than to the bytes as a whole.
816
+ /// This ordering is compatible with Microsoft's mixed endian GUID format.
817
+ ///
820
818
  /// # Examples
821
819
  ///
822
820
  /// ```
@@ -1,37 +1,3 @@
1
- macro_rules! define_uuid_macro {
2
- {$(#[$doc:meta])*} => {
3
- $(#[$doc])*
4
- #[cfg(feature = "macro-diagnostics")]
5
- #[macro_export]
6
- macro_rules! uuid {
7
- ($uuid:expr) => {{
8
- const OUTPUT: $crate::Uuid = match $crate::Uuid::try_parse($uuid) {
9
- $crate::__macro_support::Ok(u) => u,
10
- $crate::__macro_support::Err(_) => panic!("invalid UUID"),
11
- };
12
- OUTPUT
13
- }};
14
- ($uuid:literal) => {{
15
- $crate::Uuid::from_bytes($crate::uuid_macro_internal::parse_lit!($uuid))
16
- }};
17
- }
18
-
19
- $(#[$doc])*
20
- #[cfg(not(feature = "macro-diagnostics"))]
21
- #[macro_export]
22
- macro_rules! uuid {
23
- ($uuid:expr) => {{
24
- const OUTPUT: $crate::Uuid = match $crate::Uuid::try_parse($uuid) {
25
- $crate::__macro_support::Ok(u) => u,
26
- $crate::__macro_support::Err(_) => panic!("invalid UUID"),
27
- };
28
- OUTPUT
29
- }};
30
- }
31
- }
32
- }
33
-
34
- define_uuid_macro! {
35
1
  /// Parse [`Uuid`][uuid::Uuid]s from string literals at compile time.
36
2
  ///
37
3
  /// ## Usage
@@ -64,27 +30,16 @@ define_uuid_macro! {
64
30
  /// let UUID = uuid!(UUID_STR);
65
31
  /// ```
66
32
  ///
67
- /// ## Compilation Failures
68
- ///
69
- /// Invalid UUIDs are rejected:
70
- ///
71
- /// ```compile_fail
72
- /// # use uuid::uuid;
73
- /// let uuid = uuid!("F9168C5E-ZEB2-4FAA-B6BF-329BF39FA1E4");
74
- /// ```
75
- ///
76
- /// Enable the feature `macro-diagnostics` to see the error messages below.
77
- ///
78
- /// Provides the following compilation error:
79
- ///
80
- /// ```txt
81
- /// error: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found Z at 9
82
- /// |
83
- /// | let id = uuid!("F9168C5E-ZEB2-4FAA-B6BF-329BF39FA1E4");
84
- /// | ^
85
- /// ```
86
- ///
87
33
  /// [uuid::Uuid]: https://docs.rs/uuid/*/uuid/struct.Uuid.html
34
+ #[macro_export]
35
+ macro_rules! uuid {
36
+ ($uuid:expr) => {{
37
+ const OUTPUT: $crate::Uuid = match $crate::Uuid::try_parse($uuid) {
38
+ $crate::__macro_support::Ok(u) => u,
39
+ $crate::__macro_support::Err(_) => panic!("invalid UUID"),
40
+ };
41
+ OUTPUT
42
+ }};
88
43
  }
89
44
 
90
45
  // Internal macros