about summary refs log tree commit diff
path: root/tests/ui/infinite
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/infinite')
-rw-r--r--tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs28
-rw-r--r--tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr8
-rw-r--r--tests/ui/infinite/infinite-struct.rs3
-rw-r--r--tests/ui/infinite/infinite-struct.stderr6
4 files changed, 24 insertions, 21 deletions
diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
index f7117368ece..b8ea353df93 100644
--- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
+++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
@@ -1,4 +1,17 @@
-//~ ERROR reached the recursion limit while instantiating `<VirtualWrapper<
+//~ ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~| ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~| ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~| ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~| ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~| ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~| ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~| ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~| ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~| ERROR reached the recursion limit while instantiating `<VirtualWrapper<..., 1> as MyTrait>::virtualize`
+
 //@ build-fail
 //@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
@@ -72,16 +85,3 @@ fn main() {
     let test = SomeData([0; 256]);
     test.virtualize();
 }
-
-//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
-//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
-//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
-//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
-//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
-//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
-//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
-//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
-//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
-//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
-//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
-//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
index faf9cbe2318..deccc88e64f 100644
--- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
+++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
@@ -18,7 +18,7 @@ error: reached the recursion limit finding the struct tail for `[u8; 256]`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<..., 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:18
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:38:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -46,7 +46,7 @@ error: reached the recursion limit finding the struct tail for `SomeData<256>`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<..., 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:18
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:38:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -74,7 +74,7 @@ error: reached the recursion limit finding the struct tail for `VirtualWrapper<S
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<..., 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:18
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:38:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL |         unsafe { virtualize_my_trait(L, self) }
 error: reached the recursion limit while instantiating `<VirtualWrapper<..., 1> as MyTrait>::virtualize`
    |
 note: `<VirtualWrapper<T, L> as MyTrait>::virtualize` defined here
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:5
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:37:5
    |
 LL |     fn virtualize(&self) -> &dyn MyTrait {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/infinite/infinite-struct.rs b/tests/ui/infinite/infinite-struct.rs
index fd47a4ec9cc..d7844558246 100644
--- a/tests/ui/infinite/infinite-struct.rs
+++ b/tests/ui/infinite/infinite-struct.rs
@@ -1,6 +1,7 @@
 struct Take(Take);
 //~^ ERROR has infinite size
 //~| ERROR cycle
+//~| ERROR reached the recursion limit finding the struct tail for `Take`
 
 // check that we don't hang trying to find the tail of a recursive struct (#79437)
 fn foo() -> Take {
@@ -15,5 +16,3 @@ struct Foo { //~ ERROR has infinite size
 struct Bar<T>([T; 1]);
 
 fn main() {}
-
-//~? ERROR reached the recursion limit finding the struct tail for `Take`
diff --git a/tests/ui/infinite/infinite-struct.stderr b/tests/ui/infinite/infinite-struct.stderr
index 5896aec399d..0d1ec4989aa 100644
--- a/tests/ui/infinite/infinite-struct.stderr
+++ b/tests/ui/infinite/infinite-struct.stderr
@@ -10,7 +10,7 @@ LL | struct Take(Box<Take>);
    |             ++++    +
 
 error[E0072]: recursive type `Foo` has infinite size
-  --> $DIR/infinite-struct.rs:11:1
+  --> $DIR/infinite-struct.rs:12:1
    |
 LL | struct Foo {
    | ^^^^^^^^^^
@@ -23,6 +23,10 @@ LL |     x: Bar<Box<Foo>>,
    |            ++++   +
 
 error: reached the recursion limit finding the struct tail for `Take`
+  --> $DIR/infinite-struct.rs:1:1
+   |
+LL | struct Take(Take);
+   | ^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`