Skip to content

Commit be96ad2

Browse files
authored
Update intrinsics.rs
1 parent 1dc3a2b commit be96ad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/intrinsics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ extern "rust-intrinsic" {
13691369
/// let offset = align_offset(ptr as *const (), align_of::<u16>());
13701370
/// if offset < x.len() - n - 1 {
13711371
/// let u16_ptr = ptr.offset(offset as isize) as *const u16;
1372-
/// *u16_ptr = 500;
1372+
/// assert_ne!(*u16_ptr, 500);
13731373
/// } else {
13741374
/// // while the pointer can be aligned via `offset`, it would point
13751375
/// // outside the allocation
@@ -1406,7 +1406,7 @@ extern "rust-intrinsic" {
14061406
/// let offset = align_offset(ptr as *const (), align_of::<u16>());
14071407
/// if offset < x.len() - n - 1 {
14081408
/// let u16_ptr = ptr.offset(offset as isize) as *const u16;
1409-
/// *u16_ptr = 500;
1409+
/// assert_ne!(*u16_ptr, 500);
14101410
/// } else {
14111411
/// // while the pointer can be aligned via `offset`, it would point
14121412
/// // outside the allocation

0 commit comments

Comments
 (0)