Update intrinsics.rs
This commit is contained in:
parent
1dc3a2b5fa
commit
be96ad2c85
1 changed files with 2 additions and 2 deletions
|
@ -1369,7 +1369,7 @@ extern "rust-intrinsic" {
|
||||||
/// let offset = align_offset(ptr as *const (), align_of::<u16>());
|
/// let offset = align_offset(ptr as *const (), align_of::<u16>());
|
||||||
/// if offset < x.len() - n - 1 {
|
/// if offset < x.len() - n - 1 {
|
||||||
/// let u16_ptr = ptr.offset(offset as isize) as *const u16;
|
/// let u16_ptr = ptr.offset(offset as isize) as *const u16;
|
||||||
/// *u16_ptr = 500;
|
/// assert_ne!(*u16_ptr, 500);
|
||||||
/// } else {
|
/// } else {
|
||||||
/// // while the pointer can be aligned via `offset`, it would point
|
/// // while the pointer can be aligned via `offset`, it would point
|
||||||
/// // outside the allocation
|
/// // outside the allocation
|
||||||
|
@ -1406,7 +1406,7 @@ extern "rust-intrinsic" {
|
||||||
/// let offset = align_offset(ptr as *const (), align_of::<u16>());
|
/// let offset = align_offset(ptr as *const (), align_of::<u16>());
|
||||||
/// if offset < x.len() - n - 1 {
|
/// if offset < x.len() - n - 1 {
|
||||||
/// let u16_ptr = ptr.offset(offset as isize) as *const u16;
|
/// let u16_ptr = ptr.offset(offset as isize) as *const u16;
|
||||||
/// *u16_ptr = 500;
|
/// assert_ne!(*u16_ptr, 500);
|
||||||
/// } else {
|
/// } else {
|
||||||
/// // while the pointer can be aligned via `offset`, it would point
|
/// // while the pointer can be aligned via `offset`, it would point
|
||||||
/// // outside the allocation
|
/// // outside the allocation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue