about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/zero_offset.rs
blob: 2de904376ad45b438ef580b99f2791fe7d5ea9bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn main() {
    unsafe {
        let x = &() as *const ();
        x.offset(0);
        x.wrapping_add(0);
        x.sub(0);
        x.wrapping_sub(0);

        let y = &1 as *const u8;
        y.offset(0);
    }
}