From e6c2438da2cfb489ea524952bef45b89f3bc7a58 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Fri, 27 Oct 2023 08:41:32 -0700 Subject: [PATCH] [derive][tests] Fix KnownLayout test (#555) Also roll pinned nightly to 2023-10-26. --- Cargo.toml | 2 +- zerocopy-derive/tests/ui-nightly/struct.rs | 2 +- zerocopy-derive/tests/ui-nightly/struct.stderr | 6 ++++++ zerocopy-derive/tests/ui-nightly/union.stderr | 6 ++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2a0fe7fe4b..63048834ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ all-features = true [package.metadata.ci] # The versions of the stable and nightly compiler toolchains to use in CI. pinned-stable = "1.73.0" -pinned-nightly = "nightly-2023-10-25" +pinned-nightly = "nightly-2023-10-26" [features] default = ["byteorder"] diff --git a/zerocopy-derive/tests/ui-nightly/struct.rs b/zerocopy-derive/tests/ui-nightly/struct.rs index 931b1eafc6..5722981b8b 100644 --- a/zerocopy-derive/tests/ui-nightly/struct.rs +++ b/zerocopy-derive/tests/ui-nightly/struct.rs @@ -31,7 +31,7 @@ assert_impl_all!(KnownLayout1: KnownLayout); #[derive(KnownLayout)] struct KnownLayout2(T); -assert_impl_all!(KnownLayout2: KnownLayout); +assert_impl_all!(KnownLayout2<[u8]>: KnownLayout); // // AsBytes errors diff --git a/zerocopy-derive/tests/ui-nightly/struct.stderr b/zerocopy-derive/tests/ui-nightly/struct.stderr index 9604004c98..a7b4091c6b 100644 --- a/zerocopy-derive/tests/ui-nightly/struct.stderr +++ b/zerocopy-derive/tests/ui-nightly/struct.stderr @@ -52,3 +52,9 @@ error[E0277]: the trait bound `HasPadding: ShouldBe` is n = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable = note: this error originates in the derive macro `AsBytes` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0587]: type has conflicting packed and align representation hints + --> tests/ui-nightly/struct.rs:67:1 + | +67 | struct Unaligned3; + | ^^^^^^^^^^^^^^^^^ diff --git a/zerocopy-derive/tests/ui-nightly/union.stderr b/zerocopy-derive/tests/ui-nightly/union.stderr index bf5e477ccf..afc4e8c18d 100644 --- a/zerocopy-derive/tests/ui-nightly/union.stderr +++ b/zerocopy-derive/tests/ui-nightly/union.stderr @@ -40,3 +40,9 @@ error[E0277]: the trait bound `HasPadding: ShouldBe` is n = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable = note: this error originates in the derive macro `AsBytes` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0587]: type has conflicting packed and align representation hints + --> tests/ui-nightly/union.rs:59:1 + | +59 | union Unaligned3 { + | ^^^^^^^^^^^^^^^^