summaryrefslogtreecommitdiffstats
path: root/tests/ui/asm/issue-99122-2.rs
blob: cfb9fd90a55b7c56075ec484311cb5647c729018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// check-pass
// needs-asm-support
// only-x86_64

// This demonstrates why we need to erase regions before sized check in intrinsicck

struct NoCopy;

struct Wrap<'a, T, Tail: ?Sized>(&'a T, Tail);

pub unsafe fn test() {
    let i = NoCopy;
    let j = Wrap(&i, ());
    let pointer = &j as *const _;
    core::arch::asm!(
        "nop",
        in("eax") pointer,
    );
}

fn main() {}