提交 ba436a80 编写于 作者: D David Creswick

fix missing_doc lint on private traits

Fixes #10069.
上级 886819cc
......@@ -942,10 +942,9 @@ fn visit_item(&mut self, it: @ast::item, _: ()) {
// 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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册