rust/compiler/rustc_trait_selection/src/traits
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
..
error_reporting Rollup merge of #126403 - compiler-errors:better-type-errors, r=lcnr 2024-07-03 03:03:14 -04:00
query Rename a bunch of things 2024-06-21 12:32:05 -04:00
select Uplift fast rejection to new solver 2024-06-30 00:27:35 -04:00
specialize Only compute specializes query if specialization is enabled in the crate of the specialized impl 2024-06-07 15:58:50 -04:00
auto_trait.rs Add Ty to ConstKind::Value 2024-06-05 22:25:41 +01:00
coherence.rs Uplift fast rejection to new solver 2024-06-30 00:27:35 -04:00
const_evaluatable.rs Add Ty to ConstKind::Value 2024-06-05 22:25:41 +01:00
engine.rs Nits and formatting 2024-06-03 10:02:08 -04:00
fulfill.rs Fully implement ConstArgHasType 2024-06-05 22:25:41 +01:00
misc.rs Opt-in diagnostics reporting to avoid doing extra work in the new solver 2024-06-03 09:27:52 -04:00
mod.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
normalize.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
object_safety.rs Make queries more explicit 2024-06-27 12:03:57 -04:00
outlives_bounds.rs Remove extern crate rustc_middle from rustc_trait_selection. 2024-05-13 08:20:18 +10:00
project.rs Split out IntoIterator and non-Iterator constructors for AliasTy/AliasTerm/TraitRef/projection 2024-06-24 11:28:21 -04:00
structural_match.rs Remove extern crate rustc_middle from rustc_trait_selection. 2024-05-13 08:20:18 +10:00
structural_normalize.rs Nits and formatting 2024-06-03 10:02:08 -04:00
util.rs Make queries more explicit 2024-06-27 12:03:57 -04:00
vtable.rs Fix spans 2024-07-02 15:48:48 -04:00
wf.rs Auto merge of #123737 - compiler-errors:alias-wf, r=lcnr 2024-07-03 03:48:06 +00:00