]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cast/cast-does-fallback.rs
Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton
[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 }