mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
17 lines
304 B
Rust
17 lines
304 B
Rust
// build-pass
|
|
// ignore-asmjs wasm2js does not support source maps yet
|
|
// compile-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() {}
|