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