Skip to content

missing_docs lint triggers on all declarative macros 2.0 #57569

Closed
@jethrogb

Description

@jethrogb
#![feature(decl_macro)]
#![deny(missing_docs)]
#![allow(unused)]
//! my crate

mod m {
    macro a { () => {} }
    pub(crate) macro b { () => {} }
    pub macro c { () => {} }
    macro_rules! r { () => {} }
    pub fn f() {}
}
error: missing documentation for macro
 --> m.rs:7:5
  |
7 |     macro a { () => {} }
  |     ^^^^^^^
  |
note: lint level defined here
 --> m.rs:2:9
  |
2 | #![deny(missing_docs)]
  |         ^^^^^^^^^^^^

error: missing documentation for macro
 --> m.rs:8:5
  |
8 |     pub(crate) macro b { () => {} }
  |     ^^^^^^^^^^^^^^^^^^

error: missing documentation for macro
 --> m.rs:9:5
  |
9 |     pub macro c { () => {} }
  |     ^^^^^^^^^^^

Note there is no error for r or f.

Metadata

Metadata

Labels

A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions