mirror of
https://git.mentality.rip/numas13/xash3d-master.git
synced 2025-01-22 04:44:31 +00:00
protocol: generate cfg docs with nightly
This commit is contained in:
parent
cfe44a04de
commit
14aaacc453
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -717,6 +717,7 @@ dependencies = [
|
|||||||
name = "xash3d-protocol"
|
name = "xash3d-protocol"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
"bitflags 2.5.0",
|
"bitflags 2.5.0",
|
||||||
"log",
|
"log",
|
||||||
]
|
]
|
||||||
|
@ -20,3 +20,6 @@ net = []
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.18"
|
log = "0.4.18"
|
||||||
bitflags = "2.4"
|
bitflags = "2.4"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
autocfg = "1"
|
||||||
|
7
protocol/build.rs
Normal file
7
protocol/build.rs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fn main() {
|
||||||
|
let ac = autocfg::new();
|
||||||
|
println!("cargo:rustc-check-cfg=cfg(has_doc_auto_cfg)");
|
||||||
|
if ac.probe_raw("#![feature(doc_auto_cfg)]").is_ok() {
|
||||||
|
println!("cargo:rustc-cfg=has_doc_auto_cfg");
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,7 @@
|
|||||||
//! Xash3D protocol between clients, servers and masters.
|
//! Xash3D protocol between clients, servers and masters.
|
||||||
|
|
||||||
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
|
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
|
||||||
|
#![cfg_attr(all(doc, has_doc_auto_cfg), feature(doc_auto_cfg))]
|
||||||
|
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user