diff --git a/Cargo.toml b/Cargo.toml index 34cd3f0c25..539c3c6abe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ zerocopy-diagnostic-on-unimplemented = "1.78.0" [package.metadata.ci] # The versions of the stable and nightly compiler toolchains to use in CI. pinned-stable = "1.83.0" -pinned-nightly = "nightly-2024-11-06" +pinned-nightly = "nightly-2024-12-31" [package.metadata.docs.rs] all-features = true diff --git a/tests/ui-nightly/invalid-impls/invalid-impls.stderr b/tests/ui-nightly/invalid-impls/invalid-impls.stderr index f3a11a0e2d..5c2147643f 100644 --- a/tests/ui-nightly/invalid-impls/invalid-impls.stderr +++ b/tests/ui-nightly/invalid-impls/invalid-impls.stderr @@ -21,7 +21,7 @@ note: required by a bound in `_::Subtrait` 26 | impl_or_verify!(T => TryFromBytes for Foo); | --------------------------------------------- in this macro invocation = note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider restricting type parameter `T` +help: consider restricting type parameter `T` with trait `TryFromBytes` | 26 | impl_or_verify!(T: zerocopy::TryFromBytes => TryFromBytes for Foo); | ++++++++++++++++++++++++ @@ -49,7 +49,7 @@ note: required by a bound in `_::Subtrait` 27 | impl_or_verify!(T => FromZeros for Foo); | ------------------------------------------ in this macro invocation = note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider restricting type parameter `T` +help: consider restricting type parameter `T` with trait `FromZeros` | 27 | impl_or_verify!(T: zerocopy::FromZeros => FromZeros for Foo); | +++++++++++++++++++++ @@ -77,7 +77,7 @@ note: required by a bound in `_::Subtrait` 28 | impl_or_verify!(T => FromBytes for Foo); | ------------------------------------------ in this macro invocation = note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider restricting type parameter `T` +help: consider restricting type parameter `T` with trait `FromBytes` | 28 | impl_or_verify!(T: zerocopy::FromBytes => FromBytes for Foo); | +++++++++++++++++++++ @@ -105,7 +105,7 @@ note: required by a bound in `_::Subtrait` 29 | impl_or_verify!(T => IntoBytes for Foo); | ------------------------------------------ in this macro invocation = note: this error originates in the derive macro `IntoBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider restricting type parameter `T` +help: consider restricting type parameter `T` with trait `IntoBytes` | 29 | impl_or_verify!(T: zerocopy::IntoBytes => IntoBytes for Foo); | +++++++++++++++++++++ @@ -133,7 +133,7 @@ note: required by a bound in `_::Subtrait` 30 | impl_or_verify!(T => Unaligned for Foo); | ------------------------------------------ in this macro invocation = note: this error originates in the derive macro `Unaligned` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider restricting type parameter `T` +help: consider restricting type parameter `T` with trait `Unaligned` | 30 | impl_or_verify!(T: zerocopy::Unaligned => Unaligned for Foo); | +++++++++++++++++++++ diff --git a/tests/ui-nightly/transmute-mut-const.stderr b/tests/ui-nightly/transmute-mut-const.stderr index d9c8c2017b..5d9ecd87fd 100644 --- a/tests/ui-nightly/transmute-mut-const.stderr +++ b/tests/ui-nightly/transmute-mut-const.stderr @@ -13,7 +13,7 @@ note: `const` item defined here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(const_item_mutation)]` on by default -error[E0015]: cannot call non-const fn `transmute_mut::<'_, '_, [u8; 2], [u8; 2]>` in constants +error[E0015]: cannot call non-const function `transmute_mut::<'_, '_, [u8; 2], [u8; 2]>` in constants --> tests/ui-nightly/transmute-mut-const.rs:20:37 | 20 | const CONST_CONTEXT: &mut [u8; 2] = transmute_mut!(&mut ARRAY_OF_U8S); diff --git a/tests/ui-nightly/transmute-mut-dst-unsized.stderr b/tests/ui-nightly/transmute-mut-dst-unsized.stderr index 615be547eb..c995cb541c 100644 --- a/tests/ui-nightly/transmute-mut-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-dst-unsized.stderr @@ -48,7 +48,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` note: required by an implicit `Sized` bound in `std::intrinsics::transmute` - --> $RUST/core/src/intrinsics.rs + --> $RUST/core/src/intrinsics/mod.rs | | pub const unsafe fn transmute(_src: Src) -> Dst { | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` diff --git a/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr b/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr index b66985f93e..d6e5d43349 100644 --- a/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr +++ b/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr @@ -20,8 +20,8 @@ warning: this function depends on never type fallback being `()` 17 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the types explicitly note: in edition 2024, the requirement `!: FromBytes` will fail --> tests/ui-nightly/transmute-mut-src-dst-not-references.rs:17:44 @@ -42,8 +42,8 @@ warning: never type fallback affects this call to an `unsafe` function 17 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default = note: this warning 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) diff --git a/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr b/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr index 9a17cf51c8..c1b386e649 100644 --- a/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr @@ -145,7 +145,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` note: required by an implicit `Sized` bound in `std::intrinsics::transmute` - --> $RUST/core/src/intrinsics.rs + --> $RUST/core/src/intrinsics/mod.rs | | pub const unsafe fn transmute(_src: Src) -> Dst { | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` diff --git a/tests/ui-nightly/transmute-mut-src-immutable.stderr b/tests/ui-nightly/transmute-mut-src-immutable.stderr index 7f60c95c0e..8f83289ac9 100644 --- a/tests/ui-nightly/transmute-mut-src-immutable.stderr +++ b/tests/ui-nightly/transmute-mut-src-immutable.stderr @@ -16,8 +16,8 @@ warning: this function depends on never type fallback being `()` 15 | fn ref_src_immutable() { | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the types explicitly note: in edition 2024, the requirement `!: FromBytes` will fail --> tests/ui-nightly/transmute-mut-src-immutable.rs:17:22 @@ -38,8 +38,8 @@ warning: never type fallback affects this call to an `unsafe` function 17 | let _: &mut u8 = transmute_mut!(&0u8); | ^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default = note: this warning 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) diff --git a/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr b/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr index 491983e408..269d6e5ff2 100644 --- a/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr +++ b/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr @@ -20,8 +20,8 @@ warning: this function depends on never type fallback being `()` 17 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the types explicitly note: in edition 2024, the requirement `!: FromBytes` will fail --> tests/ui-nightly/transmute-mut-src-not-a-reference.rs:17:38 @@ -42,8 +42,8 @@ warning: never type fallback affects this call to an `unsafe` function 17 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default = note: this warning 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) diff --git a/tests/ui-nightly/transmute-ref-dst-unsized.stderr b/tests/ui-nightly/transmute-ref-dst-unsized.stderr index 34a9fff9ed..e61fbbc5ee 100644 --- a/tests/ui-nightly/transmute-ref-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-dst-unsized.stderr @@ -48,7 +48,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` note: required by an implicit `Sized` bound in `std::intrinsics::transmute` - --> $RUST/core/src/intrinsics.rs + --> $RUST/core/src/intrinsics/mod.rs | | pub const unsafe fn transmute(_src: Src) -> Dst { | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` diff --git a/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr b/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr index adb3a17d39..4dfd558a05 100644 --- a/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr +++ b/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr @@ -83,8 +83,8 @@ warning: this function depends on never type fallback being `()` 17 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the types explicitly note: in edition 2024, the requirement `!: IntoBytes` will fail --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39 @@ -105,8 +105,8 @@ warning: never type fallback affects this call to an `unsafe` function 17 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default = note: this warning 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) @@ -117,7 +117,7 @@ warning: never type fallback affects this call to an `unsafe` function 17 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: this warning 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 5cdec56f25..bd1a1bcc5c 100644 --- a/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr @@ -145,7 +145,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` note: required by an implicit `Sized` bound in `std::intrinsics::transmute` - --> $RUST/core/src/intrinsics.rs + --> $RUST/core/src/intrinsics/mod.rs | | pub const unsafe fn transmute(_src: Src) -> Dst { | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` diff --git a/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr b/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr index 866f695ee4..d9e94ef668 100644 --- a/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr +++ b/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr @@ -20,8 +20,8 @@ warning: this function depends on never type fallback being `()` 17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the types explicitly note: in edition 2024, the requirement `!: IntoBytes` will fail --> tests/ui-nightly/transmute-ref-src-not-a-reference.rs:17:34 @@ -42,8 +42,8 @@ warning: never type fallback affects this call to an `unsafe` function 17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default = note: this warning 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) @@ -54,7 +54,7 @@ warning: never type fallback affects this call to an `unsafe` function 17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); | ^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! - = note: for more information, see issue #123748 + = warning: this changes meaning in Rust 2024 and in a future release in all editions! + = note: for more information, see = help: specify the type explicitly = note: this warning originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr b/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr index c80f1beee7..07b8eb6897 100644 --- a/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr +++ b/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr @@ -13,7 +13,7 @@ note: required for `KL13` to implement `KnownLayout` 55 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider restricting type parameter `T` +help: consider restricting type parameter `T` with trait `KnownLayout` | 59 | fn test_kl13(t: T) -> impl KnownLayout { | +++++++++++++++++++++++ @@ -102,7 +102,7 @@ note: required by a bound in `assert_kl` 23 | fn assert_kl(_: &T) {} | ^^^^^^^^^^^ required by this bound in `assert_kl` = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider further restricting this bound +help: consider further restricting type parameter `T` with trait `KnownLayout` | 49 | fn test_kl12(kl: &KL12) { | +++++++++++++++++++++++ diff --git a/zerocopy-derive/tests/ui-nightly/union.stderr b/zerocopy-derive/tests/ui-nightly/union.stderr index a88c311b73..adb511a2cf 100644 --- a/zerocopy-derive/tests/ui-nightly/union.stderr +++ b/zerocopy-derive/tests/ui-nightly/union.stderr @@ -62,6 +62,20 @@ error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute | = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) +warning: unexpected `cfg` condition name: `zerocopy_derive_union_into_bytes` + --> tests/ui-nightly/union.rs:39:10 + | +39 | #[derive(IntoBytes)] + | ^^^^^^^^^ + | + = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` + = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate + = help: try referring to `IntoBytes` crate for guidance on how handle this unexpected cfg + = help: the derive macro `IntoBytes` may come from an old version of the `zerocopy_derive` crate, try updating your dependency with `cargo update -p zerocopy_derive` + = note: see for more information about checking conditional configuration + = note: `#[warn(unexpected_cfgs)]` on by default + = note: this warning originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) + error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied --> tests/ui-nightly/union.rs:24:10 | diff --git a/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.stderr b/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.stderr index d687c22a88..e3010119d0 100644 --- a/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.stderr +++ b/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.stderr @@ -6,3 +6,17 @@ error: requires --cfg zerocopy_derive_union_into_bytes; | ^^^^^^^^^ | = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) + +warning: unexpected `cfg` condition name: `zerocopy_derive_union_into_bytes` + --> tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.rs:20:10 + | +20 | #[derive(IntoBytes)] + | ^^^^^^^^^ + | + = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` + = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate + = help: try referring to `IntoBytes` crate for guidance on how handle this unexpected cfg + = help: the derive macro `IntoBytes` may come from an old version of the `zerocopy_derive` crate, try updating your dependency with `cargo update -p zerocopy_derive` + = note: see for more information about checking conditional configuration + = note: `#[warn(unexpected_cfgs)]` on by default + = note: this warning originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)