@@ -4,10 +4,12 @@ The following [attributes] affect compile-time limits.
44
55## The ` recursion_limit ` attribute
66
7- The * ` recursion_limit ` attribute* may be applied at the crate level to set the
7+ The * ` recursion_limit ` attribute* may be applied at the [ crate] level to set the
88maximum depth for potentially infinitely-recursive compile-time operations
99like auto-dereference or macro expansion. It uses the [ _ MetaNameValueStr_ ]
10- syntax to specify the recursion depth. The default is 64.
10+ syntax to specify the recursion depth.
11+
12+ > Note: The default in ` rustc ` is 64.
1113
1214``` rust,ignore
1315#![recursion_limit = "4"]
2628
2729## The ` type_length_limit ` attribute
2830
29- The * ` type_length_limit ` attribute* limits the maximum size of a type
30- constructed during monomorphization. It is applied at the crate level, and
31- uses the [ _ MetaNameValueStr_ ] syntax to set the limit based on the number of
32- type substitutions within the type. The default value is 1048576.
31+ The * ` type_length_limit ` attribute* limits the maximum number of type
32+ substitutions made when constructing a concrete type during monomorphization.
33+ It is applied at the [ crate] level, and uses the [ _ MetaNameValueStr_ ] syntax
34+ to set the limit based on the number of type substitutions.
35+
36+ > Note: The default in ` rustc ` is 1048576.
3337
3438``` rust,ignore
3539#![type_length_limit = "8"]
@@ -44,5 +48,6 @@ struct C;
4448drop::<Option<A>>(None);
4549```
4650
47- [ attributes ] : attributes.html
4851[ _MetaNameValueStr_ ] : attributes.html#meta-item-attribute-syntax
52+ [ attributes ] : attributes.html
53+ [ crate ] : crates-and-source-files.html
0 commit comments