]> git.lizzy.rs Git - rust.git/blob - tests/ui/zero_offset.rs
Auto merge of #88214 - notriddle:notriddle/for-loop-span-drop-temps-mut, r=nagisa
[rust.git] / tests / ui / zero_offset.rs
1 fn main() {
2     unsafe {
3         let m = &mut () as *mut ();
4         m.offset(0);
5         m.wrapping_add(0);
6         m.sub(0);
7         m.wrapping_sub(0);
8
9         let c = &() as *const ();
10         c.offset(0);
11         c.wrapping_add(0);
12         c.sub(0);
13         c.wrapping_sub(0);
14
15         let sized = &1 as *const i32;
16         sized.offset(0);
17     }
18 }