1 //! This file tests for the DOC_MARKDOWN lint
8 /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
9 /// Markdown is _weird_. I mean _really weird_. This \_ is ok. So is `_`. But not Foo::some_fun
10 /// which should be reported only once despite being __doubly bad__.
11 /// Here be ::is::a::global:path.
12 /// That's not code ~NotInCodeBlock~.
13 /// be_sure_we_got_to_the_end_of_it
17 /// That one tests multiline ticks.
27 /// be_sure_we_got_to_the_end_of_it
28 fn multiline_codeblock() {
31 /// This _is a test for
34 /// be_sure_we_got_to_the_end_of_it
38 /// This tests units. See also #835.
39 /// kiB MiB GiB TiB PiB EiB
40 /// kib Mib Gib Tib Pib Eib
43 /// 32kiB 32MiB 32GiB 32TiB 32PiB 32EiB
44 /// 32kib 32Mib 32Gib 32Tib 32Pib 32Eib
45 /// 32kB 32MB 32GB 32TB 32PB 32EB
46 /// 32kb 32Mb 32Gb 32Tb 32Pb 32Eb
48 /// be_sure_we_got_to_the_end_of_it
52 /// This one checks we don’t try to split unicode codepoints
65 /// [ßdummy textß][foo_1ß]
66 /// [ℝdummy textℝ][foo_2ℝ]
67 /// [💣dummy tex💣t][foo3_💣]
68 /// [❤️dummy text❤️][foo_4❤️]
69 /// [ßdummy textß](foo_5ß)
70 /// [ℝdummy textℝ](foo_6ℝ)
71 /// [💣dummy tex💣t](fo7o_💣)
72 /// [❤️dummy text❤️](foo_8❤️)
73 /// [foo1_ß]: dummy text
74 /// [foo2_ℝ]: dummy text
75 /// [foo3_💣]: dummy text
76 /// [foo4_❤️]: dummy text
77 /// be_sure_we_got_to_the_end_of_it
81 /// This test has [a link_with_underscores][chunked-example] inside it. See #823.
82 /// See also [the issue tracker](https://github.com/Manishearth/rust-clippy/search?q=doc_markdown&type=Issues)
83 /// on GitHub (which is a camel-cased word, but is OK). And here is another [inline link][inline_link].
84 /// It can also be [inline_link2].
86 /// [chunked-example]: https://en.wikipedia.org/wiki/Chunked_transfer_encoding#Example
87 /// [inline_link]: https://foobar
88 /// [inline_link2]: https://foobar
89 /// The `main` function is the entry point of the program. Here it only calls the `foo_bar` and
90 /// `multiline_ticks` functions.
92 /// expression of the type `_ <bit_op> m <cmp_op> c` (where `<bit_op>`
93 /// is one of {`&`, '|'} and `<cmp_op>` is one of {`!=`, `>=`, `>` ,
94 /// be_sure_we_got_to_the_end_of_it
97 multiline_codeblock();
102 /// ## CamelCaseThing
103 /// Talks about `CamelCaseThing`. Titles should be ignored, see issue #897.
107 /// Not a title #897 CamelCaseThing
108 /// be_sure_we_got_to_the_end_of_it
112 /// I am confused by brackets? (`x_y`)
113 /// I am confused by brackets? (foo `x_y`)
114 /// I am confused by brackets? (`x_y` foo)
115 /// be_sure_we_got_to_the_end_of_it
119 /// Diesel queries also have a similar problem to [Iterator][iterator], where
121 /// returning them from a function requires exposing the implementation of that
122 /// function. The [`helper_types`][helper_types] module exists to help with this,
123 /// but you might want to hide the return type or have it conditionally change.
124 /// Boxing can achieve both.
126 /// [iterator]: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html
127 /// [helper_types]: ../helper_types/index.html
128 /// be_sure_we_got_to_the_end_of_it
135 /// bar](https://doc.rust-lang.org/stable/std/iter/trait.IteratorFooBar.html)
139 /** E.g. serialization of an empty list: FooBar
141 That's in a code block: `PackedNode`
145 be_sure_we_got_to_the_end_of_it
150 /** E.g. serialization of an empty list: FooBar
152 That's in a code block: PackedNode
156 be_sure_we_got_to_the_end_of_it
161 /// Test more than three quotes:
167 /// be_sure_we_got_to_the_end_of_it