1 //! The point of this crate is to be able to have enough different "kinds" of
2 //! documentation generated so we can test each different features.
4 #![crate_name = "test_docs"]
5 #![feature(doc_keyword)]
8 use std::convert::AsRef;
11 /// Basic function with some code examples:
14 /// println!("nothing fancy");
15 /// println!("but with two lines!");
18 /// A failing to compile one:
21 /// println!("where did my argument {} go? :'(");
26 /// ```ignore (it's a test)
27 /// Let's say I'm just some text will ya?
30 /// An inlined `code`!
33 /// Just a normal struct.
38 pub fn must_use(&self) -> bool {
43 impl AsRef<str> for Foo {
44 fn as_ref(&self) -> &str {
49 /// Just a normal enum.
50 #[doc(alias = "ThisIsAnAlias")]
51 pub enum WhoLetTheDogOut {
58 /// Who doesn't love to wrap a `format!` call?
59 pub fn some_more_function<T: fmt::Debug>(t: &T) -> String {
64 pub trait AnotherOne {
84 /// Check for "i" signs in lists!
92 /// 4. ```ignore (it's a test)
99 /// ```ignore (still a test)
102 pub fn check_list_code_block() {}
104 /// a thing with a label
105 #[deprecated(since = "1.0.0", note = "text why this deprecated")]
107 pub fn replaced_function() {}
109 /// Some doc with `code`!
111 WithVariants { and: usize, sub: usize, variants: usize },
114 #[doc(keyword = "CookieMonster")]
118 /// Just some type alias.
119 pub type SomeType = u32;
121 pub mod huge_amount_of_consts {
122 include!(concat!(env!("OUT_DIR"), "/huge_amount_of_consts.rs"));
125 /// Very long code text `hereIgoWithLongTextBecauseWhyNotAndWhyWouldntI`.
126 pub mod long_code_block {}
133 pub use crate::repro as repro2;