Auto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkor

check missing docs for reexported macros as well

Fixes #56334.
This commit is contained in:
bors 2019-01-08 22:16:13 +00:00
commit 167ceff01e
8 changed files with 100 additions and 21 deletions

View file

@ -0,0 +1,13 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(missing_docs)] //~ ERROR
pub struct Foo; //~ ERROR

View file

@ -0,0 +1,22 @@
error: missing documentation for crate
--> $DIR/deny-missing-docs-crate.rs:11:1
|
LL | / #![deny(missing_docs)] //~ ERROR
LL | |
LL | | pub struct Foo; //~ ERROR
| |_______________^
|
note: lint level defined here
--> $DIR/deny-missing-docs-crate.rs:11:9
|
LL | #![deny(missing_docs)] //~ ERROR
| ^^^^^^^^^^^^
error: missing documentation for a struct
--> $DIR/deny-missing-docs-crate.rs:13:1
|
LL | pub struct Foo; //~ ERROR
| ^^^^^^^^^^^^^^^
error: Compilation failed, aborting rustdoc

View file

@ -0,0 +1,18 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! foo
#![deny(missing_docs)]
#[macro_export]
macro_rules! foo { //~ ERROR
() => {}
}

View file

@ -0,0 +1,14 @@
error: missing documentation for macro
--> $DIR/deny-missing-docs-macro.rs:16:1
|
LL | macro_rules! foo { //~ ERROR
| ^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/deny-missing-docs-macro.rs:13:9
|
LL | #![deny(missing_docs)]
| ^^^^^^^^^^^^
error: Compilation failed, aborting rustdoc