File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11# Limits
22
3+ r[ attributes.limits]
4+
35The following [ attributes] affect compile-time limits.
46
57## The ` recursion_limit ` attribute
68
9+ r[ attributes.limits.recursion_limits]
10+
11+ r[ attributes.limits.recursion_limits.application]
712The * ` recursion_limit ` attribute* may be applied at the [ crate] level to set the
813maximum depth for potentially infinitely-recursive compile-time operations
9- like macro expansion or auto-dereference. It uses the [ _ MetaNameValueStr_ ]
14+ like macro expansion or auto-dereference.
15+
16+ r[ attributes.limits.recursion_limits.syntax]
17+ It uses the [ _ MetaNameValueStr_ ]
1018syntax to specify the recursion depth.
1119
1220> Note: The default in ` rustc ` is 128.
3543
3644## The ` type_length_limit ` attribute
3745
46+ r[ attributes.limits.type_length_limit]
47+
3848> ** Note** : This limit is only enforced when the nightly ` -Zenforce-type-length-limit ` flag is active.
3949>
4050> For more information, see < https://github.com/rust-lang/rust/pull/127670 > .
4151
52+ r[ attributes.limits.type_length_limit.general]
4253The * ` type_length_limit ` attribute* limits the maximum number of type
4354substitutions made when constructing a concrete type during monomorphization.
55+
56+ r[ attributes.limits.type_length_limit.restriction]
4457It is applied at the [ crate] level, and uses the [ _ MetaNameValueStr_ ] syntax
4558to set the limit based on the number of type substitutions.
4659
You can’t perform that action at this time.
0 commit comments