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
28
29
//! Sanity check of new rustdoc features on docs.rs
//!
//! * module [`sub`]
//! * struct [`Thing1`]

pub struct Thing1 {
    some: usize
}

pub mod sub;

impl Thing1 {
    pub fn op_a(&self) -> usize {
        self.some
    }

    /// See also [`op_a`](Thing1::op_a)
    pub fn op_b(&self) -> usize {
        self.some + 1
    }
}

#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }
}