Skip to content

Fix missing_doc lint #14413

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sfackler
Copy link
Member

Some items including traits are exported even when they aren't public,
so the missing_doc lint used to warn for private traits.

Closes #11592

Some items including traits are exported even when they aren't public,
so the missing_doc lint used to warn for private traits.

Closes rust-lang#11592
@alexcrichton
Copy link
Member

For traits, this was intentionally done for cases such as:

trait Foo {}
pub fn foo<T: Foo>() {}

Does this modification allow Foo to go without documentation?

@sfackler
Copy link
Member Author

It does. It seems to me that rustdoc and the VisiblePrivateType lint should be updated to use PublicItems instead of ExportedItems as well.

@huonw
Copy link
Member

huonw commented May 25, 2014

(Travis failed.)

@sfackler sfackler closed this Jun 2, 2014
@sfackler sfackler deleted the fix-missing-doc branch November 26, 2016 05:54
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 15, 2025
…4453)

fixes rust-lang#14413
add allow_unused config to missing_docs_in_private_items for underscored
field

changelog: [`missing_docs_in_private_items`]: add allow_unused config to
missing_docs_in_private_items for underscored field

Explaination (quoted from the issue's author): When writing structures
that must adhere to a specific format (such as memory mapped I/O
structures) there are inevitably fields that are "reserved" by
specifications and thus need no documentation. In cases where private
docs are preferred but reserved fields need no explanation, having to
#[allow/expect] this lint removes the ability to check for otherwise
used fields' documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing_doc lint expects docs on private traits
3 participants