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
797 B
Plaintext
Raw Normal View History

2022-08-15 19:11:11 +00:00
error[E0072]: recursive types `ObjectType` and `TypeSignature` have infinite size
2019-10-07 21:24:04 +00:00
--> $DIR/issue-57271.rs:7:1
|
LL | pub enum ObjectType {
2022-08-15 19:11:11 +00:00
| ^^^^^^^^^^^^^^^^^^^
2019-10-07 21:24:04 +00:00
LL | Class(ClassTypeSignature),
LL | Array(TypeSignature),
| ------------- recursive without indirection
2022-08-15 19:11:11 +00:00
...
2019-10-07 21:24:04 +00:00
LL | pub enum TypeSignature {
2022-08-15 19:11:11 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^
2019-10-07 21:24:04 +00:00
LL | Base(BaseType),
LL | Object(ObjectType),
| ---------- recursive without indirection
|
2022-08-15 19:11:11 +00: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-07 21:24:04 +00:00
2022-08-15 19:11:11 +00:00
error: aborting due to previous error
2019-10-07 21:24:04 +00:00
For more information about this error, try `rustc --explain E0072`.