File tree 3 files changed +5
-2
lines changed
src/tools/miri/tests/pass
tests/ui/dynamically-sized-types
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 651
651
//! [`Unmovable`] (from the example above), we could write an assignment function like so:
652
652
//!
653
653
//! ```
654
+ //! # #![feature(slice_ptr_len)]
654
655
//! # use std::pin::Pin;
655
656
//! # use std::marker::PhantomPinned;
656
657
//! # use std::ptr::NonNull;
676
677
//! let data_ptr = unpinned_src.data.as_ptr() as *const u8;
677
678
//! let slice_ptr = unpinned_src.slice.as_ptr() as *const u8;
678
679
//! 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();
680
681
//!
681
682
//! unpinned_self.slice = NonNull::from(&mut unpinned_self.data[offset..offset+len]);
682
683
//! }
Original file line number Diff line number Diff line change 1
1
// Test DST raw pointers
2
2
3
+ #![ allow( dangerous_implicit_autorefs) ]
4
+
3
5
trait Trait {
4
6
fn foo ( & self ) -> isize ;
5
7
}
Original file line number Diff line number Diff line change 1
1
//@ run-pass
2
2
// Test DST raw pointers
3
3
4
-
5
4
#![ feature( unsized_tuple_coercion) ]
5
+ #![ allow( dangerous_implicit_autorefs) ]
6
6
7
7
trait Trait {
8
8
fn foo ( & self ) -> isize ;
You can’t perform that action at this time.
0 commit comments