We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ebd307 commit e349900Copy full SHA for e349900
tests/codegen/dst-offset.rs
@@ -4,6 +4,8 @@
4
5
#![crate_type = "lib"]
6
7
+#![feature(extern_types)]
8
+
9
use std::ptr::addr_of;
10
11
// Hack to get the correct type for usize
@@ -67,3 +69,16 @@ pub fn packed_dst_slice_offset(s: &PackedDstSlice) -> *const [u16] {
67
69
// CHECK-NEXT: ret
68
70
addr_of!(s.z)
71
}
72
73
+extern {
74
+ pub type Extern;
75
+}
76
77
+// CHECK-LABEL: @dst_extern
78
+#[no_mangle]
79
+pub fn dst_extern(s: &Dst<Extern>) -> &Extern {
80
+// Computing the alignment of an extern type is currently unsupported and just panics.
81
82
+// CHECK: call void @{{.+}}panic
83
+ &s.z
84
0 commit comments