Skip to main content

MAX_RUST_API_NESTING

Constant MAX_RUST_API_NESTING 

Source
pub const MAX_RUST_API_NESTING: usize = 64;
Expand description

How many modules and item macros rust_collect_api_facts descends through, counted together. Real code nests a handful; past the bound the items are left undescribed rather than recursing further, because each level costs a stack frame (a stack overflow aborts the process) and copies the module path, so a file of thousands of nested modules would otherwise take quadratic time and memory.