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

allow(missing_docs) does not work for macro definitions #59306

Closed
fanzeyi opened this issue Mar 20, 2019 · 1 comment · Fixed by #88019
Closed

allow(missing_docs) does not work for macro definitions #59306

fanzeyi opened this issue Mar 20, 2019 · 1 comment · Fixed by #88019
Assignees
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@fanzeyi
Copy link

fanzeyi commented Mar 20, 2019

It appears deny(missing_docs) will take macros into account since 1.33.0. So I tried to add #[allow(missing_docs)] for some of the macros I don't want to write docs, and it doesn't seem to be working. Minimal reproducible example:

//! Hello
#![deny(missing_docs)]

#[allow(missing_docs)]
#[macro_export]
macro_rules! hello {
    () => ()
}

It will fail with:

error: missing documentation for macro
 --> src/lib.rs:6:1
  |
6 | macro_rules! hello {
  | ^^^^^^^^^^^^^^^^^^
  |
note: lint level defined here
 --> src/lib.rs:2:9
  |
2 | #![deny(missing_docs)]
  |         ^^^^^^^^^^^^

Rust playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=cf5ab453ab982bea1b435676cf46f119

Tested on nightly.

@jonas-schievink jonas-schievink added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. labels Mar 20, 2019
@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 25, 2019
@inquisitivecrystal inquisitivecrystal self-assigned this Aug 6, 2021
@inquisitivecrystal
Copy link
Contributor

This should get fixed as part of #87406.

@inquisitivecrystal inquisitivecrystal added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 6, 2021
@bors bors closed this as completed in 05cccdc Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants