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:
commit
167ceff01e
8 changed files with 100 additions and 21 deletions
13
src/test/rustdoc-ui/deny-missing-docs-crate.rs
Normal file
13
src/test/rustdoc-ui/deny-missing-docs-crate.rs
Normal 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
|
||||
22
src/test/rustdoc-ui/deny-missing-docs-crate.stderr
Normal file
22
src/test/rustdoc-ui/deny-missing-docs-crate.stderr
Normal 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
|
||||
|
||||
18
src/test/rustdoc-ui/deny-missing-docs-macro.rs
Normal file
18
src/test/rustdoc-ui/deny-missing-docs-macro.rs
Normal 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
|
||||
() => {}
|
||||
}
|
||||
14
src/test/rustdoc-ui/deny-missing-docs-macro.stderr
Normal file
14
src/test/rustdoc-ui/deny-missing-docs-macro.stderr
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue