From 8758f30a7d62513cb3caea30000850c9742f2438 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 16 May 2021 17:56:45 -0700 Subject: [PATCH] Fix type_length_limit example. --- src/attributes/limits.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/attributes/limits.md b/src/attributes/limits.md index 446c33093..517637e5d 100644 --- a/src/attributes/limits.md +++ b/src/attributes/limits.md @@ -42,19 +42,14 @@ to set the limit based on the number of type substitutions. > Note: The default in `rustc` is 1048576. - - -```rust,compile_fail,ignore -#![type_length_limit = "8"] +```rust,compile_fail +#![type_length_limit = "4"] fn f(x: T) {} // This fails to compile because monomorphizing to -// `f::<(i32, i32, i32, i32, i32, i32, i32, i32, i32)>>` requires more -// than 8 type elements. -f((1, 2, 3, 4, 5, 6, 7, 8, 9)); +// `f::<((((i32,), i32), i32), i32)>` requires more than 4 type elements. +f(((((1,), 2), 3), 4)); ``` [_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax