E0350

A Secret interpolated into a string, such as "Bearer {key}", or a value that holds one anywhere inside, such as a List<Secret<String>>, an Option<Secret<String>>, or a struct with a Secret field. Spans the hole, braces included.

Machine-applicable fix: none.

Example

This program fails with E0350.

fn main(env: Env) {
    let key = env.secret("API_KEY")
    let header = "Bearer {key}"
}

Fixed

The same program, fixed.

fn main(env: Env) {
    let key = env.secret("API_KEY")
    let value = key.expose()
    let header = "Bearer {value}"
}

Listed in the checker notes. oskac explain E0350 prints this entry offline.

All error codes