Sign in
fuchsia
/
third_party
/
rust
/
a10a02bf5fd00e4b34f1856af17d058dd5ec06f0
/
.
/
src
/
test
/
ui
/
option-to-result.rs
blob: 00e8b5244c54a418883fbc1b2818bd35d9b556f0 [
file
] [
log
] [
blame
]
fn
main
(){
}
fn
test_result
()
->
Result
<(),()>
{
let
a
:
Option
<()>
=
Some
(());
a
?;
//~ ERROR `?` couldn't convert the error
Ok
(())
}
fn
test_option
()
->
Option
<
i32
>{
let
a
:
Result
<
i32
,
i32
>
=
Ok
(
5
);
a
?;
//~ ERROR `?` couldn't convert the error
Some
(
5
)
}