diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a42d21a316..85447435ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,9 +275,16 @@ jobs: # Don't semver check zerocopy-derive; as a proc macro, it doesn't have # an API that cargo-semver-checks can understand. package: zerocopy - feature-group: all-features + # Don't test nightly features. The reason this doesn't work is that + # cargo-semver-checks works relative to the most recently-published + # stable release on crates.io. The pinned nightly toolchain may be + # incompatible with the unstable features on that published release, as + # nightly features may have changed since it was released. Luckily, we + # don't care about the API stability of these features anyway. + feature-group: only-explicit-features + features: __internal_use_only_features_that_work_on_stable rust-toolchain: ${{ env.ZC_TOOLCHAIN }} - if: matrix.crate == 'zerocopy' && matrix.features == '--all-features' && matrix.toolchain == 'nightly' + if: matrix.crate == 'zerocopy' && matrix.features == '--features __internal_use_only_features_that_work_on_stable' && matrix.toolchain == 'nightly' kani: runs-on: ubuntu-latest @@ -286,7 +293,17 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: model-checking/kani-github-action@f838096619a707b0f6b2118cf435eaccfa33e51f # v1.1 with: - args: "--package zerocopy --all-features --output-format=terse --randomize-layout --memory-safety-checks --overflow-checks --undefined-function-checks --unwinding-checks" + # Use `--features __internal_use_only_features_that_work_on_stable` + # because the Kani GitHub Action uses its own pinned nightly + # toolchain. Sometimes, we make changes to our nightly features for + # more recent toolchains, and so our nightly features become + # incompatible with the toolchain that Kani uses. By only testing + # stable features, we ensure that this doesn't cause problems in CI. + # + # TODO(https://github.com/model-checking/kani-github-action/issues/56): + # Go back to testing all features once the Kani GitHub Action supports + # specifying a particular toolchain. + args: "--package zerocopy --features __internal_use_only_features_that_work_on_stable --output-format=terse --randomize-layout --memory-safety-checks --overflow-checks --undefined-function-checks --unwinding-checks" check_fmt: runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 871cf41722..288462f0b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ [package] edition = "2018" name = "zerocopy" -version = "0.8.0-alpha.3" +version = "0.8.0-alpha.4" authors = ["Joshua Liebow-Feeser "] description = "Utilities for zero-copy parsing and serialization" license = "BSD-2-Clause OR Apache-2.0 OR MIT" @@ -38,7 +38,7 @@ zerocopy-aarch64-simd = "1.59.0" [package.metadata.ci] # The versions of the stable and nightly compiler toolchains to use in CI. pinned-stable = "1.75.0" -pinned-nightly = "nightly-2024-02-01" +pinned-nightly = "nightly-2024-02-06" [package.metadata.docs.rs] all-features = true @@ -58,13 +58,13 @@ simd-nightly = ["simd"] __internal_use_only_features_that_work_on_stable = ["alloc", "derive", "simd"] [dependencies] -zerocopy-derive = { version = "=0.8.0-alpha.3", path = "zerocopy-derive", optional = true } +zerocopy-derive = { version = "=0.8.0-alpha.4", path = "zerocopy-derive", optional = true } # The "associated proc macro pattern" ensures that the versions of zerocopy and # zerocopy-derive remain equal, even if the 'derive' feature isn't used. # See: https://github.com/matklad/macro-dep-test [target.'cfg(any())'.dependencies] -zerocopy-derive = { version = "=0.8.0-alpha.3", path = "zerocopy-derive" } +zerocopy-derive = { version = "=0.8.0-alpha.4", path = "zerocopy-derive" } [dev-dependencies] assert_matches = "1.5" @@ -83,6 +83,6 @@ testutil = { path = "testutil" } # CI test failures. trybuild = { version = "=1.0.89", features = ["diff"] } # In tests, unlike in production, zerocopy-derive is not optional -zerocopy-derive = { version = "=0.8.0-alpha.3", path = "zerocopy-derive" } +zerocopy-derive = { version = "=0.8.0-alpha.4", path = "zerocopy-derive" } # TODO(#381) Remove this dependency once we have our own layout gadgets. elain = "0.3.0" diff --git a/src/lib.rs b/src/lib.rs index 43cbc47682..f241f53dee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -219,7 +219,18 @@ clippy::indexing_slicing, ))] #![cfg_attr(not(test), no_std)] -#![cfg_attr(feature = "simd-nightly", feature(stdsimd))] +#![cfg_attr( + all(feature = "simd-nightly", any(target_arch = "x86", target_arch = "x86_64")), + feature(stdarch_x86_avx512) +)] +#![cfg_attr( + all(feature = "simd-nightly", target_arch = "arm"), + feature(stdarch_arm_dsp, stdarch_arm_neon_intrinsics) +)] +#![cfg_attr( + all(feature = "simd-nightly", any(target_arch = "powerpc", target_arch = "powerpc64")), + feature(stdarch_powerpc) +)] #![cfg_attr(doc_cfg, feature(doc_cfg))] #![cfg_attr( __INTERNAL_USE_ONLY_NIGHLTY_FEATURES_IN_TESTS, diff --git a/tests/ui-nightly/transmute-mut-dst-unsized.stderr b/tests/ui-nightly/transmute-mut-dst-unsized.stderr index 3e18c98b52..2b918ca252 100644 --- a/tests/ui-nightly/transmute-mut-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-dst-unsized.stderr @@ -33,11 +33,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `MaxAlignsOf` +note: required by an implicit `Sized` bound in `MaxAlignsOf` --> src/macro_util.rs | | pub union MaxAlignsOf { - | ^ required by this bound in `MaxAlignsOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -47,11 +47,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute` +note: required by an implicit `Sized` bound in `transmute` --> $RUST/core/src/intrinsics.rs | | pub fn transmute(src: Src) -> Dst; - | ^^^ required by this bound in `transmute` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -61,9 +61,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_mut` +note: required by an implicit `Sized` bound in `transmute_mut` --> src/macro_util.rs | | pub unsafe fn transmute_mut<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_mut` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr b/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr index 4eccaaf339..8357a5ce58 100644 --- a/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr @@ -91,11 +91,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -105,11 +105,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `MaxAlignsOf` +note: required by an implicit `Sized` bound in `MaxAlignsOf` --> src/macro_util.rs | | pub union MaxAlignsOf { - | ^ required by this bound in `MaxAlignsOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -119,11 +119,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -144,11 +144,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute` +note: required by an implicit `Sized` bound in `transmute` --> $RUST/core/src/intrinsics.rs | | pub fn transmute(src: Src) -> Dst; - | ^^^ required by this bound in `transmute` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -161,11 +161,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_mut` +note: required by an implicit `Sized` bound in `transmute_mut` --> src/macro_util.rs | | pub unsafe fn transmute_mut<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_mut` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -175,9 +175,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_mut` +note: required by an implicit `Sized` bound in `transmute_mut` --> src/macro_util.rs | | pub unsafe fn transmute_mut<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_mut` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-unsized.stderr b/tests/ui-nightly/transmute-mut-src-unsized.stderr index bc07d97628..56b142666b 100644 --- a/tests/ui-nightly/transmute-mut-src-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-src-unsized.stderr @@ -74,11 +74,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -88,11 +88,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `MaxAlignsOf` +note: required by an implicit `Sized` bound in `MaxAlignsOf` --> src/macro_util.rs | | pub union MaxAlignsOf { - | ^ required by this bound in `MaxAlignsOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -102,11 +102,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -119,9 +119,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_mut` +note: required by an implicit `Sized` bound in `transmute_mut` --> src/macro_util.rs | | pub unsafe fn transmute_mut<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_mut` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-dst-unsized.stderr b/tests/ui-nightly/transmute-ref-dst-unsized.stderr index 359fcdc45d..20a7b97dca 100644 --- a/tests/ui-nightly/transmute-ref-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-dst-unsized.stderr @@ -33,11 +33,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `MaxAlignsOf` +note: required by an implicit `Sized` bound in `MaxAlignsOf` --> src/macro_util.rs | | pub union MaxAlignsOf { - | ^ required by this bound in `MaxAlignsOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -47,11 +47,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute` +note: required by an implicit `Sized` bound in `transmute` --> $RUST/core/src/intrinsics.rs | | pub fn transmute(src: Src) -> Dst; - | ^^^ required by this bound in `transmute` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -61,9 +61,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_ref` +note: required by an implicit `Sized` bound in `transmute_ref` --> src/macro_util.rs | | pub const unsafe fn transmute_ref<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_ref` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_ref` = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr b/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr index 62ff449361..04c3fa1be5 100644 --- a/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr @@ -91,11 +91,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -105,11 +105,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `MaxAlignsOf` +note: required by an implicit `Sized` bound in `MaxAlignsOf` --> src/macro_util.rs | | pub union MaxAlignsOf { - | ^ required by this bound in `MaxAlignsOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -119,11 +119,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -144,11 +144,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute` +note: required by an implicit `Sized` bound in `transmute` --> $RUST/core/src/intrinsics.rs | | pub fn transmute(src: Src) -> Dst; - | ^^^ required by this bound in `transmute` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -161,11 +161,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_ref` +note: required by an implicit `Sized` bound in `transmute_ref` --> src/macro_util.rs | | pub const unsafe fn transmute_ref<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_ref` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_ref` = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -175,9 +175,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_ref` +note: required by an implicit `Sized` bound in `transmute_ref` --> src/macro_util.rs | | pub const unsafe fn transmute_ref<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_ref` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_ref` = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-unsized.stderr b/tests/ui-nightly/transmute-ref-src-unsized.stderr index 67a9ee1c51..f22ab59549 100644 --- a/tests/ui-nightly/transmute-ref-src-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-src-unsized.stderr @@ -74,11 +74,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -88,11 +88,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `MaxAlignsOf` +note: required by an implicit `Sized` bound in `MaxAlignsOf` --> src/macro_util.rs | | pub union MaxAlignsOf { - | ^ required by this bound in `MaxAlignsOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -102,11 +102,11 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `AlignOf` +note: required by an implicit `Sized` bound in `AlignOf` --> src/macro_util.rs | | pub struct AlignOf { - | ^ required by this bound in `AlignOf` + | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -119,9 +119,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[u8]` -note: required by a bound in `transmute_ref` +note: required by an implicit `Sized` bound in `transmute_ref` --> src/macro_util.rs | | pub const unsafe fn transmute_ref<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>( - | ^^^ required by this bound in `transmute_ref` + | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute_ref` = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/zerocopy-derive/Cargo.toml b/zerocopy-derive/Cargo.toml index db5828bcdd..c6d4ab0c63 100644 --- a/zerocopy-derive/Cargo.toml +++ b/zerocopy-derive/Cargo.toml @@ -9,7 +9,7 @@ [package] edition = "2018" name = "zerocopy-derive" -version = "0.8.0-alpha.3" +version = "0.8.0-alpha.4" authors = ["Joshua Liebow-Feeser "] description = "Custom derive for traits from the zerocopy crate" license = "BSD-2-Clause OR Apache-2.0 OR MIT"