From 79f57ba2f9127d06ed6097f578e54881ea2d346e Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sat, 17 Nov 2018 11:04:37 -0500 Subject: [PATCH] Slight docs update --- qadapt-macro/src/lib.rs | 5 +++-- src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qadapt-macro/src/lib.rs b/qadapt-macro/src/lib.rs index c7418d1..aea5bb6 100644 --- a/qadapt-macro/src/lib.rs +++ b/qadapt-macro/src/lib.rs @@ -152,9 +152,10 @@ fn escape_return(ts: TokenStream) -> TokenStream { /// Set up the QADAPT allocator to trigger a panic if any allocations happen during /// calls to this function. /// -/// QADAPT will only track allocations in the thread that calls this function; +/// QADAPT will only track allocations in the current function call; /// if (for example) this function receives the results of an allocation in a -/// separate thread, QADAPT will not trigger a panic. +/// separate thread, or defers allocations via closure/Future, those results +/// will not trigger an error. #[proc_macro_attribute] pub fn allocate_panic(_attr: TokenStream, item: TokenStream) -> TokenStream { let mut protected_fn: Vec = Vec::new(); diff --git a/src/lib.rs b/src/lib.rs index 6c93c39..13db516 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,9 @@ -//! The Quick And Dirty Allocation Profiling Tool +//! # The Quick And Dirty Allocation Profiling Tool //! //! This allocator is a helper for writing high-performance code that is allocation/drop free; //! for functions annotated with `#[allocate_panic]`, QADAPT will detect when allocations/drops //! happen during their execution (and execution of any functions they call) and throw a -//! thread panic if this occurs. QADAPT-related code is stripped out during release builds, +//! thread panic if this occurs. QADAPT-related code is *stripped out during release builds*, //! so no worries about random allocations crashing in production. //! //! Currently this crate is Nightly-only, but will work once `const fn` is in Stable.