]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/lint-group.rs
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / rustdoc-ui / lint-group.rs
1 #![feature(rustdoc_missing_doc_code_examples)]
2
3 //! Documenting the kinds of lints emitted by rustdoc.
4 //!
5 //! ```
6 //! println!("sup");
7 //! ```
8
9 #![deny(rustdoc::all)]
10
11 /// what up, let's make an [error]
12 ///
13 /// ```
14 /// println!("sup");
15 /// ```
16 pub fn link_error() {} //~^^^^^ ERROR unresolved link to `error`
17
18 /// wait, this doesn't have a doctest?
19 pub fn no_doctest() {} //~^ ERROR missing code example in this documentation
20
21 /// wait, this *does* have a doctest?
22 ///
23 /// ```
24 /// println!("sup");
25 /// ```
26 fn private_doctest() {} //~^^^^^ ERROR documentation test in private item
27
28 /// <unknown>
29 //~^ ERROR unclosed HTML tag `unknown`
30 //~^^ ERROR missing code example
31 pub fn c() {}