Skip to content

Commit 4d2a402

Browse files
committed
rustdoc: Don't abort if there's nothing to document
Instead there's no index.html file emitted because there wasn't anything to document. Closes #9828
1 parent 3d693d7 commit 4d2a402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
220220
};
221221
mkdir(&cx.dst);
222222

223-
match crate.module.get_ref().doc_list() {
223+
match crate.module.as_ref().map(|m| m.doc_list().unwrap_or(&[])) {
224224
Some(attrs) => {
225225
for attr in attrs.iter() {
226226
match *attr {

0 commit comments

Comments
 (0)