mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 22:22:44 +00:00
Revert "Revert "Fix missing_docs
lint for const and static.""
This reverts commit 9191a78955
.
This commit is contained in:
parent
68f79288bf
commit
e0d7497fb8
@ -1869,6 +1869,8 @@ impl LintPass for MissingDoc {
|
||||
}
|
||||
return
|
||||
},
|
||||
ast::ItemConst(..) => "a constant",
|
||||
ast::ItemStatic(..) => "a static",
|
||||
_ => return
|
||||
};
|
||||
|
||||
|
@ -150,6 +150,27 @@ pub enum PubBaz3 {
|
||||
#[doc(hidden)]
|
||||
pub fn baz() {}
|
||||
|
||||
|
||||
const FOO: u32 = 0;
|
||||
/// dox
|
||||
pub const FOO1: u32 = 0;
|
||||
#[allow(missing_docs)]
|
||||
pub const FOO2: u32 = 0;
|
||||
#[doc(hidden)]
|
||||
pub const FOO3: u32 = 0;
|
||||
pub const FOO4: u32 = 0; //~ ERROR: missing documentation for a const
|
||||
|
||||
|
||||
static BAR: u32 = 0;
|
||||
/// dox
|
||||
pub static BAR1: u32 = 0;
|
||||
#[allow(missing_docs)]
|
||||
pub static BAR2: u32 = 0;
|
||||
#[doc(hidden)]
|
||||
pub static BAR3: u32 = 0;
|
||||
pub static BAR4: u32 = 0; //~ ERROR: missing documentation for a static
|
||||
|
||||
|
||||
mod internal_impl {
|
||||
/// dox
|
||||
pub fn documented() {}
|
||||
|
Loading…
Reference in New Issue
Block a user