summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/recursive-type-field.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/span/recursive-type-field.stderr')
-rw-r--r--src/test/ui/span/recursive-type-field.stderr38
1 files changed, 15 insertions, 23 deletions
diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr
index 08e97e750..10af4c36b 100644
--- a/src/test/ui/span/recursive-type-field.stderr
+++ b/src/test/ui/span/recursive-type-field.stderr
@@ -1,35 +1,27 @@
-error[E0072]: recursive type `Foo` has infinite size
+error[E0072]: recursive types `Foo` and `Bar` have infinite size
--> $DIR/recursive-type-field.rs:3:1
|
LL | struct Foo<'a> {
- | ^^^^^^^^^^^^^^ recursive type has infinite size
+ | ^^^^^^^^^^^^^^
LL | bar: Bar<'a>,
| ------- recursive without indirection
+...
+LL | struct Bar<'a> {
+ | ^^^^^^^^^^^^^^
+LL | y: (Foo<'a>, Foo<'a>),
+ | ------- ------- recursive without indirection
+ | |
+ | recursive without indirection
|
-help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
- |
-LL | bar: Box<Bar<'a>>,
- | ++++ +
-
-error[E0072]: recursive type `Bar` has infinite size
- --> $DIR/recursive-type-field.rs:8:1
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
+LL ~ bar: Box<Bar<'a>>,
+LL | b: Rc<Bar<'a>>,
+ ...
LL | struct Bar<'a> {
- | ^^^^^^^^^^^^^^ recursive type has infinite size
-LL | y: (Foo<'a>, Foo<'a>),
- | ------------------ recursive without indirection
-LL | z: Option<Bar<'a>>,
- | --------------- recursive without indirection
-...
-LL | d: [Bar<'a>; 1],
- | ------------ recursive without indirection
-LL | e: Foo<'a>,
- | ------- recursive without indirection
-LL | x: Bar<'a>,
- | ------- recursive without indirection
+LL ~ y: (Box<Foo<'a>>, Box<Foo<'a>>),
|
- = help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable
-error: aborting due to 2 previous errors
+error: aborting due to previous error
For more information about this error, try `rustc --explain E0072`.