-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Rustdoc doesn't see trait implementations inside of functions #41480
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It's possible to define trait implementations inside of functions in Rust. This is useful not too often, but particularly nice if you have a macro that both defines trait implementation and calls some initialization for a given type.
Anyway, the following code is valid in Rust itself:
But Rustdoc doesn't generate documentation for a given trait, despite it being visible to Rust itself, and being immediately available and unique across entire crate.
I can move
implout of the function and then it gets seen by Rustdoc, but this is rather inconvenient whenimplis generated as part of a bigger macro.