Skip to content

Build failing on latest nightly #1058

@Bathtor

Description

@Bathtor

It looks like the build is failing on rustc 1.71.0-nightly (1a5f8bce7 2023-05-26), because of an issue in the transitive value-bag dependency (via async-io):

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /Users/lkroll/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:43:33
   |
43 |                                   $const_ident => |v| Some(Internal::from(unsafe { &*(*v as *const Self as *const $ty) })),
   |                                   ^^^^^^^^^^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /Users/lkroll/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:46:33
   |
46 |                                   $option_ident => |v| Some({
   |                                   ^^^^^^^^^^^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /Users/lkroll/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:55:29
   |
55 |                               STR => |v| Some(Internal::from(unsafe { &**(v as *const &'a Self as *const &'a str) })),
   |                               ^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `value-bag` (lib) due to 3 previous errors

Funny thing is: I can't reproduce this failure building either async-io or log (which is what pulls in value-bag) directly.
Anyone got any idea what's going on there?

Activity

jbr

jbr commented on May 27, 2023

@jbr
Contributor

Seems likely related to rust-lang/rust#103291, which just merged

Bathtor

Bathtor commented on May 27, 2023

@Bathtor
Author

Yup, but I don't understand why it's not failing when building async-io or log with the same Rust version. Only fails when building async-std and above (with default features so it pulls in async-io as a dependency).

tan-wei

tan-wei commented on May 27, 2023

@tan-wei

Got the same error. Seems caused by upstream.

jbr

jbr commented on May 27, 2023

@jbr
Contributor

You likely need to run cargo update to pick up log v0.4.7

Bathtor

Bathtor commented on May 27, 2023

@Bathtor
Author

Nope, it's already picking that up and the issue is till happening:

$ cargo tree | grep log
│   │   ├── log v0.4.17
│   │   │   └── log v0.4.17 (*)
│   │   └── log v0.4.17 (*)
├── kv-log-macro v1.0.7
│   └── log v0.4.17 (*)
├── log v0.4.17 (*)
│   ├── log v0.4.17 (*)
Taaitaaiger

Taaitaaiger commented on May 27, 2023

@Taaitaaiger

I think it's only fixed in the master branch, log v0.4.17 depends on older version of value-bag: https://github.com/rust-lang/log/blob/7fb28c36c7a418912612ab37ab49bd4ca1a3a7f5/Cargo.toml#L66

jbr

jbr commented on May 28, 2023

@jbr
Contributor

I think it's only fixed in the master branch, log v0.4.17 depends on older version of value-bag: https://github.com/rust-lang/log/blob/7fb28c36c7a418912612ab37ab49bd4ca1a3a7f5/Cargo.toml#L66

Oh true! I thought 0.4.17 was earlier this month but it's a year old and there hasn't been a log release since then. Looks like the kv_unstable feature proved to be especially unstable

Bathtor

Bathtor commented on May 28, 2023

@Bathtor
Author

They released 0.4.18 a couple of hours ago, which fixes the issue.

Bathtor

Bathtor commented on May 28, 2023

@Bathtor
Author

I'm going to close this issue, then. Thanks everyone :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jbr@Bathtor@tan-wei@Taaitaaiger

        Issue actions

          Build failing on latest nightly · Issue #1058 · async-rs/async-std