Skip to content

Commit 714ce79

Browse files
committed
Make missing_doc lint check typedefs
Closes #19543
1 parent 361baab commit 714ce79

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/libcore/fmt/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ mod float;
3434
pub mod rt;
3535

3636
#[experimental = "core and I/O reconciliation may alter this definition"]
37+
/// The type returned by formatter methods.
3738
pub type Result = result::Result<(), Error>;
3839

3940
/// The error type which is returned from formatting a message into a stream.

src/librustc/lint/builtin.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,7 @@ impl LintPass for MissingDoc {
14301430
ast::ItemEnum(..) => "an enum",
14311431
ast::ItemStruct(..) => "a struct",
14321432
ast::ItemTrait(..) => "a trait",
1433+
ast::ItemTy(..) => "a type alias",
14331434
_ => return
14341435
};
14351436
self.check_missing_docs_attrs(cx, Some(it.id), it.attrs.as_slice(),

src/test/compile-fail/lint-missing-doc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
//! Some garbage docs for the crate here
1818
#![doc="More garbage"]
1919

20+
type Typedef = String;
21+
pub type PubTypedef = String; //~ ERROR: missing documentation
22+
2023
struct Foo {
2124
a: int,
2225
b: int,

0 commit comments

Comments
 (0)