Skip to content

tool macro generates fn with missing docs #438

@RobJellinghaus

Description

@RobJellinghaus

Describe the bug
Our project uses #[deny(missing_docs)] to enforce documentation for all public functions. The tool macro in this crate generates an internal public function that does not have documentation, and that triggers this lint.

To Reproduce
Steps to reproduce the behavior:

  1. Use the tool macro in a crate with #![deny(missing_docs)]
  2. Observe this error:
error: missing documentation for an associated function
  --> [redacted].rs:83:5
   |
83 | /     #[tool(
84 | |         name = "redacted",
85 | |         description = "redacted"
86 | |     )]
   | |______^
   |
   = note: this error originates in the attribute macro `tool` (in Nightly builds, run with -Z macro-backtrace for more info)

Expected behavior
The macro should not generate code which triggers lints.

Working on a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions