Skip to content
ZOLO / TE175 Type · error

linear type destructured outside its module

Compiler diagnostic TE175: linear type destructured outside its module.

Why this fires

A linear type is taken apart by a pattern outside the module that declares it. Only the owner may destructure its linear types; everyone else must go through a consumer, so the type's invariants hold.

use db::Tx
let Tx { conn, .. } = tx   // TE175

Fix it

Call one of the type's consumers (tx.commit(), tx.rollback()).

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en