Skip to content

Commit 098ba7f

Browse files
Suppress type length limit test and note that it is not enforced
1 parent 2a79314 commit 098ba7f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/attributes/limits.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,20 @@ a!{}
3535

3636
## The `type_length_limit` attribute
3737

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+
3844
The *`type_length_limit` attribute* limits the maximum number of type
3945
substitutions made when constructing a concrete type during monomorphization.
4046
It is applied at the [crate] level, and uses the [_MetaNameValueStr_] syntax
4147
to set the limit based on the number of type substitutions.
4248

4349
> Note: The default in `rustc` is 1048576.
4450
45-
```rust,compile_fail
51+
```rust,ignore
4652
#![type_length_limit = "4"]
4753
4854
fn f<T>(x: T) {}

0 commit comments

Comments
 (0)