Sign in
fuchsia
/
third_party
/
rust
/
8035796b9aabf1aa2a711694e40f00fe8a822f40
/
.
/
src
/
test
/
ui
/
expr-if-unique.rs
blob: 86232683549b602463f200038968229346827a86 [
file
] [
log
] [
blame
]
// run-pass
// Tests for if as expressions returning boxed types
fn
test_box
()
{
let
rs
:
Box
<
_
>
=
if
true
{
Box
::
new
(
100
)
}
else
{
Box
::
new
(
101
)
};
assert_eq
!(*
rs
,
100
);
}
pub
fn
main
()
{
test_box
();
}