Skip to content

Commit

Permalink
Fix Pin example from dangerous implicit autorefs
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Mar 30, 2024
1 parent 12f1ea5 commit bb6ab41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
//! let data_ptr = unpinned_src.data.as_ptr() as *const u8;
//! let slice_ptr = unpinned_src.slice.as_ptr() as *const u8;
//! let offset = slice_ptr.offset_from(data_ptr) as usize;
//! let len = (*unpinned_src.slice.as_ptr()).len();
//! let len = unpinned_src.slice.as_ptr().len();

Check failure on line 679 in library/core/src/pin.rs

View workflow job for this annotation

GitHub Actions / PR - mingw-check

use of unstable library feature 'slice_ptr_len'
//!
//! unpinned_self.slice = NonNull::from(&mut unpinned_self.data[offset..offset+len]);
//! }
Expand Down

0 comments on commit bb6ab41

Please sign in to comment.