html-to-markdown 2.24.1 → 2.24.3

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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -6
  3. data/ext/html-to-markdown-rb/native/Cargo.lock +13 -13
  4. data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
  5. data/lib/html_to_markdown/version.rb +1 -1
  6. data/rust-vendor/bytemuck/.cargo-checksum.json +1 -1
  7. data/rust-vendor/bytemuck/.cargo_vcs_info.json +1 -1
  8. data/rust-vendor/bytemuck/.github/workflows/rust.yml +4 -4
  9. data/rust-vendor/bytemuck/Cargo.lock +16 -9
  10. data/rust-vendor/bytemuck/Cargo.toml +6 -2
  11. data/rust-vendor/bytemuck/Cargo.toml.orig +7 -6
  12. data/rust-vendor/bytemuck/changelog.md +5 -0
  13. data/rust-vendor/bytemuck/src/must.rs +1 -1
  14. data/rust-vendor/bytemuck/src/pod.rs +13 -0
  15. data/rust-vendor/bytemuck/src/zeroable.rs +13 -0
  16. data/rust-vendor/bytemuck/src/zeroable_in_option.rs +2 -2
  17. data/rust-vendor/bytemuck/tests/std_tests.rs +1 -1
  18. data/rust-vendor/cc/.cargo-checksum.json +1 -1
  19. data/rust-vendor/cc/.cargo_vcs_info.json +1 -1
  20. data/rust-vendor/cc/CHANGELOG.md +8 -0
  21. data/rust-vendor/cc/Cargo.lock +3 -3
  22. data/rust-vendor/cc/Cargo.toml +2 -2
  23. data/rust-vendor/cc/Cargo.toml.orig +2 -2
  24. data/rust-vendor/cc/src/lib.rs +1 -0
  25. data/rust-vendor/cc/src/target/generated.rs +10 -0
  26. data/rust-vendor/find-msvc-tools/.cargo-checksum.json +1 -1
  27. data/rust-vendor/find-msvc-tools/.cargo_vcs_info.json +1 -1
  28. data/rust-vendor/find-msvc-tools/CHANGELOG.md +6 -0
  29. data/rust-vendor/find-msvc-tools/Cargo.lock +1 -1
  30. data/rust-vendor/find-msvc-tools/Cargo.toml +1 -1
  31. data/rust-vendor/find-msvc-tools/Cargo.toml.orig +1 -1
  32. data/rust-vendor/find-msvc-tools/src/find_tools.rs +55 -20
  33. data/rust-vendor/html-to-markdown-rs/src/converter/handlers/link.rs +1 -9
  34. data/rust-vendor/html-to-markdown-rs/src/converter/inline/link.rs +2 -11
  35. data/rust-vendor/html-to-markdown-rs/src/converter/list/definition.rs +30 -7
  36. data/rust-vendor/html-to-markdown-rs/src/converter/semantic/definition_list.rs +30 -7
  37. data/rust-vendor/html-to-markdown-rs/tests/issue_199_regressions.rs +15 -0
  38. data/rust-vendor/html-to-markdown-rs/tests/issue_200_regressions.rs +36 -0
  39. data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
  40. data/rust-vendor/zerocopy/.cargo_vcs_info.json +2 -1
  41. data/rust-vendor/zerocopy/Cargo.lock +3 -3
  42. data/rust-vendor/zerocopy/Cargo.toml +4 -4
  43. data/rust-vendor/zerocopy/Cargo.toml.orig +4 -4
  44. data/rust-vendor/zerocopy/src/doctests.rs +27 -0
  45. data/rust-vendor/zerocopy/src/error.rs +30 -0
  46. data/rust-vendor/zerocopy/src/layout.rs +239 -135
  47. data/rust-vendor/zerocopy/src/lib.rs +16 -0
  48. data/rust-vendor/zerocopy/src/macros.rs +255 -125
  49. data/rust-vendor/zerocopy/src/pointer/mod.rs +1 -1
  50. data/rust-vendor/zerocopy/src/pointer/ptr.rs +109 -23
  51. data/rust-vendor/zerocopy/src/util/macro_util.rs +344 -383
  52. data/rust-vendor/zerocopy/src/util/mod.rs +38 -0
  53. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.stderr +8 -0
  54. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.stderr +10 -0
  55. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.stderr +11 -3
  56. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.stderr +10 -0
  57. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.stderr +10 -0
  58. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.stderr +10 -0
  59. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.stderr +11 -3
  60. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -10
  61. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.stderr +1 -1
  62. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -10
  63. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.stderr +1 -11
  64. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.stderr +9 -0
  65. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.stderr +10 -0
  66. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.stderr +16 -8
  67. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.stderr +10 -0
  68. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.stderr +10 -0
  69. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr +10 -0
  70. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.stderr +16 -8
  71. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.stderr +38 -38
  72. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +33 -33
  73. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.stderr +12 -12
  74. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.stderr +9 -0
  75. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.stderr +10 -0
  76. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.stderr +16 -8
  77. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.stderr +10 -0
  78. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.stderr +10 -0
  79. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.stderr +10 -0
  80. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.stderr +16 -8
  81. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.stderr +38 -38
  82. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +33 -33
  83. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.stderr +12 -12
  84. data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
  85. data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
  86. data/rust-vendor/zerocopy-derive/Cargo.lock +1 -1
  87. data/rust-vendor/zerocopy-derive/Cargo.toml +1 -1
  88. data/rust-vendor/zerocopy-derive/Cargo.toml.orig +1 -1
  89. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.stderr +3 -3
  90. data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.stderr +5 -5
  91. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.stderr +3 -3
  92. data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.stderr +5 -5
  93. data/rust-vendor/zmij/.cargo-checksum.json +1 -1
  94. data/rust-vendor/zmij/.cargo_vcs_info.json +1 -1
  95. data/rust-vendor/zmij/Cargo.lock +16 -16
  96. data/rust-vendor/zmij/Cargo.toml +1 -1
  97. data/rust-vendor/zmij/Cargo.toml.orig +1 -1
  98. data/rust-vendor/zmij/README.md +1 -1
  99. data/rust-vendor/zmij/src/lib.rs +54 -93
  100. metadata +4 -50
  101. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-unsized.rs +0 -15
  102. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-unsized.stderr +0 -8
  103. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-unsized.rs +0 -15
  104. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-unsized.stderr +0 -8
  105. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-alignment-increase.rs +0 -19
  106. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-alignment-increase.stderr +0 -9
  107. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-decrease.rs +0 -19
  108. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-decrease.stderr +0 -9
  109. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-increase.rs +0 -19
  110. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-size-increase.stderr +0 -17
  111. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-alignment-increase.rs +0 -18
  112. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-alignment-increase.stderr +0 -9
  113. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-decrease.rs +0 -18
  114. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-decrease.stderr +0 -9
  115. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-increase.rs +0 -18
  116. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-size-increase.stderr +0 -9
  117. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-unsized.rs +0 -15
  118. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-unsized.stderr +0 -16
  119. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-unsized.rs +0 -15
  120. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-unsized.stderr +0 -16
  121. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-alignment-increase.rs +0 -19
  122. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-alignment-increase.stderr +0 -9
  123. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-decrease.rs +0 -19
  124. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-decrease.stderr +0 -9
  125. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-increase.rs +0 -19
  126. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-size-increase.stderr +0 -17
  127. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-alignment-increase.rs +0 -18
  128. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-alignment-increase.stderr +0 -9
  129. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-decrease.rs +0 -18
  130. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-decrease.stderr +0 -9
  131. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-increase.rs +0 -18
  132. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-size-increase.stderr +0 -9
  133. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-unsized.rs +0 -15
  134. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-unsized.stderr +0 -16
  135. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-unsized.rs +0 -15
  136. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-unsized.stderr +0 -16
  137. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-alignment-increase.rs +0 -19
  138. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-alignment-increase.stderr +0 -9
  139. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-decrease.rs +0 -19
  140. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-decrease.stderr +0 -9
  141. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-increase.rs +0 -19
  142. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-size-increase.stderr +0 -17
  143. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-alignment-increase.rs +0 -18
  144. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-alignment-increase.stderr +0 -9
  145. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-decrease.rs +0 -18
  146. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-decrease.stderr +0 -9
  147. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-increase.rs +0 -18
  148. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-size-increase.stderr +0 -9
