Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[derive] Disable prelude when testing; fix bugs #886

Merged
merged 1 commit into from
Feb 16, 2024
Merged
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
4 changes: 2 additions & 2 deletions src/macro_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ macro_rules! align_of {
#[macro_export]
macro_rules! struct_has_padding {
($t:ty, $($ts:ty),*) => {
core::mem::size_of::<$t>() > 0 $(+ core::mem::size_of::<$ts>())*
::zerocopy::macro_util::core_reexport::mem::size_of::<$t>() > 0 $(+ ::zerocopy::macro_util::core_reexport::mem::size_of::<$ts>())*
};
}

Expand All @@ -282,7 +282,7 @@ macro_rules! struct_has_padding {
#[macro_export]
macro_rules! union_has_padding {
($t:ty, $($ts:ty),*) => {
false $(|| core::mem::size_of::<$t>() != core::mem::size_of::<$ts>())*
false $(|| ::zerocopy::macro_util::core_reexport::mem::size_of::<$t>() != ::zerocopy::macro_util::core_reexport::mem::size_of::<$ts>())*
};
}

Expand Down
12 changes: 6 additions & 6 deletions tests/ui-msrv/include_value_not_from_bytes.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0277]: the trait bound `NotZerocopy<u32>: FromBytes` is not satisfied
--> tests/ui-msrv/include_value_not_from_bytes.rs:13:42
error[E0277]: the trait bound `NotZerocopy<u32>: zerocopy::FromBytes` is not satisfied
--> tests/ui-msrv/include_value_not_from_bytes.rs:15:42
|
13 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `NotZerocopy<u32>`
15 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy<u32>`
|
note: required by `AssertIsFromBytes`
--> tests/ui-msrv/include_value_not_from_bytes.rs:13:42
--> tests/ui-msrv/include_value_not_from_bytes.rs:15:42
|
13 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
15 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
12 changes: 6 additions & 6 deletions tests/ui-msrv/transmute-dst-not-frombytes.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0277]: the trait bound `NotZerocopy: FromBytes` is not satisfied
--> tests/ui-msrv/transmute-dst-not-frombytes.rs:18:41
error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfied
--> tests/ui-msrv/transmute-dst-not-frombytes.rs:19:41
|
18 | const DST_NOT_FROM_BYTES: NotZerocopy = transmute!(AU16(0));
| ^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `NotZerocopy`
19 | const DST_NOT_FROM_BYTES: NotZerocopy = transmute!(AU16(0));
| ^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy`
|
note: required by `AssertIsFromBytes`
--> tests/ui-msrv/transmute-dst-not-frombytes.rs:18:41
--> tests/ui-msrv/transmute-dst-not-frombytes.rs:19:41
|
18 | const DST_NOT_FROM_BYTES: NotZerocopy = transmute!(AU16(0));
19 | const DST_NOT_FROM_BYTES: NotZerocopy = transmute!(AU16(0));
| ^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
16 changes: 8 additions & 8 deletions tests/ui-msrv/transmute-mut-alignment-increase.stderr
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:19:39
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:20:39
|
19 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
20 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `AlignOf<[u8; 2]>` (8 bits)
= note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits)
= note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: mutable references are not allowed in constants
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:19:54
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:20:54
|
19 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
20 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
| ^^^^^^^^^^^^^
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information

