Skip to content

Commit 16462a7

Browse files
committed
build: Add rustdoc to tidy rules
1 parent 66e97a9 commit 16462a7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

mk/tests.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ tidy:
9595
$(COMPILETEST_INPUTS) \
9696
$(CARGO_CRATE) \
9797
$(CARGO_INPUTS) \
98+
$(RUSTDOC_CRATE) \
99+
$(RUSTDOC_INPUTS) \
98100
| xargs -n 10 python $(S)src/etc/tidy.py
99101
$(Q)echo \
100102
$(ALL_TEST_INPUTS) \

src/rustdoc/rustdoc.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ fn doc_item(rd: rustdoc, item: @ast::item) {
135135
let noargdocs = map::new_str_hash::<str>();
136136
for attr: ast::attribute in item.attrs {
137137
alt attr.node.value.node {
138-
ast::meta_name_value("doc", {node: ast::lit_str(value), span: _}) {
138+
ast::meta_name_value(
139+
"doc", {node: ast::lit_str(value), span: _}) {
139140
_fndoc = some({ brief: value,
140141
desc: none,
141142
return: none,
@@ -149,7 +150,10 @@ fn doc_item(rd: rustdoc, item: @ast::item) {
149150

150151
let _fndoc0 = alt _fndoc {
151152
some(_d) { _d }
152-
none. { { brief: "_undocumented_", desc: none, return: none, args: noargdocs } }
153+
none. { { brief: "_undocumented_",
154+
desc: none,
155+
return: none,
156+
args: noargdocs } }
153157
};
154158

155159
alt item.node {

0 commit comments

Comments
 (0)