From 5f978dbfddd07c8facb97c90196b1a6c971c9521 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Fri, 22 Oct 2021 14:03:04 -0700 Subject: [PATCH] make feature requirement render in rustdoc for new apis --- crates/wasmtime/src/externals.rs | 2 ++ crates/wasmtime/src/memory.rs | 2 ++ crates/wasmtime/src/store.rs | 1 + 3 files changed, 5 insertions(+) diff --git a/crates/wasmtime/src/externals.rs b/crates/wasmtime/src/externals.rs index a35216eb09..047291ba34 100644 --- a/crates/wasmtime/src/externals.rs +++ b/crates/wasmtime/src/externals.rs @@ -444,6 +444,7 @@ impl Table { 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 /// [`Store`](`crate::Store`)s which have a /// [`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 /// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`). /// diff --git a/crates/wasmtime/src/memory.rs b/crates/wasmtime/src/memory.rs index 9165807cd7..596e11537f 100644 --- a/crates/wasmtime/src/memory.rs +++ b/crates/wasmtime/src/memory.rs @@ -230,6 +230,7 @@ impl Memory { 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 /// [`Store`](`crate::Store`)s which have a /// [`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 /// [`ResourceLimiterAsync`](`crate::ResourceLimiterAsync`). /// diff --git a/crates/wasmtime/src/store.rs b/crates/wasmtime/src/store.rs index 6c3c85ccc9..38bda4a734 100644 --- a/crates/wasmtime/src/store.rs +++ b/crates/wasmtime/src/store.rs @@ -533,6 +533,7 @@ impl Store { inner.limiter = Some(ResourceLimiterInner::Sync(Box::new(limiter))); } + #[cfg_attr(nightlydoc, doc(cfg(feature = "async")))] /// Configures the [`ResourceLimiterAsync`](crate::ResourceLimiterAsync) /// used to limit resource creation within this [`Store`]. Must be used /// with an async `Store`!.