Docs menu

E163: This variable is never used

What compiler warning E163 means, and how to fix it.

A warning, on by default.

A variable is declared, but nothing in the function ever reads it:

Example
fn main(): int {    immut unused: int = 42;    // WARNING: declared but never used    return 0;}

Unused variables are usually leftovers from an edit, or a sign that you forgot to use the value. Delete the declaration, or use the value. If the variable is unused on purpose (a placeholder, or a value you only want to name), start its name with an underscore. Turf treats _name as deliberately unused:

Example
fn main(): int {    immut _unused: int = 42;    return 0;}

This is a warning, not an error – compilation still succeeds. To silence it for a whole build, set its lint level to allow: turf build --allow E163 (or [lints] E163 = "allow" in turf.toml).

Run turf --explain E163 in a terminal to read this again.

Last updated: Oct 15, 2026Edit this page on GitHub

Esc

Type to search.