2019-10-01 15:10:29 -07:00
|
|
|
//@ build-pass
|
2019-10-01 15:09:53 -07:00
|
|
|
//@ compile-flags: -g
|
2016-06-12 21:45:48 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2016-06-13 22:27:13 +01:00
|
|
|
|
|
|
|
fn main() {}
|