summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/coverage/doc-examples.rs
blob: cd718f8a34d111e0548ff6ffb60bf6769d0b3e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// compile-flags:-Z unstable-options --show-coverage
// check-pass

//! This test ensure that only rust code examples are counted.

/// Doc
///
/// ```
/// let x = 2;
/// ```
pub struct Foo;

/// Doc
///
/// ```text
/// yolo
/// ```
pub trait Bar {}

/// Doc
///
/// ```ignore (just for the sake of this test)
/// let x = 2;
/// ```
pub fn foo<T: Bar, D: ::std::fmt::Debug>(a: Foo, b: u32, c: T, d: D) -> u32 {
    0
}