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

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

Closed
samsieber opened this issue Sep 10, 2018 · 1 comment
Closed
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-macros-2.0 Area: Declarative macros 2.0 (#39412) 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-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-macros-2.0 Area: Declarative macros 2.0 (#39412) 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