diff --git a/src/libextra/crypto/digest.rs b/src/libextra/crypto/digest.rs index 85c256c47a3..372e2313de7 100644 --- a/src/libextra/crypto/digest.rs +++ b/src/libextra/crypto/digest.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! Common functionality related to cryptographic digest functions + use std::vec; use hex::ToHex; diff --git a/src/libextra/crypto/md5.rs b/src/libextra/crypto/md5.rs index 5ef113971ab..864fc64f82b 100644 --- a/src/libextra/crypto/md5.rs +++ b/src/libextra/crypto/md5.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + use std::iter::range_step; use cryptoutil::{write_u32_le, read_u32v_le, FixedBuffer, FixedBuffer64, StandardPadding}; diff --git a/src/libextra/crypto/sha2.rs b/src/libextra/crypto/sha2.rs index 4a8b62ffd11..fb9a6df50e4 100644 --- a/src/libextra/crypto/sha2.rs +++ b/src/libextra/crypto/sha2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + use std::iter::range_step; use cryptoutil::{write_u64_be, write_u32_be, read_u64v_be, read_u32v_be, add_bytes_to_bits, diff --git a/src/libextra/enum_set.rs b/src/libextra/enum_set.rs index 242faa2b4da..da9e0a225ba 100644 --- a/src/libextra/enum_set.rs +++ b/src/libextra/enum_set.rs @@ -8,6 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! A structure for holding a set of enum variants +//! +//! This module defines a container which uses an efficient bit mask +//! representation to hold C-like enum variants. + #[deriving(Clone, Eq, IterBytes, ToStr)] /// A specialized Set implementation to use enum types. pub struct EnumSet { diff --git a/src/libextra/io_util.rs b/src/libextra/io_util.rs index b75295ffd22..904ed13eabb 100644 --- a/src/libextra/io_util.rs +++ b/src/libextra/io_util.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + use std::io::{Reader, BytesReader}; use std::io; use std::cast; diff --git a/src/libextra/md4.rs b/src/libextra/md4.rs index abce22f98c6..96238986bf1 100644 --- a/src/libextra/md4.rs +++ b/src/libextra/md4.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; use std::vec; diff --git a/src/libextra/rl.rs b/src/libextra/rl.rs index 7662a159ba4..c8a17451a70 100644 --- a/src/libextra/rl.rs +++ b/src/libextra/rl.rs @@ -8,12 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! Bindings for the ability to read lines of input from the console + use std::c_str::ToCStr; use std::libc::{c_char, c_int}; use std::{local_data, str, rt}; use std::unstable::finally::Finally; -pub mod rustrt { +mod rustrt { use std::libc::{c_char, c_int}; externfn!(fn linenoise(prompt: *c_char) -> *c_char) diff --git a/src/libextra/stats.rs b/src/libextra/stats.rs index 9ac0d73c2ec..cc6ce715ad3 100644 --- a/src/libextra/stats.rs +++ b/src/libextra/stats.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + use sort; use std::cmp; use std::hashmap; diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs index 75060166f8c..b5b182ea8c5 100644 --- a/src/libextra/sync.rs +++ b/src/libextra/sync.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + /** * The concurrency primitives you know and love. * diff --git a/src/libextra/terminfo/terminfo.rs b/src/libextra/terminfo/terminfo.rs index 0e0231ad3f4..57e00885b2f 100644 --- a/src/libextra/terminfo/terminfo.rs +++ b/src/libextra/terminfo/terminfo.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + use std::hashmap::HashMap; /// A parsed terminfo entry. diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index 84cffc0e94c..8b21ce32024 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -955,6 +955,11 @@ impl Visitor<()> for MissingDocLintVisitor { ~"missing documentation for a function"); } + ast::item_mod(*) if it.vis == ast::public => { + self.check_attrs(it.attrs, it.id, it.span, + ~"missing documentation for a module"); + } + ast::item_enum(ref edef, _) if it.vis == ast::public => { self.check_attrs(it.attrs, it.id, it.span, ~"missing documentation for an enum"); diff --git a/src/libstd/at_vec.rs b/src/libstd/at_vec.rs index 93a66f6d917..f6669893170 100644 --- a/src/libstd/at_vec.rs +++ b/src/libstd/at_vec.rs @@ -135,6 +135,7 @@ impl Clone for @[T] { } #[cfg(not(test))] +#[allow(missing_doc)] pub mod traits { use at_vec::append; use clone::Clone; @@ -152,6 +153,7 @@ pub mod traits { #[cfg(test)] pub mod traits {} +#[allow(missing_doc)] pub mod raw { use at_vec::capacity; use cast; diff --git a/src/libstd/fmt/parse.rs b/src/libstd/fmt/parse.rs index a95bd563a81..1b8998b5c6c 100644 --- a/src/libstd/fmt/parse.rs +++ b/src/libstd/fmt/parse.rs @@ -8,6 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! Parsing of format strings +//! +//! These structures are used when parsing format strings for the compiler. +//! Parsing does not currently happen at runtime (structures of std::fmt::rt are +//! generated instead). + use prelude::*; use char; diff --git a/src/libstd/select.rs b/src/libstd/select.rs index 049b301144b..8ce23f4b53b 100644 --- a/src/libstd/select.rs +++ b/src/libstd/select.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(missing_doc)]; + use cell::Cell; use comm; use container::Container; diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 88497bdaa82..decfbb0785c 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1253,6 +1253,7 @@ Section: Trait implementations */ #[cfg(not(test))] +#[allow(missing_doc)] pub mod traits { use ops::Add; use cmp::{TotalOrd, Ordering, Less, Equal, Greater, Eq, Ord, Equiv, TotalEq}; diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 77e38b48067..f31dbfec78a 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -603,6 +603,7 @@ impl<'self, T> RandomAccessIterator<&'self [T]> for ChunkIter<'self, T> { // Equality #[cfg(not(test))] +#[allow(missing_doc)] pub mod traits { use super::*; diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index c936cb9ab90..1114e3a9893 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -991,6 +991,7 @@ pub fn std_macros() -> @str { pub mod $c { #[allow(unused_imports)]; #[allow(non_uppercase_statics)]; + #[allow(missing_doc)]; use super::*; diff --git a/src/test/compile-fail/lint-missing-doc.rs b/src/test/compile-fail/lint-missing-doc.rs index 372bf803ec4..22710ad90e8 100644 --- a/src/test/compile-fail/lint-missing-doc.rs +++ b/src/test/compile-fail/lint-missing-doc.rs @@ -29,6 +29,9 @@ pub struct PubFoo2 { c: int, } +mod module_no_dox {} +pub mod pub_module_no_dox {} //~ ERROR: missing documentation + /// dox pub fn foo() {} pub fn foo2() {} //~ ERROR: missing documentation