rust/tests
bors c2ec7532ee Auto merge of #142706 - fee1-dead-contrib:push-zsznlqyrzsqo, r=oli-obk
completely deduplicate `Visitor` and `MutVisitor`

r? oli-obk

This closes rust-lang/rust#127615.

### Discussion

> * Give every `MutVisitor::visit_*` method a corresponding `flat_map_*` method.

Not every AST node exists in a location where they can be mapped to multiple instances of themselves. Not every AST node exists in a location where they can be removed from existence (e.g. `filter_map_expr`). I don't think this is doable.

> * Give every `MutVisitor::visit_*` method a corresponding `Visitor` method and vice versa

The only three remaining method-level asymmetries after this PR are `visit_stmt` and `visit_nested_use_tree` (only on `Visitor`) and `visit_span` (only on `MutVisitor`).

`visit_stmt` doesn't seem applicable to `MutVisitor` because `walk_flat_map_stmt_kind` will ask `flat_map_item` / `filter_map_expr` to potentially turn a single `Stmt` to multiple based on what a visitor wants. So only using `flat_map_stmt` seems appropriate.

`visit_nested_use_tree` is used for `rustc_resolve` to track stuff. Not useful for `MutVisitor` for now.

`visit_span` is currently not used for `MutVisitor` already, it was just kept in case we want to revive rust-lang/rust#127241. cc `@cjgillot` maybe we could remove for now and re-insert later if we find a use-case? It does involve some extra effort to maintain.

* Remaining FIXMEs

`visit_lifetime` has an extra param for `Visitor` that's not in `MutVisitor`. This is again something only used by `rustc_resolve`. I think we can keep that symmetry for now.
2025-06-22 14:03:44 +00:00
..
assembly Rollup merge of #140920 - RalfJung:target-feature-unification, r=nnethercote,WaffleLapkin 2025-06-20 02:50:38 -04:00
auxiliary aux: add {Meta,Pointee}Sized bounds to minicore 2025-06-16 23:04:33 +00:00
codegen remove asm_goto feature annotation, for it is now stabilized 2025-06-21 23:26:56 +02:00
codegen-units tests: {Meta,Pointee}Sized in non-minicore tests 2025-06-16 23:04:33 +00:00
coverage coverage: Revert "unused local file IDs" due to empty function names 2025-05-27 23:33:29 +10:00
coverage-run-rustdoc Update coverage-run-rustdoc output 2025-03-28 10:35:53 +01:00
crashes Auto merge of #142546 - cjgillot:reachable-jump, r=compiler-errors 2025-06-21 18:54:29 +00:00
debuginfo tests: {Meta,Pointee}Sized in non-minicore tests 2025-06-16 23:04:33 +00:00
incremental Rollup merge of #142485 - mu001999-contrib:dead-code/adt-pattern, r=petrochenkov 2025-06-20 23:25:55 -04:00
mir-opt Rollup merge of #142571 - cjgillot:borrowed-classes, r=oli-obk 2025-06-20 23:25:55 -04:00
pretty Rollup merge of #134847 - dtolnay:asymmetrical, r=fmease 2025-06-13 05:16:54 +02:00
run-make Rollup merge of #142845 - dpaoliello:textrel-on-minimal-lib, r=jieyouxu 2025-06-22 08:49:07 +02:00
rustdoc rustdoc: PointeeSized bounds with extern types 2025-06-16 23:04:36 +00:00
rustdoc-gui rustdoc: make srcIndex no longer a global variable 2025-06-16 20:22:24 -05:00
rustdoc-js yeet CanonicalVarInfo 2025-05-23 12:10:53 +00:00
rustdoc-js-std add doc(alias("AsciiChar")) to core::ascii::Char 2025-06-20 11:11:51 -05:00
rustdoc-json rustdoc_json: represent generic args consistently. 2025-06-21 13:52:46 +10:00
rustdoc-ui rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
ui Rollup merge of #142776 - dtolnay:hirattrstyle2, r=jdonszelmann 2025-06-22 08:49:05 +02:00
ui-fulldeps Auto merge of #142706 - fee1-dead-contrib:push-zsznlqyrzsqo, r=oli-obk 2025-06-22 14:03:44 +00:00
COMPILER_TESTS.md