Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ zerocopy-panic-in-const-and-vec-try-reserve-1-57-0 = "1.57.0"

[package.metadata.ci]
# The versions of the stable and nightly compiler toolchains to use in CI.
pinned-stable = "1.90.0"
pinned-stable = "1.91.0"
pinned-nightly = "nightly-2025-10-17"

[package.metadata.docs.rs]
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/diagnostic-not-implemented-from-bytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie
--> tests/ui-stable/diagnostic-not-implemented-from-bytes.rs:18:24
|
18 | takes_from_bytes::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(FromBytes)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::FromBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/diagnostic-not-implemented-from-zeros.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied
--> tests/ui-stable/diagnostic-not-implemented-from-zeros.rs:18:24
|
18 | takes_from_zeros::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `FromZeros` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `FromZeros` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(FromZeros)]` to `NotZerocopy`
= help: the following other types implement trait `FromZeros`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/diagnostic-not-implemented-immutable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfie
--> tests/ui-stable/diagnostic-not-implemented-immutable.rs:18:23
|
18 | takes_immutable::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::Immutable` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(Immutable)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::Immutable`:
&T
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/diagnostic-not-implemented-into-bytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie
--> tests/ui-stable/diagnostic-not-implemented-into-bytes.rs:18:24
|
18 | takes_into_bytes::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::IntoBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/diagnostic-not-implemented-issue-1296.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie
--> tests/ui-stable/diagnostic-not-implemented-issue-1296.rs:52:19
|
52 | Foo.write_obj(NotZerocopy(()));
| --------- ^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
| --------- ^^^^^^^^^^^^^^^ unsatisfied trait bound
| |
| required by a bound introduced by this call
|
help: the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::IntoBytes`:
()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::KnownLayout` is not satisf
--> tests/ui-stable/diagnostic-not-implemented-known-layout.rs:18:26
|
18 | takes_known_layout::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `zerocopy::KnownLayout` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::KnownLayout` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(KnownLayout)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::KnownLayout`:
&T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::TryFromBytes` is not satis
--> tests/ui-stable/diagnostic-not-implemented-try-from-bytes.rs:18:28
|
18 | takes_try_from_bytes::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `zerocopy::TryFromBytes` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::TryFromBytes` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::TryFromBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/diagnostic-not-implemented-unaligned.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::Unaligned` is not satisfie
--> tests/ui-stable/diagnostic-not-implemented-unaligned.rs:18:23
|
18 | takes_unaligned::<NotZerocopy>();
| ^^^^^^^^^^^ the trait `zerocopy::Unaligned` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::Unaligned` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(Unaligned)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::Unaligned`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/include_value_not_from_bytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy<u32>: zerocopy::FromBytes` is not sat
--> tests/ui-stable/include_value_not_from_bytes.rs:19:42
|
19 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy<u32>`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(FromBytes)]` to `NotZerocopy<u32>`
= help: the following other types implement trait `zerocopy::FromBytes`:
()
Expand Down
8 changes: 8 additions & 0 deletions tests/ui-stable/include_value_wrong_size.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
error[E0080]: transmuting from 4-byte type to 8-byte type: `[u8; 4]` -> `u64`
--> tests/ui-stable/include_value_wrong_size.rs:15:25
|
15 | const WRONG_SIZE: u64 = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `WRONG_SIZE` failed here
|
= note: this error originates in the macro `$crate::transmute` which comes from the expansion of the macro `include_value` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-stable/include_value_wrong_size.rs:15:25
|
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-dst-not-frombytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie
--> tests/ui-stable/transmute-dst-not-frombytes.rs:19:41
|
19 | const DST_NOT_FROM_BYTES: NotZerocopy = transmute!(AU16(0));
| ^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy`
| ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(FromBytes)]` to `NotZerocopy`
= help: the following other types implement trait `zerocopy::FromBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-mut-dst-not-frombytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `Dst: FromBytes` is not satisfied
--> tests/ui-stable/transmute-mut-dst-not-frombytes.rs:24:38
|
24 | const DST_NOT_FROM_BYTES: &mut Dst = transmute_mut!(&mut Src);
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `Dst`
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `FromBytes` is not implemented for `Dst`
--> tests/ui-stable/transmute-mut-dst-not-frombytes.rs:21:1
|
21 | struct Dst;
| ^^^^^^^^^^
= note: Consider adding `#[derive(FromBytes)]` to `Dst`
= help: the following other types implement trait `FromBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-mut-dst-not-intobytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `Dst: IntoBytes` is not satisfied
--> tests/ui-stable/transmute-mut-dst-not-intobytes.rs:24:36
|
24 | const DST_NOT_AS_BYTES: &mut Dst = transmute_mut!(&mut Src);
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `Dst`
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `IntoBytes` is not implemented for `Dst`
--> tests/ui-stable/transmute-mut-dst-not-intobytes.rs:21:1
|
21 | struct Dst;
| ^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `Dst`
= help: the following other types implement trait `IntoBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-mut-src-not-frombytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied
--> tests/ui-stable/transmute-mut-src-not-frombytes.rs:24:38
|
24 | const SRC_NOT_FROM_BYTES: &mut Dst = transmute_mut!(&mut Src);
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `Src`
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `FromBytes` is not implemented for `Src`
--> tests/ui-stable/transmute-mut-src-not-frombytes.rs:17:1
|
17 | struct Src;
| ^^^^^^^^^^
= note: Consider adding `#[derive(FromBytes)]` to `Src`
= help: the following other types implement trait `FromBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-mut-src-not-intobytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied
--> tests/ui-stable/transmute-mut-src-not-intobytes.rs:24:36
|
24 | const SRC_NOT_AS_BYTES: &mut Dst = transmute_mut!(&mut Src);
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `Src`
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `IntoBytes` is not implemented for `Src`
--> tests/ui-stable/transmute-mut-src-not-intobytes.rs:17:1
|
17 | struct Src;
| ^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `Src`
= help: the following other types implement trait `IntoBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-ref-dst-not-frombytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ error[E0277]: the trait bound `Dst: zerocopy::FromBytes` is not satisfied
23 | const DST_NOT_FROM_BYTES: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `zerocopy::FromBytes` is not implemented for `Dst`
| unsatisfied trait bound
| required by a bound introduced by this call
|
help: the trait `zerocopy::FromBytes` is not implemented for `Dst`
--> tests/ui-stable/transmute-ref-dst-not-frombytes.rs:20:1
|
20 | struct Dst(AU16);
| ^^^^^^^^^^
= note: Consider adding `#[derive(FromBytes)]` to `Dst`
= help: the following other types implement trait `zerocopy::FromBytes`:
()
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-ref-dst-not-nocell.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ error[E0277]: the trait bound `Dst: zerocopy::Immutable` is not satisfied
23 | const DST_NOT_IMMUTABLE: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `zerocopy::Immutable` is not implemented for `Dst`
| unsatisfied trait bound
| required by a bound introduced by this call
|
help: the trait `zerocopy::Immutable` is not implemented for `Dst`
--> tests/ui-stable/transmute-ref-dst-not-nocell.rs:20:1
|
20 | struct Dst(AU16);
| ^^^^^^^^^^
= note: Consider adding `#[derive(Immutable)]` to `Dst`
= help: the following other types implement trait `zerocopy::Immutable`:
&T
Expand Down
14 changes: 12 additions & 2 deletions tests/ui-stable/transmute-ref-src-not-intobytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `zerocopy::IntoBytes` is not implemented for `Src`
| unsatisfied trait bound
| required by a bound introduced by this call
|
help: the trait `zerocopy::IntoBytes` is not implemented for `Src`
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:20:1
|
20 | struct Src(AU16);
| ^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `Src`
= help: the following other types implement trait `zerocopy::IntoBytes`:
()
Expand All @@ -29,8 +34,13 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33
|
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `Src`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::IntoBytes` is not implemented for `Src`
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:20:1
|
20 | struct Src(AU16);
| ^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `Src`
= help: the following other types implement trait `zerocopy::IntoBytes`:
()
Expand Down
14 changes: 12 additions & 2 deletions tests/ui-stable/transmute-ref-src-not-nocell.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ error[E0277]: the trait bound `Src: zerocopy::Immutable` is not satisfied
23 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `zerocopy::Immutable` is not implemented for `Src`
| unsatisfied trait bound
| required by a bound introduced by this call
|
help: the trait `zerocopy::Immutable` is not implemented for `Src`
--> tests/ui-stable/transmute-ref-src-not-nocell.rs:20:1
|
20 | struct Src(AU16);
| ^^^^^^^^^^
= note: Consider adding `#[derive(Immutable)]` to `Src`
= help: the following other types implement trait `zerocopy::Immutable`:
&T
Expand All @@ -29,8 +34,13 @@ error[E0277]: the trait bound `Src: zerocopy::Immutable` is not satisfied
--> tests/ui-stable/transmute-ref-src-not-nocell.rs:23:34
|
23 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `Src`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::Immutable` is not implemented for `Src`
--> tests/ui-stable/transmute-ref-src-not-nocell.rs:20:1
|
20 | struct Src(AU16);
| ^^^^^^^^^^
= note: Consider adding `#[derive(Immutable)]` to `Src`
= help: the following other types implement trait `zerocopy::Immutable`:
&T
Expand Down
8 changes: 8 additions & 0 deletions tests/ui-stable/transmute-size-decrease.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
error[E0080]: transmuting from 2-byte type to 1-byte type: `AU16` -> `u8`
--> tests/ui-stable/transmute-size-decrease.rs:20:27
|
20 | const DECREASE_SIZE: u8 = transmute!(AU16(0));
| ^^^^^^^^^^^^^^^^^^^ evaluation of `DECREASE_SIZE` failed here
|
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-stable/transmute-size-decrease.rs:20:27
|
Expand Down
8 changes: 8 additions & 0 deletions tests/ui-stable/transmute-size-increase-allow-shrink.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
error[E0080]: transmuting from 1-byte type to 2-byte type: `u8` -> `Transmute<u8, AU16>`
--> tests/ui-stable/transmute-size-increase-allow-shrink.rs:20:29
|
20 | const INCREASE_SIZE: AU16 = transmute!(#![allow(shrink)] 0u8);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `INCREASE_SIZE` failed here
|
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-stable/transmute-size-increase-allow-shrink.rs:20:29
|
Expand Down
8 changes: 8 additions & 0 deletions tests/ui-stable/transmute-size-increase.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
error[E0080]: transmuting from 1-byte type to 2-byte type: `u8` -> `AU16`
--> tests/ui-stable/transmute-size-increase.rs:20:29
|
20 | const INCREASE_SIZE: AU16 = transmute!(0u8);
| ^^^^^^^^^^^^^^^ evaluation of `INCREASE_SIZE` failed here
|
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-stable/transmute-size-increase.rs:20:29
|
Expand Down
7 changes: 6 additions & 1 deletion tests/ui-stable/transmute-src-not-intobytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ error[E0277]: the trait bound `NotZerocopy<AU16>: zerocopy::IntoBytes` is not sa
19 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy<AU16>`
| unsatisfied trait bound
| required by a bound introduced by this call
|
help: the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy<AU16>`
--> tests/ui-stable/../../zerocopy-derive/tests/include.rs
|
| pub struct NotZerocopy<T = ()>(pub T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy<AU16>`
= help: the following other types implement trait `zerocopy::IntoBytes`:
()
Expand Down
Loading
Loading