Docs menu

E175: static is written after the parameter list

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

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

A static method – one with no self, called as Type::name(...) – is written with static in front of fn:

Example
struct Counter {    n: int}pub static fn Counter.limit(): int {    return 100;}

The older place, after the parameter list, still compiles to the same method:

Example
pub fn Counter.limit() static: int {   // WARNING (E175 at `warn`)    return 100;}

The compiler’s Fix: moves the word. Writing static in both places is an error, and so is static pub fn (the order is pub static fn).

This warning starts at allow in 2.3: turn it on with turf build --warn E175 (or [lints] E175 = "warn" in turf.toml). TurfLang 3.0 removes the old place, and turf migrate 3.0 moves every static for you.

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

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

Esc

Type to search.