about summary refs log tree commit diff
path: root/tests/run-make/doctests-merge/doctest.rs
blob: 66a5d88db67f44050071de897647da432f2f3f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![crate_name = "foo"]
#![crate_type = "lib"]

//! ```
//! foo::init();
//! ```

/// ```
/// foo::init();
/// ```
pub fn init() {
    static mut IS_INIT: bool = false;

    unsafe {
        assert!(!IS_INIT);
        IS_INIT = true;
    }
}