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)]
15 #![allow(missing_copy_implementations)]
17 //! Some garbage docs for the crate here
18 #![doc="More garbage"]
20 type Typedef = String;
21 pub type PubTypedef = String; //~ ERROR: missing documentation
28 pub struct PubFoo { //~ ERROR: missing documentation
29 pub a: isize, //~ ERROR: missing documentation
33 #[allow(missing_docs)]
40 pub mod pub_module_no_dox {} //~ ERROR: missing documentation
44 pub fn foo2() {} //~ ERROR: missing documentation
46 #[allow(missing_docs)] pub fn foo4() {}
55 #[allow(missing_docs)]
60 pub trait C { //~ ERROR: missing documentation
61 fn foo(); //~ ERROR: missing documentation
62 fn foo_with_impl() {} //~ ERROR: missing documentation
64 #[allow(missing_docs)] pub trait D {}
72 pub fn foo() {} //~ ERROR: missing documentation
76 #[allow(missing_docs)] pub fn foo3() {}
79 #[allow(missing_docs)]
85 // should need to redefine documentation for implementations of traits
91 // It sure is nice if doc(hidden) implies allow(missing_docs), and that it
92 // applies recursively
109 pub enum PubBaz { //~ ERROR: missing documentation
110 PubBazA { //~ ERROR: missing documentation
111 a: isize, //~ ERROR: missing documentation
124 #[allow(missing_docs)]
136 pub fn documented() {}
137 pub fn undocumented1() {} //~ ERROR: missing documentation
138 pub fn undocumented2() {} //~ ERROR: missing documentation
139 fn undocumented3() {}
143 pub fn also_documented() {}
144 pub fn also_undocumented1() {} //~ ERROR: missing documentation
145 fn also_undocumented2() {}
149 pub mod public_interface {
150 pub use internal_impl::documented as foo;
151 pub use internal_impl::undocumented1 as bar;
152 pub use internal_impl::{documented, undocumented2};
153 pub use internal_impl::globbed::*;