File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
src/tools/miri/tests/pass
tests/ui/dynamically-sized-types Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 651651//! [`Unmovable`] (from the example above), we could write an assignment function like so:
652652//!
653653//! ```
654+ //! # #![feature(slice_ptr_len)]
654655//! # use std::pin::Pin;
655656//! # use std::marker::PhantomPinned;
656657//! # use std::ptr::NonNull;
676677//! let data_ptr = unpinned_src.data.as_ptr() as *const u8;
677678//! let slice_ptr = unpinned_src.slice.as_ptr() as *const u8;
678679//! let offset = slice_ptr.offset_from(data_ptr) as usize;
679- //! let len = (* unpinned_src.slice.as_ptr() ).len();
680+ //! let len = unpinned_src.slice.as_ptr().len();
680681//!
681682//! unpinned_self.slice = NonNull::from(&mut unpinned_self.data[offset..offset+len]);
682683//! }
Original file line number Diff line number Diff line change 11// Test DST raw pointers
22
3+ #![ allow( dangerous_implicit_autorefs) ]
4+
35trait Trait {
46 fn foo ( & self ) -> isize ;
57}
Original file line number Diff line number Diff line change 11//@ run-pass
22// Test DST raw pointers
33
4-
54#![ feature( unsized_tuple_coercion) ]
5+ #![ allow( dangerous_implicit_autorefs) ]
66
77trait Trait {
88 fn foo ( & self ) -> isize ;
You can’t perform that action at this time.
0 commit comments