Use nightly doc_cfg feature only when building docs.
This commit is contained in:
parent
c3363fbc72
commit
b153460484
|
@ -0,0 +1,2 @@
|
||||||
|
build-docs:
|
||||||
|
RUSTDOCFLAGS="--cfg docsrs" cargo doc -p stylance -p stylance-cli --all-features --open
|
|
@ -17,3 +17,4 @@ notify = "6.1.1"
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "stylance"
|
name = "stylance"
|
||||||
path = "./src/main.rs"
|
path = "./src/main.rs"
|
||||||
|
doc = false
|
||||||
|
|
|
@ -15,3 +15,6 @@ stylance-macros = { workspace = true }
|
||||||
|
|
||||||
[package.metadata.stylance]
|
[package.metadata.stylance]
|
||||||
folders = ["examples"]
|
folders = ["examples"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
|
|
||||||
#![feature(doc_cfg)]
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use stylance_macros::*;
|
pub use stylance_macros::*;
|
||||||
|
@ -92,7 +92,7 @@ pub use stylance_macros::*;
|
||||||
/// pub const contents: &str = "contents-539306b";
|
/// pub const contents: &str = "contents-539306b";
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[doc(cfg(feature = "nightly"))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "nightly")))]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! import_style {
|
macro_rules! import_style {
|
||||||
($ident:ident, $str:expr) => {
|
($ident:ident, $str:expr) => {
|
||||||
|
|
Loading…
Reference in New Issue