Skip to content

Commit

Permalink
Unrolled build for rust-lang#136865
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#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. rust-lang#136328 (comment).

### 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`````
  • Loading branch information
rust-timer authored Mar 5, 2025
2 parents 4559163 + 4f2a3dc commit e57dbe7
Show file tree
Hide file tree
Showing 67 changed files with 143 additions and 177 deletions.
17 changes: 15 additions & 2 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2412,8 +2412,9 @@ impl<'test> TestCx<'test> {
let rust_src_dir = rust_src_dir.read_link().unwrap_or(rust_src_dir.to_path_buf());
normalize_path(&rust_src_dir.join("library"), "$SRC_DIR_REAL");

// eg. /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui
normalize_path(&self.config.build_test_suite_root, "$TEST_BUILD_DIR");
// eg.
// /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui/<test_dir>/$name.$revision.$mode/
normalize_path(&self.output_base_dir(), "$TEST_BUILD_DIR");
// eg. /home/user/rust/build
normalize_path(&self.config.build_root, "$BUILD_DIR");

Expand All @@ -2434,6 +2435,18 @@ impl<'test> TestCx<'test> {
.into_owned();

normalized = Self::normalize_platform_differences(&normalized);

// Normalize long type name hash.
normalized =
static_regex!(r"\$TEST_BUILD_DIR/(?P<filename>[^\.]+).long-type-(?P<hash>\d+).txt")
.replace_all(&normalized, |caps: &Captures<'_>| {
format!(
"$TEST_BUILD_DIR/{filename}.long-type-$LONG_TYPE_HASH.txt",
filename = &caps["filename"]
)
})
.into_owned();

normalized = normalized.replace("\t", "\\t"); // makes tabs visible

// Remove test annotations like `//~ ERROR text` from the output,
Expand Down
4 changes: 2 additions & 2 deletions tests/ui-fulldeps/codegen-backend/hotplug.bindep.stdout
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$TEST_BUILD_DIR/codegen-backend/hotplug.bindep/libhotplug.rlib: $DIR/hotplug.rs $TEST_BUILD_DIR/codegen-backend/hotplug.bindep/auxiliary/libthe_backend.so
$TEST_BUILD_DIR/libhotplug.rlib: $DIR/hotplug.rs $TEST_BUILD_DIR/auxiliary/libthe_backend.so

$DIR/hotplug.rs:
$TEST_BUILD_DIR/codegen-backend/hotplug.bindep/auxiliary/libthe_backend.so:
$TEST_BUILD_DIR/auxiliary/libthe_backend.so:
2 changes: 1 addition & 1 deletion tests/ui-fulldeps/codegen-backend/hotplug.dep.stdout
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$TEST_BUILD_DIR/codegen-backend/hotplug.dep/libhotplug.rlib: $DIR/hotplug.rs
$TEST_BUILD_DIR/libhotplug.rlib: $DIR/hotplug.rs

$DIR/hotplug.rs:
6 changes: 3 additions & 3 deletions tests/ui/crate-loading/crateresolve1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ error[E0464]: multiple candidates for `rlib` dependency `crateresolve1` found
LL | extern crate crateresolve1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-1.somelib
= note: candidate #2: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-2.somelib
= note: candidate #3: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-3.somelib
= note: candidate #1: $TEST_BUILD_DIR/auxiliary/libcrateresolve1-1.somelib
= note: candidate #2: $TEST_BUILD_DIR/auxiliary/libcrateresolve1-2.somelib
= note: candidate #3: $TEST_BUILD_DIR/auxiliary/libcrateresolve1-3.somelib

error: aborting due to 1 previous error

Expand Down
6 changes: 3 additions & 3 deletions tests/ui/crate-loading/crateresolve2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ error[E0464]: multiple candidates for `rmeta` dependency `crateresolve2` found
LL | extern crate crateresolve2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-1.rmeta
= note: candidate #2: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-2.rmeta
= note: candidate #3: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-3.rmeta
= note: candidate #1: $TEST_BUILD_DIR/auxiliary/libcrateresolve2-1.rmeta
= note: candidate #2: $TEST_BUILD_DIR/auxiliary/libcrateresolve2-2.rmeta
= note: candidate #3: $TEST_BUILD_DIR/auxiliary/libcrateresolve2-3.rmeta

error: aborting due to 1 previous error

Expand Down
6 changes: 3 additions & 3 deletions tests/ui/diagnostic-width/E0271.ascii.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
--> $DIR/E0271.rs:20:5
--> $DIR/E0271.rs:19:5
|
LL | / Box::new(
LL | | Ok::<_, ()>(
Expand All @@ -10,12 +10,12 @@ LL | | )
| |_____^ type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
|
note: expected this to be `Foo`
--> $DIR/E0271.rs:10:18
--> $DIR/E0271.rs:9:18
|
LL | type Error = E;
| ^
= note: required for the cast from `Box<Result<..., ()>>` to `Box<...>`
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/E0271.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
1 change: 0 additions & 1 deletion tests/ui/diagnostic-width/E0271.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ revisions: ascii unicode
//@[ascii] compile-flags: --diagnostic-width=40 -Zwrite-long-types-to-disk=yes
//@[unicode] compile-flags: -Zunstable-options --error-format=human-unicode --diagnostic-width=40 -Zwrite-long-types-to-disk=yes
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"
trait Future {
type Error;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/diagnostic-width/E0271.unicode.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
╭▸ $DIR/E0271.rs:20:5
╭▸ $DIR/E0271.rs:19:5
LL │ ┏ Box::new(
LL │ ┃ Ok::<_, ()>(
Expand All @@ -10,12 +10,12 @@ LL │ ┃ )
│ ┗━━━━━┛ type mismatch resolving `<Result<..., ()> as Future>::Error == Foo`
╰╴
note: expected this to be `Foo`
╭▸ $DIR/E0271.rs:10:18
╭▸ $DIR/E0271.rs:9:18
LL │ type Error = E;
│ ━
├ note: required for the cast from `Box<Result<..., ()>>` to `Box<...>`
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/E0271.long-type-$LONG_TYPE_HASH.txt'
╰ note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/diagnostic-width/binop.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"
type A = (i32, i32, i32, i32);
type B = (A, A, A, A);
type C = (B, B, B, B);
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/binop.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
error[E0369]: cannot add `(..., ..., ..., ...)` to `(..., ..., ..., ...)`
--> $DIR/binop.rs:10:7
--> $DIR/binop.rs:8:7
|
LL | x + x;
| - ^ - (..., ..., ..., ...)
| |
| (..., ..., ..., ...)
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/binop.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0600]: cannot apply unary operator `!` to type `(..., ..., ..., ...)`
--> $DIR/binop.rs:14:5
--> $DIR/binop.rs:12:5
|
LL | !x;
| ^^ cannot apply unary operator `!`
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/binop.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 2 previous errors
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/diagnostic-width/long-E0308.ascii.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/long-E0308.rs:48:9
--> $DIR/long-E0308.rs:45:9
|
LL | let x: Atype<
| _____________-
Expand All @@ -20,11 +20,11 @@ LL | | ))))))))))))))))))))))))))))));
|
= note: expected struct `Atype<Btype<..., i32>, i32>`
found enum `Result<Result<..., _>, _>`
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
--> $DIR/long-E0308.rs:61:26
--> $DIR/long-E0308.rs:58:26
|
LL | ))))))))))))))))) == Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(O...
| __________________________^
Expand All @@ -36,11 +36,11 @@ LL | | ))))))))))))))))))))))));
|
= note: expected enum `Option<Result<Option<...>, _>>`
found enum `Result<Result<..., _>, _>`
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
--> $DIR/long-E0308.rs:92:9
--> $DIR/long-E0308.rs:89:9
|
LL | let x: Atype<
| ____________-
Expand All @@ -56,11 +56,11 @@ LL | | > = ();
|
= note: expected struct `Atype<Btype<..., i32>, i32>`
found unit type `()`
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
--> $DIR/long-E0308.rs:95:17
--> $DIR/long-E0308.rs:92:17
|
LL | let _: () = Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(O...
| ____________--___^
Expand All @@ -74,7 +74,7 @@ LL | | ))))))))))))))))))))))));
|
= note: expected unit type `()`
found enum `Result<Result<..., _>, _>`
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 4 previous errors
Expand Down
3 changes: 0 additions & 3 deletions tests/ui/diagnostic-width/long-E0308.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
//@[ascii] compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
//@[unicode] compile-flags: -Zunstable-options --json=diagnostic-unicode --diagnostic-width=60 -Zwrite-long-types-to-disk=yes

// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"

mod a {
// Force the "short path for unique types" machinery to trip up
pub struct Atype;
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/diagnostic-width/long-E0308.unicode.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
╭▸ $DIR/long-E0308.rs:48:9
╭▸ $DIR/long-E0308.rs:45:9
LL │ let x: Atype<
│ ┌─────────────┘
Expand All @@ -20,11 +20,11 @@ LL │ ┃ ))))))))))))))))))))))))))))));
├ note: expected struct `Atype<Btype<..., i32>, i32>`
│ found enum `Result<Result<..., _>, _>`
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
╰ note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
╭▸ $DIR/long-E0308.rs:61:26
╭▸ $DIR/long-E0308.rs:58:26
LL │ ))))))))))))))))) == Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(…
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Expand All @@ -36,11 +36,11 @@ LL │ ┃ ))))))))))))))))))))))));
├ note: expected enum `Option<Result<Option<...>, _>>`
│ found enum `Result<Result<..., _>, _>`
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
╰ note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
╭▸ $DIR/long-E0308.rs:92:9
╭▸ $DIR/long-E0308.rs:89:9
LL │ let x: Atype<
│ ┌────────────┘
Expand All @@ -56,11 +56,11 @@ LL │ │ > = ();
├ note: expected struct `Atype<Btype<..., i32>, i32>`
│ found unit type `()`
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
╰ note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
╭▸ $DIR/long-E0308.rs:95:17
╭▸ $DIR/long-E0308.rs:92:17
LL │ let _: () = Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(…
│ ┏━━━━━━━━━━━━┬─━━━┛
Expand All @@ -74,7 +74,7 @@ LL │ ┃ ))))))))))))))))))))))));
├ note: expected unit type `()`
│ found enum `Result<Result<..., _>, _>`
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
├ note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0308.long-type-$LONG_TYPE_HASH.txt'
╰ note: consider using `--verbose` to print the full type name to the console

