Sign in
fuchsia
/
third_party
/
rust
/
541ad45a83482e3132c75fbbc55fb2afc03a6031
/
.
/
src
/
test
/
run-pass
/
cast-does-fallback.rs
blob: 6adf90fc0e614c52bf2e0998e4e5d1cfd813d91a [
file
] [
log
] [
blame
]
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
);
}