rust/tests/rustdoc-ui/check-fail.rs

23 lines
330 B
Rust
Raw Normal View History

2020-11-12 07:58:07 -06:00
// compile-flags: -Z unstable-options --check
#![feature(rustdoc_missing_doc_code_examples)]
2020-11-12 07:58:07 -06:00
#![deny(missing_docs)]
#![deny(rustdoc::all)]
2020-11-12 07:58:07 -06:00
//! ```rust,testharness
//~^ ERROR
//! let x = 12;
//! ```
2020-11-12 07:58:07 -06:00
pub fn foo() {}
//~^ ERROR
//~^^ ERROR
/// hello
//~^ ERROR
///
/// ```rust,testharness
/// let x = 12;
/// ```
pub fn bar() {}