1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // When denying at the crate level, be sure to not get random warnings from the
12 // injected intrinsics by the compiler.
13 #![deny(missing_docs)]
16 //! Some garbage docs for the crate here
17 #![doc="More garbage"]
19 type Typedef = String;
20 pub type PubTypedef = String; //~ ERROR: missing documentation
27 pub struct PubFoo { //~ ERROR: missing documentation
28 pub a: isize, //~ ERROR: missing documentation
32 #[allow(missing_docs)]
39 pub mod pub_module_no_dox {} //~ ERROR: missing documentation
43 pub fn foo2() {} //~ ERROR: missing documentation
45 #[allow(missing_docs)] pub fn foo4() {}
52 fn foo_with_impl(&self) {}
55 #[allow(missing_docs)]
58 fn foo_with_impl(&self) {}
61 pub trait C { //~ ERROR: missing documentation
62 fn foo(&self); //~ ERROR: missing documentation
63 fn foo_with_impl(&self) {} //~ ERROR: missing documentation
66 #[allow(missing_docs)]
77 pub fn foo() {} //~ ERROR: missing documentation
81 #[allow(missing_docs)] pub fn foo3() {}
84 #[allow(missing_docs)]
90 // should need to redefine documentation for implementations of traits
96 // It sure is nice if doc(hidden) implies allow(missing_docs), and that it
97 // applies recursively
114 pub enum PubBaz { //~ ERROR: missing documentation
115 PubBazA { //~ ERROR: missing documentation
116 a: isize, //~ ERROR: missing documentation
129 #[allow(missing_docs)]
141 pub fn documented() {}
142 pub fn undocumented1() {} //~ ERROR: missing documentation
143 pub fn undocumented2() {} //~ ERROR: missing documentation
144 fn undocumented3() {}
148 pub fn also_documented() {}
149 pub fn also_undocumented1() {} //~ ERROR: missing documentation
150 fn also_undocumented2() {}
154 pub mod public_interface {
155 pub use internal_impl::documented as foo;
156 pub use internal_impl::undocumented1 as bar;
157 pub use internal_impl::{documented, undocumented2};
158 pub use internal_impl::globbed::*;