Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4e64180

Browse files
authoredJan 31, 2025
Rollup merge of #136310 - lqd:long-types, r=compiler-errors
normalize `*.long-type.txt` paths for compare-mode tests When using a compare mode, the name of the test + compare-mode is embedded in some of rustc's output, like the location where a long type `bla.long-type(-some-hash)?.txt` is written to. That generally makes these tests fail under all compare-modes. This PR fixes this by normalizing the compare-mode suffix away in the stderr output. We can also see some remnants of the long-removed `nll` compare mode being normalized away ^^. I did this to fix some failures with `--compare-mode next-solver` (but it also fixes them with e.g. `--compare-mode polonius` of course): - it makes 9 new tests pass with the new solver - however, 3 tests I changed here still don't pass with the new solver (IIRC there were 2 ICEs, and some duplicate errors for the 3rd one) (There was also one that triggered slowness in the new solver while triggering the long type failure, I'll mention this on zulip. )
2 parents e2a73ab + 4fcae66 commit 4e64180

23 files changed

+73
-55
lines changed
 

‎tests/ui/diagnostic-width/long-E0308.ascii.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/long-E0308.rs:46:9
2+
--> $DIR/long-E0308.rs:48:9
33
|
44
LL | let x: Atype<
55
| _____________-
@@ -20,11 +20,11 @@ LL | | ))))))))))))))))))))))))))))));
2020
|
2121
= note: expected struct `Atype<Btype<..., ...>, ...>`
2222
found enum `Result<Result<..., ...>, ...>`
23-
= note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.ascii/long-E0308.long-type-hash.txt'
23+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
2424
= note: consider using `--verbose` to print the full type name to the console
2525

2626
error[E0308]: mismatched types
27-
--> $DIR/long-E0308.rs:59:26
27+
--> $DIR/long-E0308.rs:61:26
2828
|
2929
LL | ))))))))))))))))) == Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(O...
3030
| __________________________^
@@ -36,11 +36,11 @@ LL | | ))))))))))))))))))))))));
3636
|
3737
= note: expected enum `Option<Result<..., ...>>`
3838
found enum `Result<Result<..., ...>, ...>`
39-
= note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.ascii/long-E0308.long-type-hash.txt'
39+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
4040
= note: consider using `--verbose` to print the full type name to the console
4141

4242
error[E0308]: mismatched types
43-
--> $DIR/long-E0308.rs:90:9
43+
--> $DIR/long-E0308.rs:92:9
4444
|
4545
LL | let x: Atype<
4646
| ____________-
@@ -56,11 +56,11 @@ LL | | > = ();
5656
|
5757
= note: expected struct `Atype<Btype<..., ...>, ...>`
5858
found unit type `()`
59-
= note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.ascii/long-E0308.long-type-hash.txt'
59+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
6060
= note: consider using `--verbose` to print the full type name to the console
6161

6262
error[E0308]: mismatched types
63-
--> $DIR/long-E0308.rs:93:17
63+
--> $DIR/long-E0308.rs:95:17
6464
|
6565
LL | let _: () = Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(O...
6666
| ____________--___^
@@ -74,7 +74,7 @@ LL | | ))))))))))))))))))))))));
7474
|
7575
= note: expected unit type `()`
7676
found enum `Result<Result<..., ...>, ...>`
77-
= note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.ascii/long-E0308.long-type-hash.txt'
77+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
7878
= note: consider using `--verbose` to print the full type name to the console
7979

8080
error: aborting due to 4 previous errors

‎tests/ui/diagnostic-width/long-E0308.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
//@ revisions: ascii unicode
22
//@[ascii] compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
33
//@[unicode] compile-flags: -Zunstable-options --json=diagnostic-unicode --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
4-
//@ normalize-stderr: "long-type-\d+" -> "long-type-hash"
4+
5+
// The regex below normalizes the long type file name to make it suitable for compare-modes.
6+
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"
57

