Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling using latest rust version #26

Closed
rickbeeloo opened this issue May 27, 2023 · 2 comments
Closed

Error compiling using latest rust version #26

rickbeeloo opened this issue May 27, 2023 · 2 comments

Comments

@rickbeeloo
Copy link

When compiling using the latest nightly build:

   Compiling ggcat_querier v0.1.1 (../ggcat/crates/querier)
error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
   --> crates/assembler_minimizer_bucketing/src/lib.rs:212:1
    |
212 | / #[dynamic_dispatch(H = [
213 | |     hashes::cn_nthash::CanonicalNtHashIteratorFactory,
214 | |     #[cfg(not(feature = "devel-build"))] hashes::fw_nthash::ForwardNtHashIteratorFactory
215 | | ], CX = [
216 | |     #[cfg(not(feature = "devel-build"))] colors::bundles::multifile_building::ColorBundleMultifileBuilding,
217 | |     colors::non_colored::NonColoredManager,
218 | | ])]
    | |___^
    |
    = 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 attribute macro `dynamic_dispatch` (in Nightly builds, run with -Z macro-backtrace for more info)

Also with older nighly builds it raises an error (2022-12-01, 2023-03-01, 2023-04-01), namely the following:

   Compiling ggcat_structs v0.1.0 (../tools/ggcat/ggcat/crates/structs)
error[E0635]: unknown feature `impl_trait_in_assoc_type`
 --> crates/hashes/src/lib.rs:3:12
  |
3 | #![feature(impl_trait_in_assoc_type)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^

Any way to solve this, or does a specific rust version allow it to compile successfully?

Thanks :)

@Indy2222
Copy link

I think this is related to rust-lang/rust#103291

@Guilucand
Copy link
Collaborator

Hi, I fixed the problem by changing the TypeId match with a series of ifs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants