]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/lint-group.rs
Rollup merge of #56242 - GuillaumeGomez:iterator-missing-link, r=Centril
[rust.git] / src / test / rustdoc-ui / lint-group.rs
1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! Documenting the kinds of lints emitted by rustdoc.
12 //!
13 //! ```
14 //! println!("sup");
15 //! ```
16
17 #![deny(rustdoc)]
18
19 /// what up, let's make an [error]
20 ///
21 /// ```
22 /// println!("sup");
23 /// ```
24 pub fn link_error() {} //~^^^^^ ERROR cannot be resolved, ignoring it
25
26 /// wait, this doesn't have a doctest?
27 pub fn no_doctest() {} //~^ ERROR Missing code example in this documentation
28
29 /// wait, this *does* have a doctest?
30 ///
31 /// ```
32 /// println!("sup");
33 /// ```
34 fn private_doctest() {} //~^^^^^ ERROR Documentation test in private item