E0215

A struct or enum with no base case: every way to build it contains itself, as in struct Loop { me: Loop }. Recursion through Option, List, or an enum variant without the type needs no indirection. Each type in a cycle is reported.

Machine-applicable fix: none.

Example

This program fails with E0215.

struct Loop { me: Loop }

Fixed

The same program, fixed.

struct Node { next: Option<Node> }

Listed in the checker notes. oskac explain E0215 prints this entry offline.

All error codes