Macro rustc_arena::declare_arena
source · pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) { ... }
Expand description
Declare an Arena containing one dropless arena and many typed arenas (the
types of the typed arenas are specified by the arguments).
There are three cases of interest.
- Types that are
Copy: these need not be specified in the arguments. They will use theDroplessArena. - Types that are
!Copyand!Drop: these must be specified in the arguments. An emptyTypedArenawill be created for each one, but theDroplessArenawill always be used and theTypedArenawill stay empty. This is odd but harmless, because an empty arena allocates no memory. - Types that are
!CopyandDrop: these must be specified in the arguments. TheTypedArenawill be used for them.