Add a comment for arena_types!
This commit is contained in:
parent
e77096b08c
commit
42145659fd
|
@ -6,6 +6,15 @@ use std::cell::RefCell;
|
|||
use std::marker::PhantomData;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
/// This declares a list of types which can be allocated by `Arena`.
|
||||
///
|
||||
/// The `few` modifier will cause allocation to use the shared arena and recording the destructor.
|
||||
/// This is faster and more memory efficient if there's only a few allocations of the type.
|
||||
/// Leaving `few` out will cause the type to get its own dedicated `TypedArena` which is
|
||||
/// faster and more memory efficient if there is lots of allocations.
|
||||
///
|
||||
/// Specifying the `decode` modifier will add decode impls for &T and &[T] where T is the type
|
||||
/// listed. These impls will appear in the implement_ty_decoder! macro.
|
||||
#[macro_export]
|
||||
macro_rules! arena_types {
|
||||
($macro:path, $args:tt, $tcx:lifetime) => (
|
||||
|
|
Loading…
Reference in New Issue