S0152: unsupported f-string interpolation
Generated from rellum-diagnostics/src/db.rs.
Explanation
F-string interpolation converts String values directly and primitive scalar values through to_string(). Complex values must be converted explicitly so production strings do not accidentally depend on implicit debug-style formatting.
Common causes
- placing an Option, Result, array, tuple, record, enum, or map directly inside
{...} - expecting f-strings to format arbitrary values automatically
Canonical fixes
- convert the value explicitly before interpolating it
Before:
f"value: {maybe_n}"
After:
f"value: {to_string(maybe_n)}"
- match on complex values and interpolate a chosen String
Code example
f"value: {maybe_n}"