@@ -1,18 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_ref;
13
-
14
- // Although this is not a soundness requirement, we currently require that the
15
- // size of the destination type is not smaller than the size of the source type.
16
- fn main() {
17
- let _decrease_size: Result<&u8, _> = try_transmute_ref!(&AU16(0));
18
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-nightly/try_transmute_ref-size-decrease.rs:17:42
3
- |
4
- 17 | let _decrease_size: Result<&u8, _> = try_transmute_ref!(&AU16(0));
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `AU16` (16 bits)
8
- = note: target type: `u8` (8 bits)
9
- = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,18 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_ref;
13
-
14
- // `try_transmute_ref!` does not support transmuting from a smaller type to a
15
- // larger one.
16
- fn main() {
17
- let _increase_size: Result<&AU16, _> = try_transmute_ref!(&[0u8; 2]);
18
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-nightly/try_transmute_ref-size-increase.rs:17:44
3
- |
4
- 17 | let _increase_size: Result<&AU16, _> = try_transmute_ref!(&[0u8; 2]);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `zerocopy::util::macro_util::AlignOf<[u8; 2]>` (8 bits)
8
- = note: target type: `zerocopy::util::macro_util::MaxAlignsOf<[u8; 2], AU16>` (16 bits)
9
- = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,15 +0,0 @@
1
- // Copyright 2023 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- use zerocopy::transmute_mut;
10
-
11
- fn main() {}
12
-
13
- // `transmute_mut!` does not support transmuting into an unsized destination
14
- // type.
15
- const DST_UNSIZED: &mut [u8] = transmute_mut!(&mut [0u8; 1]);
@@ -1,16 +0,0 @@
1
- error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2
- --> tests/ui-stable/transmute-mut-dst-unsized.rs:15:32
3
- |
4
- 15 | const DST_UNSIZED: &mut [u8] = transmute_mut!(&mut [0u8; 1]);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6
- |
7
- = help: the trait `Sized` is not implemented for `[u8]`
8
- note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
9
- --> src/util/macro_util.rs
10
- |
11
- | impl<'a, Src, Dst> Wrap<&'a mut Src, &'a mut Dst> {
12
- | ^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
13
- ...
14
- | pub fn transmute_mut(self) -> &'a mut Dst
15
- | ------------- required by a bound in this associated function
16
- = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,15 +0,0 @@
1
- // Copyright 2023 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- use zerocopy::transmute_ref;
10
-
11
- fn main() {}
12
-
13
- // `transmute_ref!` does not support transmuting into an unsized destination
14
- // type.
15
- const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
@@ -1,16 +0,0 @@
1
- error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2
- --> tests/ui-stable/transmute-ref-dst-unsized.rs:15:28
3
- |
4
- 15 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6
- |
7
- = help: the trait `Sized` is not implemented for `[u8]`
8
- note: required by a bound in `Wrap::<&'a Src, &'a Dst>::transmute_ref`
9
- --> src/util/macro_util.rs
10
- |
11
- | impl<'a, Src, Dst> Wrap<&'a Src, &'a Dst> {
12
- | ^^^ required by this bound in `Wrap::<&Src, &Dst>::transmute_ref`
13
- ...
14
- | pub const unsafe fn transmute_ref(self) -> &'a Dst {
15
- | ------------- required by a bound in this associated function
16
- = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,19 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_mut;
13
-
14
- // `try_transmute_mut!` does not support transmuting from a type of smaller
15
- // alignment to one of larger alignment.
16
- fn main() {
17
- let src = &mut [0u8; 2];
18
- let _increase_size: Result<&mut AU16, _> = try_transmute_mut!(src);
19
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-stable/try_transmute_mut-alignment-increase.rs:18:48
3
- |
4
- 18 | let _increase_size: Result<&mut AU16, _> = try_transmute_mut!(src);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `AlignOf<[u8; 2]>` (8 bits)
8
- = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits)
9
- = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,19 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_mut;
13
-
14
- // Although this is not a soundness requirement, we currently require that the
15
- // size of the destination type is not smaller than the size of the source type.
16
- fn main() {
17
- let src = &mut AU16(0);
18
- let _decrease_size: Result<&mut u8, _> = try_transmute_mut!(src);
19
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-stable/try_transmute_mut-size-decrease.rs:18:46
3
- |
4
- 18 | let _decrease_size: Result<&mut u8, _> = try_transmute_mut!(src);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `AU16` (16 bits)
8
- = note: target type: `u8` (8 bits)
9
- = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,19 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_mut;
13
-
14
- // `try_transmute_mut!` does not support transmuting from a smaller type to a
15
- // larger one.
16
- fn main() {
17
- let src = &mut 0u8;
18
- let _increase_size: Result<&mut [u8; 2], _> = try_transmute_mut!(src);
19
- }
@@ -1,17 +0,0 @@
1
- warning: unused import: `util::AU16`
2
- --> tests/ui-stable/try_transmute_mut-size-increase.rs:11:5
3
- |
4
- 11 | use util::AU16;
5
- | ^^^^^^^^^^
6
- |
7
- = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
8
-
9
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
10
- --> tests/ui-stable/try_transmute_mut-size-increase.rs:18:51
11
- |
12
- 18 | let _increase_size: Result<&mut [u8; 2], _> = try_transmute_mut!(src);
13
- | ^^^^^^^^^^^^^^^^^^^^^^^
14
- |
15
- = note: source type: `u8` (8 bits)
16
- = note: target type: `[u8; 2]` (16 bits)
17
- = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,18 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_ref;
13
-
14
- // `try_transmute_ref!` does not support transmuting from a type of smaller
15
- // alignment to one of larger alignment.
16
- fn main() {
17
- let _increase_size: Result<&AU16, _> = try_transmute_ref!(&[0u8; 2]);
18
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-stable/try_transmute_ref-alignment-increase.rs:17:44
3
- |
4
- 17 | let _increase_size: Result<&AU16, _> = try_transmute_ref!(&[0u8; 2]);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `AlignOf<[u8; 2]>` (8 bits)
8
- = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits)
9
- = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,18 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_ref;
13
-
14
- // Although this is not a soundness requirement, we currently require that the
15
- // size of the destination type is not smaller than the size of the source type.
16
- fn main() {
17
- let _decrease_size: Result<&u8, _> = try_transmute_ref!(&AU16(0));
18
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-stable/try_transmute_ref-size-decrease.rs:17:42
3
- |
4
- 17 | let _decrease_size: Result<&u8, _> = try_transmute_ref!(&AU16(0));
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `AU16` (16 bits)
8
- = note: target type: `u8` (8 bits)
9
- = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,18 +0,0 @@
1
- // Copyright 2024 The Fuchsia Authors
2
- //
3
- // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4
- // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5
- // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6
- // This file may not be copied, modified, or distributed except according to
7
- // those terms.
8
-
9
- include!("../include.rs");
10
-
11
- use util::AU16;
12
- use zerocopy::try_transmute_ref;
13
-
14
- // `try_transmute_ref!` does not support transmuting from a smaller type to a
15
- // larger one.
16
- fn main() {
17
- let _increase_size: Result<&AU16, _> = try_transmute_ref!(&[0u8; 2]);
18
- }
@@ -1,9 +0,0 @@
1
- error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2
- --> tests/ui-stable/try_transmute_ref-size-increase.rs:17:44
3
- |
4
- 17 | let _increase_size: Result<&AU16, _> = try_transmute_ref!(&[0u8; 2]);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
- |
7
- = note: source type: `AlignOf<[u8; 2]>` (8 bits)
8
- = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits)
9
- = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)