rust/compiler/rustc_ty_utils/src
bors c872a1418a Auto merge of #125507 - compiler-errors:type-length-limit, r=lcnr
Re-implement a type-size based limit

r? lcnr

This PR reintroduces the type length limit added in #37789, which was accidentally made practically useless by the caching changes to `Ty::walk` in #72412, which caused the `walk` function to no longer walk over identical elements.

Hitting this length limit is not fatal unless we are in codegen -- so it shouldn't affect passes like the mir inliner which creates potentially very large types (which we observed, for example, when the new trait solver compiles `itertools` in `--release` mode).

This also increases the type length limit from `1048576 == 2 ** 20` to `2 ** 24`, which covers all of the code that can be reached with craterbot-check. Individual crates can increase the length limit further if desired.

Perf regression is mild and I think we should accept it -- reinstating this limit is important for the new trait solver and to make sure we don't accidentally hit more type-size related regressions in the future.

Fixes #125460
2024-07-03 11:56:36 +00:00
..
abi.rs Fix FnMut/Fn shim for coroutine-closures that capture references 2024-06-29 17:38:02 -04:00
assoc.rs address review comments 2024-06-28 15:44:20 +00:00
common_traits.rs Start implementing needs_async_drop and related 2024-05-29 12:50:44 +03:00
consts.rs ScalarInt: size mismatches are a bug, do not delay the panic 2024-06-10 13:43:16 +02:00
errors.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
implied_bounds.rs Remove DefId from EarlyParamRegion (tedium/diagnostics) 2024-05-24 18:06:53 +01:00
instance.rs Miscellaneous renaming 2024-07-02 15:48:48 -04:00
layout.rs Uplift TypeRelation and Relate 2024-06-01 12:50:58 -04:00
layout_sanity_check.rs Remove extern crate rustc_middle from rustc_ty_utils. 2024-05-13 08:20:18 +10:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
needs_drop.rs Optimize async drop glue for some old types 2024-05-29 12:56:59 +03:00
opaque_types.rs Make body_owned_by return the body directly. 2024-05-29 10:04:08 +00:00
representability.rs Remove extern crate rustc_middle from rustc_ty_utils. 2024-05-13 08:20:18 +10:00
sig_types.rs Remove #[macro_use] extern crate tracing from rustc_ty_utils. 2024-05-23 18:02:17 +10:00
structural_match.rs remove StructuralEq trait 2024-01-24 07:56:23 +01:00
ty.rs Give EarlyBinder a tcx parameter 2024-05-26 20:04:05 -04:00