don't lint nested items that don't have generated documentation in missing_docs_in_private_items
This commit is contained in:
parent
2f71ce6651
commit
b3bf128e54
3 changed files with 31 additions and 1 deletions
|
|
@ -119,6 +119,11 @@ with_span!(span pub const FOO2_PM: u32 = 0;);
|
|||
// Don't lint unnamed constants
|
||||
const _: () = ();
|
||||
|
||||
fn issue13298() {
|
||||
// Rustdoc doesn't generate documentation for items within other items like fns or consts
|
||||
const MSG: &str = "Hello, world!";
|
||||
}
|
||||
|
||||
// issue #12197
|
||||
// Undocumented field originated inside of spanned proc-macro attribute
|
||||
/// Some dox for struct.
|
||||
|
|
|
|||
|
|
@ -88,5 +88,14 @@ error: missing documentation for a function
|
|||
LL | fn also_undocumented2() {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 13 previous errors
|
||||
error: missing documentation for a function
|
||||
--> tests/ui/missing_doc.rs:122:1
|
||||
|
|
||||
LL | / fn issue13298() {
|
||||
LL | | // Rustdoc doesn't generate documentation for items within other items like fns or consts
|
||||
LL | | const MSG: &str = "Hello, world!";
|
||||
LL | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to 14 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue