Skip to content
Permalink
Browse files

Add a comment for arena_types!

  • Loading branch information...
Zoxc committed May 19, 2019
1 parent e77096b commit 42145659fde86af0e9563c92949cf8f39db3f505
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/librustc/arena.rs
@@ -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) => (

0 comments on commit 4214565

Please sign in to comment.
You can’t perform that action at this time.