]> git.lizzy.rs Git - rust.git/commitdiff
Make missing_doc lint check typedefs
authorSteven Fackler <sfackler@gmail.com>
Fri, 5 Dec 2014 04:20:09 +0000 (20:20 -0800)
committerSteven Fackler <sfackler@gmail.com>
Fri, 5 Dec 2014 04:20:09 +0000 (20:20 -0800)
Closes #19543

src/libcore/fmt/mod.rs
src/librustc/lint/builtin.rs
src/test/compile-fail/lint-missing-doc.rs

index 1d6906c13a8fa028e036c63f9fc83ae9928caaf2..7b9dd70c58f023d1ad481c423234f7ea1af949f8 100644 (file)
@@ -34,6 +34,7 @@
 pub mod rt;
 
 #[experimental = "core and I/O reconciliation may alter this definition"]
+/// The type returned by formatter methods.
 pub type Result = result::Result<(), Error>;
 
 /// The error type which is returned from formatting a message into a stream.
index 9a214d531d157b2e6235a172766e33aeaea8b7dc..884615c7aae8caac3096ed13622779ce74c7dc9c 100644 (file)
@@ -1430,6 +1430,7 @@ fn check_item(&mut self, cx: &Context, it: &ast::Item) {
             ast::ItemEnum(..) => "an enum",
             ast::ItemStruct(..) => "a struct",
             ast::ItemTrait(..) => "a trait",
+            ast::ItemTy(..) => "a type alias",
             _ => return
         };
         self.check_missing_docs_attrs(cx, Some(it.id), it.attrs.as_slice(),
index 365081aee1ab548e17e48a326f907327325e153f..8d4ecde692d72358ead90e3ad5cf25d8cd18b38d 100644 (file)
@@ -17,6 +17,9 @@
 //! Some garbage docs for the crate here
 #![doc="More garbage"]
 
+type Typedef = String;
+pub type PubTypedef = String; //~ ERROR: missing documentation
+
 struct Foo {
     a: int,
     b: int,