Skip to content

Commit

Permalink
Add test about missing docs at crate level
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Sep 9, 2024
1 parent a1a8627 commit 0f9cb07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/ui/lint/lint-missing-doc-crate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This test checks that we lint on the crate when it's missing a documentation.
//
//@ compile-flags: -Dmissing-docs --crate-type=lib
//~ ERROR missing documentation for the crate
10 changes: 10 additions & 0 deletions tests/ui/lint/lint-missing-doc-crate.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
error: missing documentation for the crate
--> $DIR/lint-missing-doc-crate.rs:4:47
|
LL |
| ^
|
= note: requested on the command line with `-D missing-docs`

error: aborting due to 1 previous error

0 comments on commit 0f9cb07

Please sign in to comment.