2017-12-21 03:40:54 -06:00
|
|
|
pub fn main() {
|
2018-02-08 13:36:17 -06:00
|
|
|
// Test that these type check correctly.
|
|
|
|
(&42u8 >> 4) as usize;
|
|
|
|
(&42u8 << 4) as usize;
|
|
|
|
|
2017-12-21 03:40:54 -06:00
|
|
|
let cap = 512 * 512;
|
|
|
|
cap as u8;
|
|
|
|
// Assert `cap` did not get inferred to `u8` and overflowed.
|
|
|
|
assert_ne!(cap, 0);
|
|
|
|
}
|