Skip to content

Commit 0e20369

Browse files
committed
[wip] Account for alignment directives on DSTs in derive(IntoBytes)
Fixes #3063 gherrit-pr-id: Gf18655827d1c30e4421c83579b962bf7aa453969
1 parent b7fc71d commit 0e20369

30 files changed

+442
-223
lines changed

src/macros.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,8 @@ macro_rules! cryptocorrosion_derive_traits {
10971097
) => {
10981098
$crate::struct_padding!(
10991099
Self,
1100+
None,
1101+
None,
11001102
[
11011103
$($($tuple_field_ty),*)?
11021104
$($($field_ty),*)?
@@ -1179,6 +1181,8 @@ macro_rules! cryptocorrosion_derive_traits {
11791181
{
11801182
$crate::union_padding!(
11811183
Self,
1184+
None::<usize>,
1185+
None::<usize>,
11821186
[$($field_ty),*]
11831187
)
11841188
},

src/util/macro_util.rs

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,12 @@ pub use __size_of::size_of;
329329
#[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`.
330330
#[macro_export]
331331
macro_rules! struct_padding {
332-
($t:ty, [$($ts:ty),*]) => {
332+
($t:ty, $align:expr, $packed:expr, [$($ts:ty),*]) => {{
333+
// The `align` and `packed` directives can be ignored here. Regardless
334+
// of if and how they are set, comparing the size of `$t` to the sum of
335+
// its field sizes is a reliable indicator of the presence of padding.
333336
$crate::util::macro_util::size_of::<$t>() - (0 $(+ $crate::util::macro_util::size_of::<$ts>())*)
334-
};
337+
}};
335338
}
336339

337340
/// Does the `repr(C)` struct type `$t` have padding?
@@ -342,10 +345,10 @@ macro_rules! struct_padding {
342345
#[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`.
343346
#[macro_export]
344347
macro_rules! repr_c_struct_has_padding {
345-
($t:ty, [$($ts:tt),*]) => {{
348+
($t:ty, $align:expr, $packed:expr, [$($ts:tt),*]) => {{
346349
let layout = $crate::DstLayout::for_repr_c_struct(
347-
$crate::util::macro_util::core_reexport::option::Option::None,
348-
$crate::util::macro_util::core_reexport::option::Option::None,
350+
$align,
351+
$packed,
349352
&[$($crate::repr_c_struct_has_padding!(@field $ts),)*]
350353
);
351354
layout.requires_static_padding() || layout.requires_dynamic_padding()
@@ -379,7 +382,10 @@ macro_rules! repr_c_struct_has_padding {
379382
#[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`.
380383
#[macro_export]
381384
macro_rules! union_padding {
382-
($t:ty, [$($ts:ty),*]) => {{
385+
($t:ty, $align:expr, $packed:expr, [$($ts:ty),*]) => {{
386+
// The `align` and `packed` directives can be ignored here. Regardless
387+
// of if and how they are set, comparing the size of `$t` to each of its
388+
// field sizes is a reliable indicator of the presence of padding.
383389
let mut max = 0;
384390
$({
385391
let padding = $crate::util::macro_util::size_of::<$t>() - $crate::util::macro_util::size_of::<$ts>();
@@ -410,7 +416,13 @@ macro_rules! union_padding {
410416
#[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`.
411417
#[macro_export]
412418
macro_rules! enum_padding {
413-
($t:ty, $disc:ty, $([$($ts:ty),*]),*) => {{
419+
($t:ty, $align:expr, $packed:expr, $disc:ty, $([$($ts:ty),*]),*) => {{
420+
// The `align` and `packed` directives are irrelevant. `$align` can be
421+
// ignored because regardless of if and how it is set, comparing the
422+
// size of `$t` to each of its field sizes is a reliable indicator of
423+
// the presence of padding. `$packed` is irrelevant because it is
424+
// forbidden on enums.
425+
const _: [(); 1] = [(); $packed.is_none() as usize];
414426
let mut max = 0;
415427
$({
416428
let padding = $crate::util::macro_util::size_of::<$t>()
@@ -927,6 +939,8 @@ pub mod core_reexport {
927939

928940
#[cfg(test)]
929941
mod tests {
942+
use core::num::NonZeroUsize;
943+
930944
use crate::util::testutil::*;
931945

932946
#[cfg(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS)]
@@ -1125,7 +1139,7 @@ mod tests {
11251139
#[$cfg]
11261140
#[allow(dead_code)]
11271141
struct Test($($ts),*);
1128-
assert_eq!(struct_padding!(Test, [$($ts),*]), $expect);
1142+
assert_eq!(struct_padding!(Test, None::<NonZeroUsize>, None::<NonZeroUsize>, [$($ts),*]), $expect);
11291143
}};
11301144
(#[$cfg:meta] $(#[$cfgs:meta])* ($($ts:ty),*) => $expect:expr) => {
11311145
test!(#[$cfg] ($($ts),*) => $expect);
@@ -1156,7 +1170,7 @@ mod tests {
11561170
#[repr(C)]
11571171
#[allow(dead_code)]
11581172
struct Test($($ts),*);
1159-
assert_eq!(repr_c_struct_has_padding!(Test, [$($ts),*]), $expect);
1173+
assert_eq!(repr_c_struct_has_padding!(Test, None::<NonZeroUsize>, None::<NonZeroUsize>, [$($ts),*]), $expect);
11601174
}};
11611175
}
11621176

@@ -1192,7 +1206,7 @@ mod tests {
11921206
#[$cfg]
11931207
#[allow(unused)] // fields are never read
11941208
union Test{ $($fs: $ts),* }
1195-
assert_eq!(union_padding!(Test, [$($ts),*]), $expect);
1209+
assert_eq!(union_padding!(Test, None::<NonZeroUsize>, None::<usize>, [$($ts),*]), $expect);
11961210
}};
11971211
(#[$cfg:meta] $(#[$cfgs:meta])* {$($fs:ident: $ts:ty),*} => $expect:expr) => {
11981212
test!(#[$cfg] {$($fs: $ts),*} => $expect);
@@ -1231,7 +1245,7 @@ mod tests {
12311245
$($vs ($($ts),*),)*
12321246
}
12331247
assert_eq!(
1234-
enum_padding!(Test, $disc, $([$($ts),*]),*),
1248+
enum_padding!(Test, None::<NonZeroUsize>, None::<NonZeroUsize>, $disc, $([$($ts),*]),*),
12351249
$expect
12361250
);
12371251
}};

tests/ui/transmute_mut.msrv.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ error[E0599]: the method `transmute_mut` exists for struct `Wrap<&mut [u8], &mut
8282
87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]);
8383
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Wrap<&mut [u8], &mut [u8; 1]>` due to unsatisfied trait bounds
8484
|
85-
::: $WORKSPACE/src/util/macro_util.rs:679:1
85+
::: $WORKSPACE/src/util/macro_util.rs:691:1
8686
|
87-
679 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
87+
691 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
8888
| --------------------------------------------------------- doesn't satisfy `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst`
8989
|
9090
= note: the following trait bounds were not satisfied:

tests/ui/transmute_mut.nightly.stderr

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ help: the trait `FromBytes` is not implemented for `DstA`
4141
(A, B, C, D, E, F, G, H)
4242
and 85 others
4343
note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
44-
--> src/util/macro_util.rs:793:14
44+
--> src/util/macro_util.rs:805:14
4545
|
46-
790 | pub fn transmute_mut(self) -> &'a mut Dst
46+
802 | pub fn transmute_mut(self) -> &'a mut Dst
4747
| ------------- required by a bound in this associated function
4848
...
49-
793 | Dst: FromBytes + IntoBytes,
49+
805 | Dst: FromBytes + IntoBytes,
5050
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
5151
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
5252

@@ -73,12 +73,12 @@ help: the trait `IntoBytes` is not implemented for `DstB`
7373
AtomicIsize
7474
and 74 others
7575
note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
76-
--> src/util/macro_util.rs:793:26
76+
--> src/util/macro_util.rs:805:26
7777
|
78-
790 | pub fn transmute_mut(self) -> &'a mut Dst
78+
802 | pub fn transmute_mut(self) -> &'a mut Dst
7979
| ------------- required by a bound in this associated function
8080
...
81-
793 | Dst: FromBytes + IntoBytes,
81+
805 | Dst: FromBytes + IntoBytes,
8282
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
8383
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
8484

@@ -149,12 +149,12 @@ help: the trait `FromBytes` is not implemented for `SrcC`
149149
(A, B, C, D, E, F, G, H)
150150
and 85 others
151151
note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
152-
--> src/util/macro_util.rs:792:14
152+
--> src/util/macro_util.rs:804:14
153153
|
154-
790 | pub fn transmute_mut(self) -> &'a mut Dst
154+
802 | pub fn transmute_mut(self) -> &'a mut Dst
155155
| ------------- required by a bound in this associated function
156-
791 | where
157-
792 | Src: FromBytes + IntoBytes,
156+
803 | where
157+
804 | Src: FromBytes + IntoBytes,
158158
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
159159
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
160160

@@ -181,12 +181,12 @@ help: the trait `IntoBytes` is not implemented for `SrcD`
181181
AtomicIsize
182182
and 74 others
183183
note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
184-
--> src/util/macro_util.rs:792:26
184+
--> src/util/macro_util.rs:804:26
185185
|
186-
790 | pub fn transmute_mut(self) -> &'a mut Dst
186+
802 | pub fn transmute_mut(self) -> &'a mut Dst
187187
| ------------- required by a bound in this associated function
188-
791 | where
189-
792 | Src: FromBytes + IntoBytes,
188+
803 | where
189+
804 | Src: FromBytes + IntoBytes,
190190
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
191191
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
192192

@@ -196,9 +196,9 @@ error[E0599]: the method `transmute_mut` exists for struct `zerocopy::util::macr
196196
87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]);
197197
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198198
|
199-
::: src/util/macro_util.rs:679:1
199+
::: src/util/macro_util.rs:691:1
200200
|
201-
679 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
201+
691 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
202202
| ------------------------- doesn't satisfy `_: TransmuteMutDst<'_>`
203203
|
204204
= note: the following trait bounds were not satisfied:

tests/ui/transmute_mut.stable.stderr

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ help: the trait `FromBytes` is not implemented for `DstA`
4141
(A, B, C, D, E, F, G, H)
4242
and 85 others
4343
note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
44-
--> $WORKSPACE/src/util/macro_util.rs:793:14
44+
--> $WORKSPACE/src/util/macro_util.rs:805:14
4545
|
46-
790 | pub fn transmute_mut(self) -> &'a mut Dst
46+
802 | pub fn transmute_mut(self) -> &'a mut Dst
4747
| ------------- required by a bound in this associated function
4848
...
49-
793 | Dst: FromBytes + IntoBytes,
49+
805 | Dst: FromBytes + IntoBytes,
5050
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
5151
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
5252

@@ -73,12 +73,12 @@ help: the trait `IntoBytes` is not implemented for `DstB`
7373
AtomicIsize
7474
and 74 others
7575
note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
76-
--> $WORKSPACE/src/util/macro_util.rs:793:26
76+
--> $WORKSPACE/src/util/macro_util.rs:805:26
7777
|
78-
790 | pub fn transmute_mut(self) -> &'a mut Dst
78+
802 | pub fn transmute_mut(self) -> &'a mut Dst
7979
| ------------- required by a bound in this associated function
8080
...
81-
793 | Dst: FromBytes + IntoBytes,
81+
805 | Dst: FromBytes + IntoBytes,
8282
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
8383
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
8484

@@ -149,12 +149,12 @@ help: the trait `FromBytes` is not implemented for `SrcC`
149149
(A, B, C, D, E, F, G, H)
150150
and 85 others
151151
note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
152-
--> $WORKSPACE/src/util/macro_util.rs:792:14
152+
--> $WORKSPACE/src/util/macro_util.rs:804:14
153153
|
154-
790 | pub fn transmute_mut(self) -> &'a mut Dst
154+
802 | pub fn transmute_mut(self) -> &'a mut Dst
155155
| ------------- required by a bound in this associated function
156-
791 | where
157-
792 | Src: FromBytes + IntoBytes,
156+
803 | where
157+
804 | Src: FromBytes + IntoBytes,
158158
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
159159
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
160160

@@ -181,12 +181,12 @@ help: the trait `IntoBytes` is not implemented for `SrcD`
181181
AtomicIsize
182182
and 74 others
183183
note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
184-
--> $WORKSPACE/src/util/macro_util.rs:792:26
184+
--> $WORKSPACE/src/util/macro_util.rs:804:26
185185
|
186-
790 | pub fn transmute_mut(self) -> &'a mut Dst
186+
802 | pub fn transmute_mut(self) -> &'a mut Dst
187187
| ------------- required by a bound in this associated function
188-
791 | where
189-
792 | Src: FromBytes + IntoBytes,
188+
803 | where
189+
804 | Src: FromBytes + IntoBytes,
190190
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
191191
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
192192

@@ -196,9 +196,9 @@ error[E0599]: the method `transmute_mut` exists for struct `Wrap<&mut [u8], &mut
196196
87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]);
197197
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198198
|
199-
::: $WORKSPACE/src/util/macro_util.rs:679:1
199+
::: $WORKSPACE/src/util/macro_util.rs:691:1
200200
|
201-
679 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
201+
691 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
202202
| ------------------------- doesn't satisfy `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst<'_>`
203203
|
204204
= note: the following trait bounds were not satisfied:

tests/ui/transmute_ref.msrv.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1]
188188
84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]);
189189
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Wrap<&[u8], &[u8; 1]>` due to unsatisfied trait bounds
190190
|
191-
::: $WORKSPACE/src/util/macro_util.rs:679:1
191+
::: $WORKSPACE/src/util/macro_util.rs:691:1
192192
|
193-
679 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
193+
691 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
194194
| --------------------------------------------------------- doesn't satisfy `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst`
195195
|
196196
= note: the following trait bounds were not satisfied:

tests/ui/transmute_ref.nightly.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ error[E0599]: the method `transmute_ref` exists for struct `zerocopy::util::macr
342342
84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]);
343343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
344344
|
345-
::: src/util/macro_util.rs:679:1
345+
::: src/util/macro_util.rs:691:1
346346
|
347-
679 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
347+
691 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
348348
| ------------------------- doesn't satisfy `_: TransmuteRefDst<'_>`
349349
|
350350
= note: the following trait bounds were not satisfied:

tests/ui/transmute_ref.stable.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1]
342342
84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]);
343343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
344344
|
345-
::: $WORKSPACE/src/util/macro_util.rs:679:1
345+
::: $WORKSPACE/src/util/macro_util.rs:691:1
346346
|
347-
679 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
347+
691 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
348348
| ------------------------- doesn't satisfy `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst<'_>`
349349
|
350350
= note: the following trait bounds were not satisfied:

tests/ui/try_transmute.msrv.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied
55
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFromBytes` is not implemented for `NotZerocopy`
66
|
77
note: required by a bound in `try_transmute`
8-
--> $WORKSPACE/src/util/macro_util.rs:513:10
8+
--> $WORKSPACE/src/util/macro_util.rs:525:10
99
|
10-
513 | Dst: TryFromBytes,
10+
525 | Dst: TryFromBytes,
1111
| ^^^^^^^^^^^^ required by this bound in `try_transmute`
1212
= note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
1313

@@ -43,9 +43,9 @@ error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `NotZerocopy<AU16>`
4444
|
4545
note: required by a bound in `try_transmute`
46-
--> $WORKSPACE/src/util/macro_util.rs:512:10
46+
--> $WORKSPACE/src/util/macro_util.rs:524:10
4747
|
48-
512 | Src: IntoBytes,
48+
524 | Src: IntoBytes,
4949
| ^^^^^^^^^ required by this bound in `try_transmute`
5050
= note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
5151

tests/ui/try_transmute.nightly.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy`
4949
(A, B, C, D, E, F, G, H)
5050
and 153 others
5151
note: required by a bound in `zerocopy::util::macro_util::try_transmute`
52-
--> src/util/macro_util.rs:513:10
52+
--> src/util/macro_util.rs:525:10
5353
|
54-
510 | pub fn try_transmute<Src, Dst>(src: Src) -> Result<Dst, ValidityError<Src, Dst>>
54+
522 | pub fn try_transmute<Src, Dst>(src: Src) -> Result<Dst, ValidityError<Src, Dst>>
5555
| ------------- required by a bound in this function
5656
...
57-
513 | Dst: TryFromBytes,
57+
525 | Dst: TryFromBytes,
5858
| ^^^^^^^^^^^^ required by this bound in `try_transmute`
5959
= note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
6060

@@ -110,12 +110,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy<AU16>`
110110
AtomicIsize
111111
and 68 others
112112
note: required by a bound in `zerocopy::util::macro_util::try_transmute`
113-
--> src/util/macro_util.rs:512:10
113+
--> src/util/macro_util.rs:524:10
114114
|
115-
510 | pub fn try_transmute<Src, Dst>(src: Src) -> Result<Dst, ValidityError<Src, Dst>>
115+
522 | pub fn try_transmute<Src, Dst>(src: Src) -> Result<Dst, ValidityError<Src, Dst>>
116116
| ------------- required by a bound in this function
117-
511 | where
118-
512 | Src: IntoBytes,
117+
523 | where
118+
524 | Src: IntoBytes,
119119
| ^^^^^^^^^ required by this bound in `try_transmute`
120120
= note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
121121

0 commit comments

Comments
 (0)