At [1] it was pointed out that `cfg_match!` syntax does not actually align well with match syntax, which is a possible source of confusion. The comment points out that usage is instead more similar to ecosystem `select!` macros. Rename `cfg_match!` to `cfg_select!` to match this. Tracking issue: https://github.com/rust-lang/rust/issues/115585 [1]: https://github.com/rust-lang/rust/issues/115585#issuecomment-2346307605
30 lines
659 B
Rust
30 lines
659 B
Rust
//! Simple file-locking apis for each OS.
|
|
//!
|
|
//! This is not meant to be in the standard library, it does nothing with
|
|
//! green/native threading. This is just a bare-bones enough solution for
|
|
//! librustdoc, it is not production quality at all.
|
|
|
|
cfg_select! {
|
|
target_os = "linux" => {
|
|
mod linux;
|
|
use linux as imp;
|
|
}
|
|
target_os = "redox" => {
|
|
mod linux;
|
|
use linux as imp;
|
|
}
|
|
unix => {
|
|
mod unix;
|
|
use unix as imp;
|
|
}
|
|
windows => {
|
|
mod windows;
|
|
use self::windows as imp;
|
|
}
|
|
_ => {
|
|
mod unsupported;
|
|
use unsupported as imp;
|
|
}
|
|
}
|
|
|
|
pub use imp::Lock;
|