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 1
1
# Limits
2
2
3
+ r[ attributes.limits]
4
+
3
5
The following [ attributes] affect compile-time limits.
4
6
5
7
## The ` recursion_limit ` attribute
6
8
9
+ r[ attributes.limits.recursion_limits]
10
+
11
+ r[ attributes.limits.recursion_limits.application]
7
12
The * ` recursion_limit ` attribute* may be applied at the [ crate] level to set the
8
13
maximum 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_ ]
10
18
syntax to specify the recursion depth.
11
19
12
20
> Note: The default in ` rustc ` is 128.
35
43
36
44
## The ` type_length_limit ` attribute
37
45
46
+ r[ attributes.limits.type_length_limit]
47
+
38
48
> ** Note** : This limit is only enforced when the nightly ` -Zenforce-type-length-limit ` flag is active.
39
49
>
40
50
> For more information, see < https://github.com/rust-lang/rust/pull/127670 > .
41
51
52
+ r[ attributes.limits.type_length_limit.general]
42
53
The * ` type_length_limit ` attribute* limits the maximum number of type
43
54
substitutions made when constructing a concrete type during monomorphization.
55
+
56
+ r[ attributes.limits.type_length_limit.restriction]
44
57
It is applied at the [ crate] level, and uses the [ _ MetaNameValueStr_ ] syntax
45
58
to set the limit based on the number of type substitutions.
46
59
You can’t perform that action at this time.
0 commit comments