make feature requirement render in rustdoc for new apis

This commit is contained in:
Pat Hickey
2021-10-22 14:03:04 -07:00
parent 6819459082
commit 5f978dbfdd
3 changed files with 5 additions and 0 deletions

View File

@@ -444,6 +444,7 @@ impl Table {
Table::_new(store.as_context_mut().0, ty, init) Table::_new(store.as_context_mut().0, ty, init)
} }
#[cfg_attr(nightlydoc, doc(cfg(feature = "async")))]
/// Async variant of [`Table::new`]. You must use this variant with /// Async variant of [`Table::new`]. You must use this variant with
/// [`Store`](`crate::Store`)s which have a /// [`Store`](`crate::Store`)s which have a
/// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`). /// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`).
@@ -603,6 +604,7 @@ impl Table {
} }
} }
#[cfg_attr(nightlydoc, doc(cfg(feature = "async")))]
/// Async variant of [`Table::grow`]. Required when using a /// Async variant of [`Table::grow`]. Required when using a
/// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`). /// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`).
/// ///

View File

@@ -230,6 +230,7 @@ impl Memory {
Memory::_new(store.as_context_mut().0, ty) Memory::_new(store.as_context_mut().0, ty)
} }
#[cfg_attr(nightlydoc, doc(cfg(feature = "async")))]
/// Async variant of [`Memory::new`]. You must use this variant with /// Async variant of [`Memory::new`]. You must use this variant with
/// [`Store`](`crate::Store`)s which have a /// [`Store`](`crate::Store`)s which have a
/// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`). /// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`).
@@ -508,6 +509,7 @@ impl Memory {
} }
} }
#[cfg_attr(nightlydoc, doc(cfg(feature = "async")))]
/// Async variant of [`Memory::grow`]. Required when using a /// Async variant of [`Memory::grow`]. Required when using a
/// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`). /// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`).
/// ///

View File

@@ -533,6 +533,7 @@ impl<T> Store<T> {
inner.limiter = Some(ResourceLimiterInner::Sync(Box::new(limiter))); inner.limiter = Some(ResourceLimiterInner::Sync(Box::new(limiter)));
} }
#[cfg_attr(nightlydoc, doc(cfg(feature = "async")))]
/// Configures the [`ResourceLimiterAsync`](crate::ResourceLimiterAsync) /// Configures the [`ResourceLimiterAsync`](crate::ResourceLimiterAsync)
/// used to limit resource creation within this [`Store`]. Must be used /// used to limit resource creation within this [`Store`]. Must be used
/// with an async `Store`!. /// with an async `Store`!.