rust/tests/run-make/doctests-merge/doctest-standalone.rs

19 lines
261 B
Rust

#![crate_name = "foo"]
#![crate_type = "lib"]
//! ```standalone
//! foo::init();
//! ```
/// ```standalone
/// foo::init();
/// ```
pub fn init() {
static mut IS_INIT: bool = false;
unsafe {
assert!(!IS_INIT);
IS_INIT = true;
}
}