Skip to content

V0102: context is never consumed

Every context must be consumed exactly once: returned, passed on, committed, or released with drop. A context that silently goes out of scope would leak KV-cache memory on the serving engine, so Veer makes the release explicit.

model m = "x" { layers: 1, kv_heads: 1, head_dim: 8 }
fn main() {
let c = open m // never dropped
}
error[V0102]: context `c` is never consumed
--> example.veer:4:1
|
4 | }
| ^
= note: drop it with `drop`, return it, or pass it on: leaked contexts would hold KV memory forever
= help: run `veer explain V0102` for details