E0210

A struct or enum whose own fields name a capability-bearing type (a built-in capability, a cap type, or a cap fn, including inside written type arguments such as List<Stdout>) is not declared cap. A field typed by a type parameter, as in struct Box<T> { value: T }, does not count. Spans the type's name.

Machine-applicable fix: Insert cap before struct or enum.

Example

This program fails with E0210.

struct Logger { out: Stdout }

Fixed

The same program, fixed.

cap struct Logger { out: Stdout }

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

All error codes