Skip to content

Commit 2c210e1

Browse files
committed
Update for review comments.
1 parent f46e1df commit 2c210e1

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/attributes/limits.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
88
maximum depth for potentially infinitely-recursive compile-time operations
99
like 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"]
@@ -26,10 +28,12 @@ a!{}
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;
4448
drop::<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

Comments
 (0)