A warning, off unless its lint level is raised. Since TurfLang 2.3.
unsafe { } marks the code that needs care: raw-pointer declarations, casts and dereferences. This block holds none of them, so it marks nothing and makes the real unsafe code harder to find:
Example
fn bump(): int { mut y: int = 1; unsafe { // WARNING (E193 at `warn`) y += 1; } return y;}Remove the unsafe { } and keep its statements:
Example
fn bump(): int { mut y: int = 1; y += 1; return y;}A block counts as needed when anything inside it, including a nested block, uses what unsafe allows. A top-level unsafe { } around a declaration is not checked. This warning starts at allow in 2.3: turn it on with turf build --warn E193 (or [lints] E193 = "warn" in turf.toml).
Run turf --explain E193 in a terminal to read this again.