Skip to content
ZOLO / TE178 Type · error

public linear type without a public consumer

Compiler diagnostic TE178: public linear type without a public consumer.

Why this fires

A pub @linear type has no public consumer: no code outside its module could ever use a value up, so every value would leak.

@linear
pub struct Handle { fd: int }
impl Handle {
  fn close(sink self) { ... }   // private: TE178 on `Handle`
}

Fix it

Make a consumer public, such as pub fn close(sink self).

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en