diff --git a/compiler/rustc_mir/src/monomorphize/collector.rs b/compiler/rustc_mir/src/monomorphize/collector.rs index 9ea103463d5eb..0d6814a8d9bf9 100644 --- a/compiler/rustc_mir/src/monomorphize/collector.rs +++ b/compiler/rustc_mir/src/monomorphize/collector.rs @@ -493,7 +493,7 @@ fn check_type_length_limit<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) { }; let msg = format!( "reached the type-length limit while instantiating `{}`", - shrink(instance.to_string(), 32, 32) + shrink(instance.to_string(), 256, 256) ); let mut diag = tcx.sess.struct_span_fatal(tcx.def_span(instance.def_id()), &msg); diag.note(&format!( diff --git a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr index 6229d90d4b477..b427f890affbd 100644 --- a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr +++ b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr @@ -1,4 +1,4 @@ -error: reached the type-length limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(...))))))))))))))) as Foo>::recurse` +error: reached the type-length limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(), &()), &(&(), &())), &(&(&(), &()), &(&(), &()))), &(&(&(&(), &()), &(&(), &())), &(&(&(), &()), &(&(), &())))), &(&(&(&(&(), &()), &(&(), &())), &(&(&(), &()), &(&(), &()))), &(&(&(&(), &()), &(&(), &())), &(&(&()..., &())), &(&(&(), &()), &(&(), &()))), &(&(&(&(), &()), &(&(), &())), &(&(&(), &()), &(&(), &())))), &(&(&(&(&(), &()), &(&(), &())), &(&(&(), &()), &(&(), &()))), &(&(&(&(), &()), &(&(), &())), &(&(&(), &()), &(&(), &()))))))))))))))))))) as Foo>::recurse` --> $DIR/issue-37311.rs:15:5 | LL | fn recurse(&self) { diff --git a/src/test/ui/type_length_limit.stderr b/src/test/ui/type_length_limit.stderr index f12f259d2f6e2..e1ee9e67b3117 100644 --- a/src/test/ui/type_length_limit.stderr +++ b/src/test/ui/type_length_limit.stderr @@ -1,4 +1,4 @@ -error: reached the type-length limit while instantiating `std::mem::drop::>` +error: reached the type-length limit while instantiating `std::mem::drop::>` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub fn drop(_x: T) {}