Skip to content

Declarative Macros 2.0 places macros at root, not at module level (nightly) #54112

New issue

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

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

Already on GitHub? # to your account

Closed
samsieber opened this issue Sep 10, 2018 · 1 comment
Closed
Labels
A-decl-macros-2-0 Area: Declarative macros 2.0 (#39412) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@samsieber
Copy link

I'm assuming that with #35896 (modularization), this is something we'll want to change.

For example, I try

#![feature(decl_macro)]

pub mod module {
  pub macro test_macro() {
    println!("hello world");
  }
}

And the macro ends up at the root of the documentation, even though with the 2018 edition I access it through "use whatever_crate_its_in::module::test_macro".

@petrochenkov petrochenkov added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 10, 2018
@jyn514 jyn514 added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-decl-macros-2-0 Area: Declarative macros 2.0 (#39412) labels Aug 25, 2020
@jyn514
Copy link
Member

jyn514 commented Aug 25, 2020

Closing as duplicate of #74355 - even though this issue is older, that one has more discussion.

@jyn514 jyn514 closed this as completed Aug 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-decl-macros-2-0 Area: Declarative macros 2.0 (#39412) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants