mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
19 lines
241 B
Rust
19 lines
241 B
Rust
#![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;
|
|
}
|
|
}
|