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

missing_docs lint triggers on all declarative macros 2.0 #57569

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-lint 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-macros-2.0 Area: Declarative macros 2.0 (#39412) 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-lint 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-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.

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. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-macros-2.0 Area: Declarative macros 2.0 (#39412) 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.

5 participants