Rellum Rellum

S0142: unsafe operation outside unsafe block

Generated from rellum-diagnostics/src/db.rs.

Explanation

Some operations, including calling extern C functions, reading and writing through raw pointers, and raw memory allocation, can violate memory safety if used incorrectly. Rellum requires these operations to appear inside an unsafe { } block so the programmer explicitly acknowledges the risk.

Common causes

Canonical fixes

Before:

value = strlen(ptr)

After:

value = unsafe { strlen(ptr) }

Code example

value = strlen(ptr)