diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-07-30 14:29:28 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-07-31 19:29:40 +1000 |
| commit | 94cc5bb9620cdee942b8b79e7026f622fcc695a0 (patch) | |
| tree | 43f2128d9cd2e6de697f2d1bf55024358a30db90 /compiler/rustc_infer/src | |
| parent | 606dcc0d2e54d260f67d8a91f8adaf797a4ed38a (diff) | |
| download | rust-94cc5bb9620cdee942b8b79e7026f622fcc695a0.tar.gz rust-94cc5bb9620cdee942b8b79e7026f622fcc695a0.zip | |
Streamline const folding/visiting.
Type folders can only modify a few "types of interest": `Binder`, `Ty`, `Predicate`, `Clauses`, `Region`, `Const`. Likewise for type visitors, but they can also visit errors (via `ErrorGuaranteed`). Currently the impls of `try_super_fold_with`, `super_fold_with`, and `super_visit_with` do more than they need to -- they fold/visit values that cannot contain any types of interest. This commit removes those unnecessary fold/visit operations, which makes these impls more similar to the impls for `Ty`. It also removes the now-unnecessary derived impls for the no-longer-visited types.
Diffstat (limited to 'compiler/rustc_infer/src')
0 files changed, 0 insertions, 0 deletions
