We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a79314 commit 098ba7fCopy full SHA for 098ba7f
src/attributes/limits.md
@@ -35,14 +35,20 @@ a!{}
35
36
## The `type_length_limit` attribute
37
38
+> [!NOTE]
39
+> This limit is only enforced when the nightly `-Zenforce-type-length-limit`
40
+> flag is active.
41
+>
42
+> For more information, see <https://github.com/rust-lang/rust/pull/127670>.
43
+
44
The *`type_length_limit` attribute* limits the maximum number of type
45
substitutions made when constructing a concrete type during monomorphization.
46
It is applied at the [crate] level, and uses the [_MetaNameValueStr_] syntax
47
to set the limit based on the number of type substitutions.
48
49
> Note: The default in `rustc` is 1048576.
50
-```rust,compile_fail
51
+```rust,ignore
52
#![type_length_limit = "4"]
53
54
fn f<T>(x: T) {}
0 commit comments