Skip to content

missing_docs lint triggers on all declarative macros 2.0 #57569

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jethrogb opened this issue Jan 13, 2019 · 3 comments · Fixed by #86968
Closed

missing_docs lint triggers on all declarative macros 2.0 #57569

jethrogb opened this issue Jan 13, 2019 · 3 comments · Fixed by #86968
Assignees
Labels
A-decl-macros-2-0 Area: Declarative macros 2.0 (#39412) A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) 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

@jethrogb
Copy link
Contributor

jethrogb commented Jan 13, 2019

#![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.

VardhanThigle pushed a commit to VardhanThigle/rust that referenced this issue Jan 13, 2019
@Centril Centril added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-decl-macros-2-0 Area: Declarative macros 2.0 (#39412) labels Jan 13, 2019
@GuillaumeGomez
Copy link
Member

That's interesting. A bad check very certainly on wether something is publically viewable or not.

@inquisitivecrystal
Copy link
Contributor

Going to see if I can figure this out.

@rustbot claim
@rustbot label C-bug T-compiler

@rustbot rustbot added C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 6, 2021
@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 6, 2021
@inquisitivecrystal
Copy link
Contributor

I have what I think is a solution implemented, but still need to do final testing. Fingers crossed.

@bors bors closed this as completed in 8eae2eb Jul 10, 2021
@fmease fmease added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Dec 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-decl-macros-2-0 Area: Declarative macros 2.0 (#39412) A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) 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.

6 participants