Skip to content

Commit e4a384f

Browse files
ehusstraviscross
authored andcommitted
Move type_length_limit notes to the intro
1 parent 3013b84 commit e4a384f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/attributes/limits.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ a!{}
4343
r[attributes.limits.type_length_limit]
4444
## The `type_length_limit` attribute
4545

46+
r[attributes.limits.type_length_limit.intro]
47+
The *`type_length_limit` attribute* limits the maximum number of type substitutions made when constructing a concrete type during monomorphization.
48+
4649
> [!NOTE]
47-
> This limit is only enforced when the nightly `-Zenforce-type-length-limit` flag is active.
50+
> In `rustc` this limit is only enforced when the nightly `-Zenforce-type-length-limit` flag is active.
4851
>
4952
> For more information, see <https://github.com/rust-lang/rust/pull/127670>.
5053
51-
r[attributes.limits.type_length_limit.intro]
52-
The *`type_length_limit` attribute* limits the maximum number of type substitutions made when constructing a concrete type during monomorphization.
53-
5454
> [!EXAMPLE]
5555
> <!-- ignore: not enforced without nightly flag -->
5656
> ```rust,ignore
@@ -63,11 +63,11 @@ The *`type_length_limit` attribute* limits the maximum number of type substituti
6363
> f(((((1,), 2), 3), 4));
6464
> ```
6565
66-
r[attributes.limits.type_length_limit.syntax]
67-
It is applied at the [crate] level, and uses the [MetaNameValueStr] syntax to set the limit based on the number of type substitutions.
68-
6966
> [!NOTE]
7067
> The default in `rustc` is 1048576.
7168
69+
r[attributes.limits.type_length_limit.syntax]
70+
It is applied at the [crate] level, and uses the [MetaNameValueStr] syntax to set the limit based on the number of type substitutions.
71+
7272
[attributes]: ../attributes.md
7373
[crate]: ../crates-and-source-files.md

0 commit comments

Comments
 (0)