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

rustdoc: Re-exported macro is not inlined #90068

Closed
camelid opened this issue Oct 19, 2021 · 4 comments
Closed

rustdoc: Re-exported macro is not inlined #90068

camelid opened this issue Oct 19, 2021 · 4 comments
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-discussion Category: Discussion or questions that doesn't represent real issues. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Oct 19, 2021

It looks like in both versions there's also a bug where repro2 is not shown.

Originally posted by @camelid in #89852 (comment)

@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 20, 2021
@GuillaumeGomez
Copy link
Member

It is shown:

Screenshot from 2021-10-21 13-37-32

It doesn't have its own page and isn't included in the search index though. Should we fix both of them or keep it as is?

@camelid
Copy link
Member Author

camelid commented Oct 21, 2021

It doesn't have its own page and isn't included in the search index though. Should we fix both of them or keep it as is?

Ah, I see. Yeah, I do think macro re-exports should behave like other re-exports. Why isn't doc inlining happening here?

@jyn514 jyn514 changed the title rustdoc: Re-exported macro is not shown in docs rustdoc: Re-exported macro is not inlined Nov 30, 2021
@jyn514 jyn514 added the A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) label Nov 30, 2021
@jyn514
Copy link
Member

jyn514 commented Nov 30, 2021

@camelid they do behave like other re-exports:
image
Inlining doesn't happen because they're defined in the same crate; by default items are only inlined if the definition is private or in another crate.

I'm not sure what the bug here is?

@jyn514 jyn514 added the C-discussion Category: Discussion or questions that doesn't represent real issues. label Nov 30, 2021
@camelid
Copy link
Member Author

camelid commented Nov 30, 2021

Hmm, perhaps I forgot that inlining doesn't happen unconditionally.

@camelid camelid closed this as completed Nov 30, 2021
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, ..) C-discussion Category: Discussion or questions that doesn't represent real issues. 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