blob: f363e6a0f47306db3368babb1009c758327c9d13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// compile-pass
// compiler-flags: -g
pub struct Dst {
pub a: (),
pub b: (),
pub data: [u8],
}
pub unsafe fn borrow(bytes: &[u8]) -> &Dst {
let dst: &Dst = std::mem::transmute((bytes.as_ptr(), bytes.len()));
dst
}
fn main() {}
|