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