From 098ba7f86ec18efe9d7936b8742dabf889ce45cd Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 14 Jul 2024 15:03:32 -0400 Subject: [PATCH 1/2] Suppress type length limit test and note that it is not enforced --- src/attributes/limits.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/attributes/limits.md b/src/attributes/limits.md index 65cb55b43..6c4ae38e3 100644 --- a/src/attributes/limits.md +++ b/src/attributes/limits.md @@ -35,6 +35,12 @@ a!{} ## The `type_length_limit` attribute +> [!NOTE] +> This limit is only enforced when the nightly `-Zenforce-type-length-limit` +> flag is active. +> +> For more information, see . + The *`type_length_limit` attribute* limits the maximum number of type substitutions made when constructing a concrete type during monomorphization. It is applied at the [crate] level, and uses the [_MetaNameValueStr_] syntax @@ -42,7 +48,7 @@ to set the limit based on the number of type substitutions. > Note: The default in `rustc` is 1048576. -```rust,compile_fail +```rust,ignore #![type_length_limit = "4"] fn f(x: T) {} From 509c06ed650692efb591f9ccb7386174654a081c Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 15 Jul 2024 10:47:59 -0700 Subject: [PATCH 2/2] Don't use admonition syntax. The reference isn't quite ready for this via the extension. --- src/attributes/limits.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/attributes/limits.md b/src/attributes/limits.md index 6c4ae38e3..79f292a31 100644 --- a/src/attributes/limits.md +++ b/src/attributes/limits.md @@ -35,9 +35,7 @@ a!{} ## The `type_length_limit` attribute -> [!NOTE] -> This limit is only enforced when the nightly `-Zenforce-type-length-limit` -> flag is active. +> **Note**: This limit is only enforced when the nightly `-Zenforce-type-length-limit` flag is active. > > For more information, see .