1 //! This file tests for the DOC_MARKDOWN lint
2 //~^ ERROR: you should put `DOC_MARKDOWN` between ticks
9 /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
10 //~^ ERROR: you should put `foo_bar` between ticks
11 //~| ERROR: you should put `foo::bar` between ticks
12 /// Markdown is _weird_. I mean _really weird_. This \_ is ok. So is `_`. But not Foo::some_fun
13 //~^ ERROR: you should put `Foo::some_fun` between ticks
14 /// which should be reported only once despite being __doubly bad__.
15 /// Here be ::is::a::global:path.
16 //~^ ERROR: you should put `is::a::global:path` between ticks
17 /// be_sure_we_got_to_the_end_of_it
18 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
22 /// That one tests multiline ticks.
27 /// be_sure_we_got_to_the_end_of_it
28 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
29 fn multiline_ticks() {
32 /// This _is a test for
35 /// be_sure_we_got_to_the_end_of_it
36 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
40 /// This tests units. See also #835.
41 /// kiB MiB GiB TiB PiB EiB
42 /// kib Mib Gib Tib Pib Eib
45 /// 32kiB 32MiB 32GiB 32TiB 32PiB 32EiB
46 /// 32kib 32Mib 32Gib 32Tib 32Pib 32Eib
47 /// 32kB 32MB 32GB 32TB 32PB 32EB
48 /// 32kb 32Mb 32Gb 32Tb 32Pb 32Eb
49 /// be_sure_we_got_to_the_end_of_it
50 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
54 /// This one checks we don’t try to split unicode codepoints
60 //~^ ERROR: you should put `ß_foo` between ticks
62 //~^ ERROR: you should put `ℝ_foo` between ticks
66 //~^ ERROR: you should put `foo_ß` between ticks
68 //~^ ERROR: you should put `foo_ℝ` between ticks
71 /// [ßdummy textß][foo_1ß]
72 /// [ℝdummy textℝ][foo_2ℝ]
73 /// [💣dummy tex💣t][foo3_💣]
74 /// [❤️dummy text❤️][foo_4❤️]
75 /// [ßdummy textß](foo_5ß)
76 /// [ℝdummy textℝ](foo_6ℝ)
77 /// [💣dummy tex💣t](fo7o_💣)
78 /// [❤️dummy text❤️](foo_8❤️)
79 /// [foo1_ß]: dummy text
80 /// [foo2_ℝ]: dummy text
81 /// [foo3_💣]: dummy text
82 /// [foo4_❤️]: dummy text
83 /// be_sure_we_got_to_the_end_of_it
84 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
88 /// This test has [a link_with_underscores][chunked-example] inside it. See #823.
89 //~^ ERROR: you should put `link_with_underscores` between ticks
90 /// See also [the issue tracker](https://github.com/Manishearth/rust-clippy/search?q=doc_markdown&type=Issues)
91 /// on GitHub (which is a camel-cased word, but is OK). And here is another [inline link][inline_link].
92 /// It can also be [inline_link2].
93 //~^ ERROR: you should put `inline_link2` between ticks
95 /// [chunked-example]: https://en.wikipedia.org/wiki/Chunked_transfer_encoding#Example
96 /// [inline_link]: https://foobar
97 /// [inline_link2]: https://foobar
99 /// The `main` function is the entry point of the program. Here it only calls the `foo_bar` and
100 /// `multiline_ticks` functions.
102 /// expression of the type `_ <bit_op> m <cmp_op> c` (where `<bit_op>`
103 /// is one of {`&`, '|'} and `<cmp_op>` is one of {`!=`, `>=`, `>` ,
104 /// be_sure_we_got_to_the_end_of_it
105 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
113 /// ## CamelCaseThing
114 /// Talks about `CamelCaseThing`. Titles should be ignored, see issue #897.
118 /// Not a title #897 CamelCaseThing
119 //~^ ERROR: you should put `CamelCaseThing` between ticks
120 /// be_sure_we_got_to_the_end_of_it
121 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
125 /// I am confused by brackets? (`x_y`)
126 /// I am confused by brackets? (foo `x_y`)
127 /// I am confused by brackets? (`x_y` foo)
128 /// be_sure_we_got_to_the_end_of_it
129 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
133 /// Diesel queries also have a similar problem to [Iterator][iterator], where
135 /// returning them from a function requires exposing the implementation of that
136 /// function. The [`helper_types`][helper_types] module exists to help with this,
137 /// but you might want to hide the return type or have it conditionally change.
138 /// Boxing can achieve both.
140 /// [iterator]: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html
141 /// [helper_types]: ../helper_types/index.html
142 /// be_sure_we_got_to_the_end_of_it
143 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
150 /// bar](https://doc.rust-lang.org/stable/std/iter/trait.IteratorFooBar.html)