Skip to content

Cannot find macro from subcrate #58914

Closed
Closed
@Dylan-DPC-zz

Description

@Dylan-DPC-zz

Setup:

You have a workspace, with one subcrate. The subcrate contains a macro (which is exported).

The main crate in the workspace uses the subcrate as a dependency, but it cannot resolve the macro by importing it with use (the 2018 edition way)

Here is a PoC: https://github.com/Dylan-DPC/macros-workspace-test

Rust version: 1.33.0 (stable)
Edition: 2018

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyT-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions