Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
src
/
test
/
ui
/
try-trait
/
try-on-option.rs
blob: f2012936a1174394daaf77eabbcbb32650895b1e [
file
] [
log
] [
blame
]
#![
feature
(
try_trait
)]
fn
main
()
{}
fn
foo
()
->
Result
<
u32
,
()>
{
let
x
:
Option
<
u32
>
=
None
;
x
?;
//~ ERROR the `?` operator
Ok
(
22
)
}
fn
bar
()
->
u32
{
let
x
:
Option
<
u32
>
=
None
;
x
?;
//~ ERROR the `?` operator
22
}