Docs menu

E176: export immut is the old spelling of pub immut

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

A warning, off unless its lint level is raised. Since TurfLang 2.3.

A module constant is declared at the top level of a module with immut. Written pub immut (or public immut), other modules can use it as module::NAME; without pub it is private to its module:

Example
pub immut MAX_USERS: int = 100;   // module::MAX_USERS from an importerimmut RETRIES: int = 3;           // only this module

export immut is the older spelling of pub immut and means the same:

Example
export immut MAX_USERS: int = 100;   // WARNING (E176 at `warn`)

The compiler’s Fix: replaces export with pub.

This warning starts at allow in 2.3: turn it on with turf build --warn E176 (or [lints] E176 = "warn" in turf.toml). TurfLang 3.0 removes export, and turf migrate 3.0 rewrites it for you.

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

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

Esc

Type to search.