mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 20:53:37 +00:00
8 lines
253 B
Rust
8 lines
253 B
Rust
// nested function calls with cast.
|
|
fn main() {
|
|
self.ptr
|
|
.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1) as *mut T);
|
|
self.ptr
|
|
.set(intrinsics::arith_offset(self.ptr.get(), mem::size_of::<T>() as isize) as *mut u8);
|
|
}
|