2017-09-22 10:24:06 -05:00
|
|
|
fn main() {}
|
|
|
|
|
|
|
|
fn foo() -> Result<u32, ()> {
|
|
|
|
let x: Option<u32> = None;
|
2021-04-17 13:56:07 -05:00
|
|
|
x?; //~ ERROR the `?` operator
|
2017-09-22 10:24:06 -05:00
|
|
|
Ok(22)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar() -> u32 {
|
|
|
|
let x: Option<u32> = None;
|
2019-04-17 21:50:50 -05:00
|
|
|
x?; //~ ERROR the `?` operator
|
2017-09-22 10:24:06 -05:00
|
|
|
22
|
|
|
|
}
|