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