68
mod a {
79
// Force the "short path for unique types" machinery to trip up

‎tests/ui/diagnostic-width/long-E0308.unicode.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
╭▸ $DIR/long-E0308.rs:46:9
2+
╭▸ $DIR/long-E0308.rs:48:9
33
44
LL │ let x: Atype<
55
│ ┌─────────────┘
@@ -20,11 +20,11 @@ LL │ ┃ ))))))))))))))))))))))))))))));
2020
2121
├ note: expected struct `Atype<Btype<..., ...>, ...>`
2222
│ found enum `Result<Result<..., ...>, ...>`
23-
├ note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.unicode/long-E0308.long-type-hash.txt'
23+
├ note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
2424
╰ note: consider using `--verbose` to print the full type name to the console
2525

2626
error[E0308]: mismatched types
27-
╭▸ $DIR/long-E0308.rs:59:26
27+
╭▸ $DIR/long-E0308.rs:61:26
2828
2929
LL │ ))))))))))))))))) == Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(…
3030
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┛
@@ -36,11 +36,11 @@ LL │ ┃ ))))))))))))))))))))))));
3636
3737
├ note: expected enum `Option<Result<..., ...>>`
3838
│ found enum `Result<Result<..., ...>, ...>`
39-
├ note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.unicode/long-E0308.long-type-hash.txt'
39+
├ note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
4040
╰ note: consider using `--verbose` to print the full type name to the console
4141

4242
error[E0308]: mismatched types
43-
╭▸ $DIR/long-E0308.rs:90:9
43+
╭▸ $DIR/long-E0308.rs:92:9
4444
4545
LL │ let x: Atype<
4646
│ ┌────────────┘
@@ -56,11 +56,11 @@ LL │ │ > = ();
5656
5757
├ note: expected struct `Atype<Btype<..., ...>, ...>`
5858
│ found unit type `()`
59-
├ note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.unicode/long-E0308.long-type-hash.txt'
59+
├ note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
6060
╰ note: consider using `--verbose` to print the full type name to the console
6161

6262
error[E0308]: mismatched types
63-
╭▸ $DIR/long-E0308.rs:93:17
63+
╭▸ $DIR/long-E0308.rs:95:17
6464
6565
LL │ let _: () = Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(…
6666
│ ┏━━━━━━━━━━━━┬─━━━┛
@@ -74,7 +74,7 @@ LL │ ┃ ))))))))))))))))))))))));
7474
7575
├ note: expected unit type `()`
7676
│ found enum `Result<Result<..., ...>, ...>`
77-
├ note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308.unicode/long-E0308.long-type-hash.txt'
77+
├ note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
7878
╰ note: consider using `--verbose` to print the full type name to the console
7979

8080
error: aborting due to 4 previous errors

‎tests/ui/diagnostic-width/non-copy-type-moved.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
2-
//@ normalize-stderr: "long-type-\d+" -> "long-type-hash"
2+
// The regex below normalizes the long type file name to make it suitable for compare-modes.
3+
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"
4+
35
type A = (String, String, String, String);
46
type B = (A, A, A, A);
57
type C = (B, B, B, B);

