rust/tests/ui/issues/issue-57271.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
799 B
Plaintext
Raw Normal View History

2022-08-16 03:11:11 +08:00
error[E0072]: recursive types `ObjectType` and `TypeSignature` have infinite size
2019-10-08 05:24:04 +08:00
--> $DIR/issue-57271.rs:7:1
|
LL | pub enum ObjectType {
2022-08-16 03:11:11 +08:00
| ^^^^^^^^^^^^^^^^^^^
2019-10-08 05:24:04 +08:00
LL | Class(ClassTypeSignature),
LL | Array(TypeSignature),
| ------------- recursive without indirection
2022-08-16 03:11:11 +08:00
...
2019-10-08 05:24:04 +08:00
LL | pub enum TypeSignature {
2022-08-16 03:11:11 +08:00
| ^^^^^^^^^^^^^^^^^^^^^^
2019-10-08 05:24:04 +08:00
LL | Base(BaseType),
LL | Object(ObjectType),
| ---------- recursive without indirection
|
2022-08-16 03:11:11 +08:00
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
LL ~ Array(Box<TypeSignature>),
LL | TypeVariable(()),
...
LL | Base(BaseType),
LL ~ Object(Box<ObjectType>),
|
2019-10-08 05:24:04 +08:00
error: aborting due to 1 previous error
2019-10-08 05:24:04 +08:00
For more information about this error, try `rustc --explain E0072`.