error: aborting due to 4 previous errors
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/diagnostic-width/long-E0529.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"

type A = (i32, i32, i32, i32);
type B = (A, A, A, A);
type C = (B, B, B, B);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0529.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0529]: expected an array or slice, found `(..., ..., ..., ...)`
--> $DIR/long-E0529.rs:10:9
--> $DIR/long-E0529.rs:9:9
|
LL | let [] = x;
| ^^ pattern cannot match with input type `(..., ..., ..., ...)`
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0529.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/diagnostic-width/long-E0609.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"

type A = (i32, i32, i32, i32);
type B = (A, A, A, A);
type C = (B, B, B, B);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0609.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0609]: no field `field` on type `(..., ..., ..., ...)`
--> $DIR/long-E0609.rs:10:7
--> $DIR/long-E0609.rs:9:7
|
LL | x.field;
| ^^^^^ unknown field
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0609.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/diagnostic-width/long-E0614.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"

type A = (i32, i32, i32, i32);
type B = (A, A, A, A);
type C = (B, B, B, B);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0614.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0614]: type `(..., ..., ..., ...)` cannot be dereferenced
--> $DIR/long-E0614.rs:10:5
--> $DIR/long-E0614.rs:9:5
|
LL | *x;
| ^^ can't be dereferenced
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0614.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/diagnostic-width/long-E0618.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"

type A = (i32, i32, i32, i32);
type B = (A, A, A, A);
type C = (B, B, B, B);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/diagnostic-width/long-E0618.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0618]: expected function, found `(..., ..., ..., ...)`
--> $DIR/long-E0618.rs:10:5
--> $DIR/long-E0618.rs:9:5
|
LL | fn foo(x: D) {
| - `x` has type `(..., ..., ..., ...)`
Expand All @@ -8,7 +8,7 @@ LL | x();
| |
| call expression requires function
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0618.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/diagnostic-width/long-e0277.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// The regex below normalizes the long type file name to make it suitable for compare-modes.
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"
type A = (i32, i32, i32, i32);
type B = (A, A, A, A);
type C = (B, B, B, B);
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/diagnostic-width/long-e0277.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
error[E0277]: the trait bound `(..., ..., ..., ...): Trait` is not satisfied
--> $DIR/long-e0277.rs:14:21
--> $DIR/long-e0277.rs:12:21
|
LL | require_trait::<D>();
| ^ unsatisfied trait bound
|
= help: the trait `Trait` is not implemented for `(..., ..., ..., ...)`
help: this trait has no implementations, consider adding one
--> $DIR/long-e0277.rs:9:1
--> $DIR/long-e0277.rs:7:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `require_trait`
--> $DIR/long-e0277.rs:11:21
--> $DIR/long-e0277.rs:9:21
|
LL | fn require_trait<T: Trait>() {}
| ^^^^^ required by this bound in `require_trait`
= note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
= note: the full name for the type has been written to '$TEST_BUILD_DIR/long-e0277.long-type-$LONG_TYPE_HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error: aborting due to 1 previous error
Expand Down
Loading

0 comments on commit e57dbe7

Please sign in to comment.