‎tests/ui/diagnostic-width/non-copy-type-moved.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0382]: use of moved value: `x`
2-
--> $DIR/non-copy-type-moved.rs:14:14
2+
--> $DIR/non-copy-type-moved.rs:16:14
33
|
44
LL | fn foo(x: D) {
55
| - move occurs because `x` has type `((..., ..., ..., ...), ..., ..., ...)`, which does not implement the `Copy` trait
@@ -8,7 +8,7 @@ LL | let _a = x;
88
LL | let _b = x;
99
| ^ value used here after move
1010
|
11-
= note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/non-copy-type-moved/non-copy-type-moved.long-type-hash.txt'
11+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
1212
= note: consider using `--verbose` to print the full type name to the console
1313
help: consider cloning the value if the performance cost is acceptable
1414
|

‎tests/ui/diagnostic-width/secondary-label-with-long-type.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
2-
//@ normalize-stderr: "long-type-\d+" -> "long-type-hash"
2+
// The regex below normalizes the long type file name to make it suitable for compare-modes.
3+
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type-\d+.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type-hash.txt'"
4+
35
type A = (i32, i32, i32, i32);
46
type B = (A, A, A, A);
57
type C = (B, B, B, B);

‎tests/ui/diagnostic-width/secondary-label-with-long-type.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/secondary-label-with-long-type.rs:9:9
2+
--> $DIR/secondary-label-with-long-type.rs:11:9
33
|
44
LL | let () = x;
55
| ^^ - this expression has type `((..., ..., ..., ...), ..., ..., ...)`
@@ -8,7 +8,7 @@ LL | let () = x;
88
|
99
= note: expected tuple `((..., ..., ..., ...), ..., ..., ...)`
1010
found unit type `()`
11-
= note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/secondary-label-with-long-type/secondary-label-with-long-type.long-type-hash.txt'
11+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
1212
= note: consider using `--verbose` to print the full type name to the console
1313

1414
error: aborting due to 1 previous error

‎tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
//@ error-pattern: reached the recursion limit while instantiating
44
//@ error-pattern: reached the recursion limit finding the struct tail
55

6+
// The regex below normalizes the long type file name to make it suitable for compare-modes.
7+
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type.txt'"
8+
69
// Regression test for #114484: This used to ICE during monomorphization, because we treated
710
// `<VirtualWrapper<...> as Pointee>::Metadata` as a rigid projection after reaching the recursion
811
// limit when finding the struct tail.

‎tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ error: reached the recursion limit finding the struct tail for `[u8; 256]`
1818
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1919

2020
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
21-
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
21+
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:29:18
2222
|
2323
LL | unsafe { virtualize_my_trait(L, self) }
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -43,7 +43,7 @@ error: reached the recursion limit finding the struct tail for `SomeData<256>`
4343
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4444

4545
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
46-
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
46+
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:29:18
4747
|
4848
LL | unsafe { virtualize_my_trait(L, self) }
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,19 +68,19 @@ error: reached the recursion limit finding the struct tail for `VirtualWrapper<S
6868
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
6969

7070
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
71-
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
71+
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:29:18
7272
|
7373
LL | unsafe { virtualize_my_trait(L, self) }
7474
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7575

7676
error: reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<..., 1>, 1>, 1>, 1>, 1> as MyTrait>::virtualize`
7777
|
7878
note: `<VirtualWrapper<T, L> as MyTrait>::virtualize` defined here
79-
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:5
79+
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:28:5
8080
|
8181
LL | fn virtualize(&self) -> &dyn MyTrait {
8282
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83-
= note: the full type name has been written to '$TEST_BUILD_DIR/infinite/infinite-instantiation-struct-tail-ice-114484/infinite-instantiation-struct-tail-ice-114484.long-type.txt'
83+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type.txt'
8484

8585
error: aborting due to 13 previous errors
8686

‎tests/ui/infinite/infinite-instantiation.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ build-fail
2-
//@ normalize-stderr: ".nll/" -> "/"
2+
// The regex below normalizes the long type file name to make it suitable for compare-modes.
3+
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type.txt'"
34

45
trait ToOpt: Sized {
56
fn to_option(&self) -> Option<Self>;
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: reached the recursion limit while instantiating `function::<Option<Option<Option<Option<Option<...>>>>>>`
2-
--> $DIR/infinite-instantiation.rs:22:9
2+
--> $DIR/infinite-instantiation.rs:23:9
33
|
44
LL | function(counter - 1, t.to_option());
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: `function` defined here
8-
--> $DIR/infinite-instantiation.rs:20:1
8+
--> $DIR/infinite-instantiation.rs:21:1
99
|
1010
LL | fn function<T:ToOpt + Clone>(counter: usize, t: T) {
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
= note: the full type name has been written to '$TEST_BUILD_DIR/infinite/infinite-instantiation/infinite-instantiation.long-type.txt'
12+
= note: the full type name has been written to '$TEST_BUILD_DIR/$FILE.long-type.txt'
1313

1414
error: aborting due to 1 previous error
1515

‎tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ build-fail
2-
//@ normalize-stderr: ".nll/" -> "/"
2+
// The regex below normalizes the long type file name to make it suitable for compare-modes.
3+
//@ normalize-stderr: "'\$TEST_BUILD_DIR/.*\.long-type.txt'" -> "'$$TEST_BUILD_DIR/$$FILE.long-type.txt'"
34

45
trait Mirror {
56
type Image;
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.