|
20 | 20 | #![doc(test(attr(allow(unused_variables))))]
|
21 | 21 | #![doc(test(attr(allow(deprecated))))]
|
22 | 22 | #![cfg_attr(not(feature = "std"), no_std)]
|
| 23 | +// Enable the doc_cfg nightly feature for including feature gate flags in the documentation |
| 24 | +#![cfg_attr(docsrs, feature(doc_cfg))] |
23 | 25 |
|
24 | 26 | //! The `ndarray` crate provides an *n*-dimensional container for general elements
|
25 | 27 | //! and for numerics.
|
@@ -120,7 +122,7 @@ extern crate std;
|
120 | 122 | #[cfg(feature = "blas")]
|
121 | 123 | extern crate cblas_sys;
|
122 | 124 |
|
123 |
| -#[cfg(feature = "docs")] |
| 125 | +#[cfg(docsrs)] |
124 | 126 | pub mod doc;
|
125 | 127 |
|
126 | 128 | #[cfg(target_has_atomic = "ptr")]
|
@@ -148,6 +150,7 @@ use crate::iterators::{ElementsBase, ElementsBaseMut, Iter, IterMut};
|
148 | 150 | pub use crate::arraytraits::AsArray;
|
149 | 151 | pub use crate::linalg_traits::LinalgScalar;
|
150 | 152 | #[cfg(feature = "std")]
|
| 153 | +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] |
151 | 154 | pub use crate::linalg_traits::NdFloat;
|
152 | 155 |
|
153 | 156 | pub use crate::stacking::{concatenate, stack};
|
@@ -189,9 +192,11 @@ mod layout;
|
189 | 192 | mod linalg_traits;
|
190 | 193 | mod linspace;
|
191 | 194 | #[cfg(feature = "std")]
|
| 195 | +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] |
192 | 196 | pub use crate::linspace::{linspace, range, Linspace};
|
193 | 197 | mod logspace;
|
194 | 198 | #[cfg(feature = "std")]
|
| 199 | +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] |
195 | 200 | pub use crate::logspace::{logspace, Logspace};
|
196 | 201 | mod math_cell;
|
197 | 202 | mod numeric_util;
|
@@ -1587,6 +1592,7 @@ where
|
1587 | 1592 |
|
1588 | 1593 | // parallel methods
|
1589 | 1594 | #[cfg(feature = "rayon")]
|
| 1595 | +#[cfg_attr(docsrs, doc(cfg(feature = "rayon")))] |
1590 | 1596 | pub mod parallel;
|
1591 | 1597 |
|
1592 | 1598 | mod impl_1d;
|
|
0 commit comments