Skip to content

Commit e2f0bdc

Browse files
authored
Merge pull request #1527 from compiler-errors/type-length-limit
Suppress type length limit test and note that it is not enforced
2 parents 2a79314 + 509c06e commit e2f0bdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/attributes/limits.md

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

3636
## The `type_length_limit` attribute
3737

38+
> **Note**: This limit is only enforced when the nightly `-Zenforce-type-length-limit` flag is active.
39+
>
40+
> For more information, see <https://github.com/rust-lang/rust/pull/127670>.
41+
3842
The *`type_length_limit` attribute* limits the maximum number of type
3943
substitutions made when constructing a concrete type during monomorphization.
4044
It is applied at the [crate] level, and uses the [_MetaNameValueStr_] syntax
4145
to set the limit based on the number of type substitutions.
4246

4347
> Note: The default in `rustc` is 1048576.
4448
45-
```rust,compile_fail
49+
```rust,ignore
4650
#![type_length_limit = "4"]
4751
4852
fn f<T>(x: T) {}

0 commit comments

Comments
 (0)