error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:19:39
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:20:39
|
19 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
20 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0716]: temporary value dropped while borrowed
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:19:59
--> tests/ui-msrv/transmute-mut-alignment-increase.rs:20:59
|
19 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
20 | const INCREASE_ALIGNMENT: &mut AU16 = transmute_mut!(&mut [0u8; 2]);
| --------------------^^^^^^^^-
| | |
| | creates a temporary which is freed while still in use
Expand Down
4 changes: 2 additions & 2 deletions tests/ui-msrv/transmute-ref-alignment-increase.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-msrv/transmute-ref-alignment-increase.rs:19:35
--> tests/ui-msrv/transmute-ref-alignment-increase.rs:20:35
|
19 | const INCREASE_ALIGNMENT: &AU16 = transmute_ref!(&[0u8; 2]);
20 | const INCREASE_ALIGNMENT: &AU16 = transmute_ref!(&[0u8; 2]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `AlignOf<[u8; 2]>` (8 bits)
Expand Down
12 changes: 6 additions & 6 deletions tests/ui-msrv/transmute-ref-dst-not-frombytes.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0277]: the trait bound `Dst: FromBytes` is not satisfied
--> tests/ui-msrv/transmute-ref-dst-not-frombytes.rs:22:34
error[E0277]: the trait bound `Dst: zerocopy::FromBytes` is not satisfied
--> tests/ui-msrv/transmute-ref-dst-not-frombytes.rs:23:34
|
22 | const DST_NOT_FROM_BYTES: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `Dst`
23 | const DST_NOT_FROM_BYTES: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `Dst`
|
note: required by `AssertDstIsFromBytes`
--> tests/ui-msrv/transmute-ref-dst-not-frombytes.rs:22:34
--> tests/ui-msrv/transmute-ref-dst-not-frombytes.rs:23:34
|
22 | const DST_NOT_FROM_BYTES: &Dst = transmute_ref!(&AU16(0));
23 | const DST_NOT_FROM_BYTES: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
12 changes: 6 additions & 6 deletions tests/ui-msrv/transmute-ref-dst-not-nocell.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0277]: the trait bound `Dst: NoCell` is not satisfied
--> tests/ui-msrv/transmute-ref-dst-not-nocell.rs:22:31
error[E0277]: the trait bound `Dst: zerocopy::NoCell` is not satisfied
--> tests/ui-msrv/transmute-ref-dst-not-nocell.rs:23:31
|
22 | const DST_NOT_NO_CELL: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NoCell` is not implemented for `Dst`
23 | const DST_NOT_NO_CELL: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::NoCell` is not implemented for `Dst`
|
note: required by `AssertDstIsNoCell`
--> tests/ui-msrv/transmute-ref-dst-not-nocell.rs:22:31
--> tests/ui-msrv/transmute-ref-dst-not-nocell.rs:23:31
|
22 | const DST_NOT_NO_CELL: &Dst = transmute_ref!(&AU16(0));
23 | const DST_NOT_NO_CELL: &Dst = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
24 changes: 12 additions & 12 deletions tests/ui-msrv/transmute-ref-src-not-intobytes.stderr
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
error[E0277]: the trait bound `Src: IntoBytes` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:22:33
error[E0277]: the trait bound `Src: AsBytes` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:23:33
|
22 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `Src`
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `Src`
|
note: required by `AssertSrcIsIntoBytes`
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:22:33
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:23:33
|
22 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Src: IntoBytes` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:22:33
error[E0277]: the trait bound `Src: AsBytes` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:23:33
|
22 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `Src`
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `Src`
|
note: required by a bound in `AssertSrcIsIntoBytes`
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:22:33
--> tests/ui-msrv/transmute-ref-src-not-intobytes.rs:23:33
|
22 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsIntoBytes`
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
24 changes: 12 additions & 12 deletions tests/ui-msrv/transmute-ref-src-not-nocell.stderr
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
error[E0277]: the trait bound `Src: NoCell` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:22:32
error[E0277]: the trait bound `Src: zerocopy::NoCell` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:23:32
|
22 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `NoCell`
23 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `zerocopy::NoCell`
|
note: required by `AssertSrcIsNoCell`
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:22:32
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:23:32
|
22 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
23 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Src: NoCell` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:22:32
error[E0277]: the trait bound `Src: zerocopy::NoCell` is not satisfied
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:23:32
|
22 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NoCell` is not implemented for `Src`
23 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::NoCell` is not implemented for `Src`
|
note: required by a bound in `AssertSrcIsNoCell`
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:22:32
--> tests/ui-msrv/transmute-ref-src-not-nocell.rs:23:32
|
22 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
23 | const SRC_NOT_NO_CELL: &AU16 = transmute_ref!(&Src(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsNoCell`
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
4 changes: 2 additions & 2 deletions tests/ui-msrv/transmute-size-decrease.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-msrv/transmute-size-decrease.rs:19:27
--> tests/ui-msrv/transmute-size-decrease.rs:20:27
|
19 | const DECREASE_SIZE: u8 = transmute!(AU16(0));
20 | const DECREASE_SIZE: u8 = transmute!(AU16(0));
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: `AU16` (16 bits)
Expand Down
4 changes: 2 additions & 2 deletions tests/ui-msrv/transmute-size-increase.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> tests/ui-msrv/transmute-size-increase.rs:19:29
--> tests/ui-msrv/transmute-size-increase.rs:20:29
|
19 | const INCREASE_SIZE: AU16 = transmute!(0u8);
20 | const INCREASE_SIZE: AU16 = transmute!(0u8);
| ^^^^^^^^^^^^^^^
|
= note: source type: `u8` (8 bits)
Expand Down
16 changes: 8 additions & 8 deletions tests/ui-msrv/transmute-src-not-intobytes.stderr
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
error[E0277]: the trait bound `NotZerocopy<AU16>: AsBytes` is not satisfied
--> tests/ui-msrv/transmute-src-not-intobytes.rs:18:32
--> tests/ui-msrv/transmute-src-not-intobytes.rs:19:32
|
18 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
19 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `NotZerocopy<AU16>`
|
note: required by `AssertIsIntoBytes`
--> tests/ui-msrv/transmute-src-not-intobytes.rs:18:32
--> tests/ui-msrv/transmute-src-not-intobytes.rs:19:32
|
18 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
19 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy<AU16>: AsBytes` is not satisfied
--> tests/ui-msrv/transmute-src-not-intobytes.rs:18:32
--> tests/ui-msrv/transmute-src-not-intobytes.rs:19:32
|
18 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
19 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `NotZerocopy<AU16>`
|
note: required by a bound in `AssertIsIntoBytes`
--> tests/ui-msrv/transmute-src-not-intobytes.rs:18:32
--> tests/ui-msrv/transmute-src-not-intobytes.rs:19:32
|
18 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
19 | const SRC_NOT_AS_BYTES: AU16 = transmute!(NotZerocopy(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsIntoBytes`
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
4 changes: 3 additions & 1 deletion tests/ui-nightly/include_value_not_from_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

