XO0206: `let _ =` discards a Result; use `.ignore_err("reason")`
let _ = expr on a Result silently drops its error. Xo requires a reason instead: expr.ignore_err("why this failure does not matter") yields T? and records the reason, so every discarded error is searchable and reviewable (xo vet lists them, XO0208). The diagnostic carries a fix that inserts .ignore_err("TODO: reason"). Use r.ok() when failure simply means no value. See core 2.6.
Example
fn f(fs: Fs) uses fs.write {
let _ = fs.remove("tmp")
}Fix
fn f(fs: Fs) uses fs.write {
let _ = fs.remove("tmp").ignore_err("best effort temp file cleanup")
}Run xo explain XO0206 for this text in a terminal, or see
section 10.6 of the specification.