auto merge of #10165 : dcrewi/rust/missing-doc-on-private-trait, r=cmr
Fixes #10069.
This commit is contained in:
commit
e0c01ca153
2 changed files with 5 additions and 7 deletions
|
@ -951,10 +951,9 @@ impl Visitor<()> for MissingDocLintVisitor {
|
|||
// trait (which was already linted)
|
||||
ast::item_impl(_, Some(*), _, _) => return,
|
||||
|
||||
ast::item_trait(*) if it.vis == ast::public => {
|
||||
self.check_attrs(it.attrs, it.id, it.span,
|
||||
~"missing documentation for a trait");
|
||||
}
|
||||
ast::item_trait(*) if it.vis != ast::public => return,
|
||||
ast::item_trait(*) => self.check_attrs(it.attrs, it.id, it.span,
|
||||
~"missing documentation for a trait"),
|
||||
|
||||
ast::item_fn(*) if it.vis == ast::public => {
|
||||
self.check_attrs(it.attrs, it.id, it.span,
|
||||
|
|
|
@ -45,10 +45,9 @@ pub trait C {} //~ ERROR: missing documentation
|
|||
#[allow(missing_doc)] pub trait D {}
|
||||
|
||||
trait Bar {
|
||||
/// dox
|
||||
fn foo();
|
||||
fn foo2(); //~ ERROR: missing documentation
|
||||
fn foo3(); //~ ERROR: missing documentation
|
||||
fn foo_with_impl() {
|
||||
}
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue