Skip to content

Can't use re-exported Key derive macro #43

@TheDan64

Description

@TheDan64

Not sure if this is an issue with rustc/cargo or if there's a way for fixed_map to solve it, but I'm writing a library that uses a fixed map as input. So I want to re-export the Key derive macro for users of my library to use on their own types:

pub use fixed_map::Key;

This works fine and compiles in the library, however, when trying to use the Key derive type in a crate using my library:

63 | #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Key)]
   |                                                                    ^^^ could not find `fixed_map` in the list of imported crates
51 | #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Key)]
   |                                                                    ^^^ not found in `fixed_map::map`

From the sound of it, the error is because the crate using my library doesn't directly use fixed_map as one of it's dependencies? But it seems kinda unfortunate that to use my lib, they also have to explicitly add fixed_map as a dep...

Any ideas if it's possible to get this to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions