From 9cc7cc121f0c03c525c08fe171cd6de8f09ee2c8 Mon Sep 17 00:00:00 2001 From: geo-ant <54497890+geo-ant@users.noreply.github.com> Date: Sun, 13 Nov 2022 17:23:43 +0100 Subject: [PATCH] mention feature gating --- src/base/iter.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/base/iter.rs b/src/base/iter.rs index 220eadd8..8f34dbc9 100644 --- a/src/base/iter.rs +++ b/src/base/iter.rs @@ -1,5 +1,9 @@ //! Matrix iterators. +// only enables the `doc_cfg` feature when +// the `docsrs` configuration attribute is defined +#![cfg_attr(docsrs, feature(doc_cfg))] + use core::fmt::Debug; use core::ops::Range; use std::iter::FusedIterator; @@ -445,6 +449,8 @@ mod parallel { use super::*; use rayon::iter::plumbing::Producer; + #[cfg_attr(doc_cfg, doc(cfg(feature = "par-iter")))] + /// *only available if compiled with the feature `par-iter`* impl<'a, T, R: Dim, Cols: Dim, S: RawStorage> Producer for ColumnIter<'a, T, R, Cols, S> where T: Send + Sync + Scalar, @@ -473,6 +479,8 @@ mod parallel { } } + #[cfg_attr(doc_cfg, doc(cfg(feature = "par-iter")))] + /// *only available if compiled with the feature `par-iter`* impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> Producer for ColumnIterMut<'a, T, R, C, S> where