Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_mir/src/monomorphize/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/type_length_limit.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: reached the type-length limit while instantiating `std::mem::drop::<Option<((((((G,... G), (G, G, G), (G, G, G))))))>>`
error: reached the type-length limit while instantiating `std::mem::drop::<Option<((((((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G))), (((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G))), (((G, G, G), (G...), ((G, G, G), (G, G, G), (G, G, G))), (((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G))), (((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G)), ((G, G, G), (G, G, G), (G, G, G))))))>>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub fn drop<T>(_x: T) {}
Expand Down