Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
cast
/
cast-does-fallback.rs
blob: 553bf51a53d8c1f0cb9e0514b4378242126965de [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
pub
fn
main
()
{
// Test that these type check correctly.
(&
42u8
>>
4
)
as
usize
;
(&
42u8
<<
4
)
as
usize
;
let
cap
=
512
*
512
;
cap
as
u8
;
// Assert `cap` did not get inferred to `u8` and overflowed.
assert_ne
!(
cap
,
0
);
}