Docs menu

E172: You're calling a deprecated item

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

A warning, on by default. Since TurfLang 2.2.

A function (or extern fn) marked @deprecated("...") warns at every call to it, showing the message its declaration wrote:

Example
@deprecated("use new_sort() instead")fn old_sort(l: List<int>): List<int> {    return l;}fn main(): int {    old_sort(List::default());   // WARNING: `old_sort` is deprecated: use new_sort() instead    return 0;}

The message names what to use instead, so the fix is usually to call that instead:

Example
fn main(): int {    new_sort(List::default());    return 0;}

The item itself still works exactly as before – this is advance notice, not a removal. Turf never removes a deprecated item on its own; that only happens across a major version (docs/planning/ROADMAP_v3.0.0.md).

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 E172 (or [lints] E172 = "allow" in turf.toml).

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

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

Esc

Type to search.