Limits
The following attributes affect compile-time limits.
The recursion_limit
attribute
The recursion_limit
attribute may be applied at the crate level to set the
maximum depth for potentially infinitely-recursive compile-time operations
like macro expansion or auto-dereference. It uses the MetaNameValueStr
syntax to specify the recursion depth.
Note: The default in
rustc
is 128.
The type_length_limit
attribute
The type_length_limit
attribute limits the maximum number of type
substitutions made when constructing a concrete type during monomorphization.
It is applied at the crate level, and uses the MetaNameValueStr syntax
to set the limit based on the number of type substitutions.
Note: The default in
rustc
is 1048576.