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");
17 /// A failing to compile one:
20 /// println!("where did my argument {} go? :'(");
25 /// ```ignore (it's a test)
26 /// Let's say I'm just some text will ya?
29 /// An inlined `code`!
32 /// Just a normal struct.
37 pub fn must_use(&self) -> bool {
42 impl AsRef<str> for Foo {
43 fn as_ref(&self) -> &str {
48 /// Just a normal enum.
49 #[doc(alias = "ThisIsAnAlias")]
50 pub enum WhoLetTheDogOut {
57 /// Who doesn't love to wrap a `format!` call?
58 pub fn some_more_function<T: fmt::Debug>(t: &T) -> String {
63 pub trait AnotherOne {
83 /// Check for "i" signs in lists!
91 /// 4. ```ignore (it's a test)
98 /// ```ignore (still a test)
101 pub fn check_list_code_block() {}
103 /// a thing with a label
104 #[deprecated(since = "1.0.0", note = "text why this deprecated")]
106 pub fn replaced_function() {}
108 /// Some doc with `code`!
110 WithVariants { and: usize, sub: usize, variants: usize },
113 #[doc(keyword = "CookieMonster")]
117 /// Just some type alias.
118 pub type SomeType = u32;
120 pub mod huge_amount_of_consts {
121 include!(concat!(env!("OUT_DIR"), "/huge_amount_of_consts.rs"));
124 /// Very long code text `hereIgoWithLongTextBecauseWhyNotAndWhyWouldntI`.
125 pub mod long_code_block {}