2018-12-10 20:58:57 +00:00
|
|
|
//! Documenting the kinds of lints emitted by rustdoc.
|
|
|
|
//!
|
|
|
|
//! ```
|
|
|
|
//! println!("sup");
|
|
|
|
//! ```
|
|
|
|
|
2021-03-05 14:50:20 +00:00
|
|
|
#![deny(rustdoc::all)]
|
2018-12-10 20:58:57 +00:00
|
|
|
|
|
|
|
/// what up, let's make an [error]
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// println!("sup");
|
|
|
|
/// ```
|
2020-07-19 17:03:35 +00:00
|
|
|
pub fn link_error() {} //~^^^^^ ERROR unresolved link to `error`
|
2018-12-10 20:58:57 +00:00
|
|
|
|
|
|
|
/// wait, this doesn't have a doctest?
|
2019-11-25 02:42:22 +00:00
|
|
|
pub fn no_doctest() {} //~^ ERROR missing code example in this documentation
|
2018-12-10 20:58:57 +00:00
|
|
|
|
|
|
|
/// wait, this *does* have a doctest?
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// println!("sup");
|
|
|
|
/// ```
|
2019-11-25 02:42:22 +00:00
|
|
|
fn private_doctest() {} //~^^^^^ ERROR documentation test in private item
|
2020-09-26 20:50:34 +00:00
|
|
|
|
|
|
|
/// <unknown>
|
|
|
|
//~^ ERROR unclosed HTML tag `unknown`
|
|
|
|
//~^^ ERROR missing code example
|
|
|
|
pub fn c() {}
|