]>
Commit | Line | Data |
---|---|---|
416331ca XL |
1 | // run-pass |
2 | ||
ea8adc8c | 3 | pub fn main() { |
0531ce1d XL |
4 | // Test that these type check correctly. |
5 | (&42u8 >> 4) as usize; | |
6 | (&42u8 << 4) as usize; | |
7 | ||
8 | let cap = 512 * 512; | |
9 | cap as u8; | |
10 | // Assert `cap` did not get inferred to `u8` and overflowed. | |
11 | assert_ne!(cap, 0); | |
ea8adc8c | 12 | } |