]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cast/cast-does-fallback.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / ui / cast / cast-does-fallback.rs
1 // run-pass
2
3 pub fn main() {
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);
12 }