E0240
An expression statement whose Result value is dropped. Discard one deliberately with let _ = f(). Spans the expression.
Machine-applicable fix: none.
Example
This program fails with E0240.
fn main(io: Stdout) -> Result<(), IoError> {
io.println("hi")
Ok(())
}
Fixed
The same program, fixed.
fn main(io: Stdout) -> Result<(), IoError> {
io.println("hi")?
Ok(())
}
Listed in the checker notes. oskac explain E0240 prints this entry offline.