google / google/zerocopy

`IntoBytes` union cfg gate causing breakage

Open
#2,755 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2.6k
Forks
179
Avg merge
1d 19h
Merged PRs (30d)
29

Description

> Aside: I get the following warning when compiling now. I don't see the same behavior when running my regular build on stable rust, but do see it on nightly, which use for miri tests.
>
> ```
> warning: unexpected `cfg` condition name: `zerocopy_derive_union_into_bytes`
> --> valhalla-graphtile/src/graph_tile/directed_edge.rs:202:21
> |
> 202 | #[derive(FromBytes, IntoBytes, Immutable, Unaligned, Copy, Clone)]
> | ^^^^^^^^^
> |
> = help: expected names are: `docsrs`, `feature`, and `test` and 31 more
> = 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)
> ```

_Originally posted by @ianthetechie in https://github.com/google/zerocopy/discussions/1802#discussioncomment-14725146_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.