Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
src
/
test
/
ui
/
consts
/
control-flow
/
try.rs
blob: 7d85a412b47226a3015444f6f6bb9b58632de40d [
file
] [
log
] [
blame
]
// The `?` operator is still not const-evaluatable because it calls `From::from` on the error
// variant.
const
fn
opt
()
->
Option
<
i32
>
{
let
x
=
Some
(
2
);
x
?;
//~ ERROR `?` is not allowed in a `const fn`
None
}
fn
main
()
{}