Sign in
fuchsia
/
third_party
/
rust
/
d440e136e753210882d930c6f4884a43984f6ba0
/
.
/
src
/
test
/
ui
/
cast-does-fallback.rs
blob: 770f7a31c7642e1c1efc18483f7611b7638da0be [
file
] [
log
] [
blame
]
// 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
);
}