2020-04-19 18:40:53 -05:00
|
|
|
// check-pass
|
2020-02-17 06:53:27 -06:00
|
|
|
// compile-flags:-Z unstable-options --output-format json --show-coverage
|
2019-11-16 09:23:27 -06:00
|
|
|
|
|
|
|
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;
|
|
|
|
/// ```
|
2019-11-16 09:23:27 -06:00
|
|
|
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
|
|
|
|
}
|
2019-11-16 09:23:27 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/// yolo
|
2020-08-19 15:44:58 -05:00
|
|
|
///
|
|
|
|
/// ```text
|
|
|
|
/// should not be counted as a code example!
|
|
|
|
/// ```
|
2019-11-16 09:23:27 -06:00
|
|
|
pub enum Yolo { X }
|
|
|
|
|
2020-08-19 15:44:58 -05:00
|
|
|
impl Yolo {
|
|
|
|
/// ```
|
|
|
|
/// let x = "should be ignored!";
|
|
|
|
/// ```
|
|
|
|
pub const Const: u32 = 0;
|
|
|
|
}
|
|
|
|
|
2019-11-16 09:23:27 -06:00
|
|
|
pub struct Xo<T: Clone> {
|
2020-08-19 15:44:58 -05:00
|
|
|
/// ```
|
|
|
|
/// let x = "should be ignored!";
|
|
|
|
/// ```
|
2019-11-16 09:23:27 -06:00
|
|
|
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;
|