]>
Commit | Line | Data |
---|---|---|
f2b60f7d FG |
1 | #![feature(rustdoc_missing_doc_code_examples)] |
2 | ||
0731742a XL |
3 | //! Documenting the kinds of lints emitted by rustdoc. |
4 | //! | |
5 | //! ``` | |
6 | //! println!("sup"); | |
7 | //! ``` | |
8 | ||
9ffffee4 | 9 | #![deny(rustdoc::missing_doc_code_examples)] |
6a06907d | 10 | #![deny(rustdoc::all)] |
0731742a XL |
11 | |
12 | /// what up, let's make an [error] | |
13 | /// | |
14 | /// ``` | |
15 | /// println!("sup"); | |
16 | /// ``` | |
3dfed10e | 17 | pub fn link_error() {} //~^^^^^ ERROR unresolved link to `error` |
0731742a XL |
18 | |
19 | /// wait, this doesn't have a doctest? | |
60c5eb7d | 20 | pub fn no_doctest() {} //~^ ERROR missing code example in this documentation |
0731742a XL |
21 | |
22 | /// wait, this *does* have a doctest? | |
23 | /// | |
24 | /// ``` | |
25 | /// println!("sup"); | |
26 | /// ``` | |
60c5eb7d | 27 | fn private_doctest() {} //~^^^^^ ERROR documentation test in private item |
29967ef6 XL |
28 | |
29 | /// <unknown> | |
30 | //~^ ERROR unclosed HTML tag `unknown` | |
31 | //~^^ ERROR missing code example | |
32 | pub fn c() {} |