Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
consts
/
control-flow
/
short-circuit.rs
blob: 6abe107855f80c040105f21814adb97004a59766 [
file
] [
log
] [
blame
]
// run-pass
// Test that both `&&` and `||` actually short-circuit.
// Formerly, both sides were evaluated unconditionally
const
TRUE
:
bool
=
true
||
panic
!();
const
FALSE
:
bool
=
false
&&
panic
!();
fn
main
()
{
assert
!(
TRUE
);
assert
!(!
FALSE
);
}