]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/issue-99122-2.rs
Rollup merge of #99787 - aDotInTheVoid:rdj-dyn, r=camelid,notriddle,GuillaumeGomez
[rust.git] / src / test / ui / asm / issue-99122-2.rs
1 // check-pass
2 // needs-asm-support
3 // only-x86_64
4
5 // This demonstrates why we need to erase regions before sized check in intrinsicck
6
7 struct NoCopy;
8
9 struct Wrap<'a, T, Tail: ?Sized>(&'a T, Tail);
10
11 pub unsafe fn test() {
12     let i = NoCopy;
13     let j = Wrap(&i, ());
14     let pointer = &j as *const _;
15     core::arch::asm!(
16         "nop",
17         in("eax") pointer,
18     );
19 }
20
21 fn main() {}