Skip to content

Commit

Permalink
Auto merge of #27575 - brson:lint, r=alexcrichton
Browse files Browse the repository at this point in the history
This reverts commit 9191a78.

This was reverted previously until the `--cap-lints` option was implemented.
  • Loading branch information
bors committed Aug 11, 2015
2 parents 1af31d4 + e0d7497 commit 91c618f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_lint/builtin.rs
Expand Up @@ -1870,6 +1870,8 @@ impl LintPass for MissingDoc {
}
return
},
ast::ItemConst(..) => "a constant",
ast::ItemStatic(..) => "a static",
_ => return
};

Expand Down
21 changes: 21 additions & 0 deletions src/test/compile-fail/lint-missing-doc.rs
Expand Up @@ -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() {}
Expand Down

0 comments on commit 91c618f

Please sign in to comment.