rust/tests/ui-fulldeps
许杰友 Jieyou Xu (Joe) 9aaf46ea23
Rollup merge of #136865 - jieyouxu:long-type-path-compare-mode, r=lqd
Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes

Fixes #136510.

### Summary

- Whereas previously `$TEST_BUILD_DIR` is a normalization of `/path/to/build/test/<test_suite_name>/`, we now more deeply normalize. `$TEST_BUILD_DIR` now becomes a normalization of `/path/to/build/test/<test_suite_name>/<subdirs>/$name.$revision.$compare_mode.$debugger/` to normalize away path name differences when `--compare-mode` and/or `--debugger` are specified.
- We also centralize the normalization of long type name hashes

cf. https://github.com/rust-lang/rust/pull/136328#discussion_r1936760908.

### Review advice

- Best reviewed commit-by-commit.
- Split into 3 commits:
    - **Commit 1**: compiletest changes to have `$TEST_BUILD_DIR` more deeply normalize.
    - **Commit 2**: remove per-test hacks for long type path hash normalizations, and rebless tests *specifically* affected by that.
    - **Commit 3**: rebless other tests that were changed as a side-effect of deeper `$TEST_BUILD_DIR` normalizations.

**Commit 2** is created via first finding tests that try to perform long type file hash normalizations on an ad hoc, per-test basis:

```
rg --no-ignore -l --no-ignore -F -e "long-type" tests/ui/**/*.rs
```

<details>
<summary>Tests with ad hoc long-type hash normalizations</summary>

```
tests/ui/type_length_limit.rs
tests/ui/traits/on_unimplemented_long_types.rs
tests/ui/regions/issue-102374.rs
tests/ui/recursion/recursion.rs
tests/ui/recursion/issue-83150.rs
tests/ui/recursion/issue-23122-2.rs
tests/ui/methods/inherent-bound-in-probe.rs
tests/ui/issues/issue-67552.rs
tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
tests/ui/issues/issue-20413.rs
tests/ui/issues/issue-8727.rs
tests/ui/infinite/infinite-instantiation.rs
tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs
tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs
tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs
tests/ui/error-codes/E0275.rs
tests/ui/diagnostic-width/secondary-label-with-long-type.rs
tests/ui/diagnostic-width/long-e0277.rs
tests/ui/diagnostic-width/non-copy-type-moved.rs
tests/ui/diagnostic-width/long-E0308.rs
tests/ui/diagnostic-width/E0271.rs
tests/ui/diagnostic-width/binop.rs
```
</details>

These ad hoc normalizations were removed, and they are reblessed.

r? `````@lqd`````
2025-03-05 21:46:35 +08:00
..
auxiliary Extract ui-fulldeps expression parser into module 2024-12-21 18:48:13 -08:00
codegen-backend tests: manually rebless tests/ui-fulldeps/codegen-backend/hotplug.rs 2025-03-04 00:21:02 +08:00
fluent-messages Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
internal-lints Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
lexer Add test to check unicode identifier version 2024-12-09 06:23:59 -08:00
mod_dir_simple [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
session-diagnostic Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
stable-mir Make CrateItem::body() function return an option 2025-03-04 17:46:40 -08:00
try-from-u32 Add a macro that derives TryFrom<u32> for fieldless enums 2024-10-26 20:19:53 +11:00
compiler-calls.rs Remove RunCompiler 2025-01-23 09:38:58 +00:00
deriving-global.rs Improve dead code analysis 2024-07-04 22:05:00 +08:00
deriving-hygiene.rs Improve dead code analysis 2024-07-04 22:05:00 +08:00
dropck-tarena-cycle-checked.rs Remove ignore-stage1 that was added when changing error count msg 2024-01-06 12:53:06 +01:00
dropck-tarena-cycle-checked.stderr Remove ignore-stage1 that was added when changing error count msg 2024-01-06 12:53:06 +01:00
dropck-tarena-unsound-drop.rs Remove ignore-stage1 that was added when changing error count msg 2024-01-06 12:53:06 +01:00
dropck-tarena-unsound-drop.stderr Remove ignore-stage1 that was added when changing error count msg 2024-01-06 12:53:06 +01:00
dropck_tarena_sound_drop.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
empty-struct-braces-derive.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
hash-stable-is-unstable.rs Don't test new error messages with the stage 0 compiler 2024-11-03 14:32:25 -08:00
hash-stable-is-unstable.stderr Don't test new error messages with the stage 0 compiler 2024-11-03 14:32:25 -08:00
lint-pass-macros.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
missing-rustc-driver-error.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
missing-rustc-driver-error.stderr Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
mod_dir_path_canonicalized.rs Make top-level rustc_parse functions fallible. 2024-06-05 10:38:03 +10:00
obtain-borrowck.rs Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00
obtain-borrowck.run.stdout Port tests/run-make-fulldeps/obtain-borrowck to ui-fulldeps 2024-06-07 00:41:31 +10:00
pathless-extern-unstable.rs Don't test new error messages with the stage 0 compiler 2024-11-03 14:32:25 -08:00
pathless-extern-unstable.stderr Don't test new error messages with the stage 0 compiler 2024-11-03 14:32:25 -08:00
pprust-expr-roundtrip.rs Switch pretty-printer roundtrip test to better parser 2024-12-21 18:49:51 -08:00
pprust-parenthesis-insertion.rs Rollup merge of #134834 - dtolnay:unnamedcall, r=compiler-errors 2024-12-27 18:43:05 -08:00
regions-mock-tcx.rs Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
run-compiler-twice.rs Remove the need to manually call set_using_internal_features 2025-01-23 09:38:58 +00:00
rustc_encodable_hygiene.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00