rust/tests/rustdoc-ui/coverage/json.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
950 B
Rust
Raw Normal View History

// check-pass
2020-02-17 06:53:27 -06:00
// compile-flags:-Z unstable-options --output-format json --show-coverage
pub mod foo {
/// Hello!
pub struct Foo;
/// Bar
pub enum Bar { A }
}
/// X
pub struct X;
/// Bar
2020-08-19 15:44:58 -05:00
///
/// ```
/// let x = 12;
/// ```
pub mod bar {
/// bar
pub struct Bar;
/// X
2020-08-19 15:44:58 -05:00
pub enum X {
/// ```
/// let x = "should be ignored!";
/// ```
Y
}
}
/// yolo
2020-08-19 15:44:58 -05:00
///
/// ```text
/// should not be counted as a code example!
/// ```
pub enum Yolo { X }
2020-08-19 15:44:58 -05:00
impl Yolo {
/// ```
/// let x = "should be ignored!";
/// ```
pub const Const: u32 = 0;
}
pub struct Xo<T: Clone> {
2020-08-19 15:44:58 -05:00
/// ```
/// let x = "should be ignored!";
/// ```
x: T,
}
2020-08-19 15:44:58 -05:00
/// ```
/// let x = "should be ignored!";
/// ```
pub static StaticFoo: u32 = 0;
/// ```
/// let x = "should be ignored!";
/// ```
pub const ConstFoo: u32 = 0;
/// ```
/// let x = "should be ignored!";
/// ```
pub type TypeFoo = u32;