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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
273 B
Rust
Raw Normal View History

2024-06-10 16:33:14 -05:00
#![crate_name = "foo"]
#![crate_type = "lib"]
//! ```standalone_crate
2024-06-10 16:33:14 -05:00
//! foo::init();
//! ```
/// ```standalone_crate
2024-06-10 16:33:14 -05:00
/// foo::init();
/// ```
pub fn init() {
static mut IS_INIT: bool = false;
unsafe {
assert!(!IS_INIT);
IS_INIT = true;
}
}