E0241
? on a value that is neither a Result nor an Option. Spans the ? expression.
Machine-applicable fix: none.
Example
This program fails with E0241.
fn first() -> Option<Int> {
let n = 1?
Some(n)
}
Fixed
The same program, fixed.
fn first() -> Option<Int> {
let n = 1
Some(n)
}
Listed in the checker notes. oskac explain E0241 prints this entry offline.