include!("../../zerocopy-derive/tests/util.rs");
include!("../../zerocopy-derive/tests/include.rs");

#[macro_use]
extern crate zerocopy;

use util::NotZerocopy;

fn main() {}

// Should fail because `NotZerocopy<u32>: !FromBytes`.
Expand Down
14 changes: 7 additions & 7 deletions tests/ui-nightly/include_value_not_from_bytes.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0277]: the trait bound `NotZerocopy<u32>: FromBytes` is not satisfied
--> tests/ui-nightly/include_value_not_from_bytes.rs:13:42
error[E0277]: the trait bound `NotZerocopy<u32>: zerocopy::FromBytes` is not satisfied
--> tests/ui-nightly/include_value_not_from_bytes.rs:15:42
|
13 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
15 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `FromBytes` is not implemented for `NotZerocopy<u32>`
| the trait `zerocopy::FromBytes` is not implemented for `NotZerocopy<u32>`
| required by a bound introduced by this call
|
= help: the following other types implement trait `FromBytes`:
= help: the following other types implement trait `zerocopy::FromBytes`:
isize
i8
i16
Expand All @@ -18,8 +18,8 @@ error[E0277]: the trait bound `NotZerocopy<u32>: FromBytes` is not satisfied
u8
and $N others
note: required by a bound in `AssertIsFromBytes`
--> tests/ui-nightly/include_value_not_from_bytes.rs:13:42
--> tests/ui-nightly/include_value_not_from_bytes.rs:15:42
|
13 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
15 | const NOT_FROM_BYTES: NotZerocopy<u32> = include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsFromBytes`
= 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)
3 changes: 2 additions & 1 deletion tests/ui-nightly/transmute-dst-not-frombytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
// This file may not be copied, modified, or distributed except according to
// those terms.

include!("../../zerocopy-derive/tests/util.rs");
include!("../../zerocopy-derive/tests/include.rs");

extern crate zerocopy;

use util::{NotZerocopy, AU16};
use zerocopy::transmute;

fn main() {}
Expand Down
Loading
Loading