Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 57f6416

Browse files
committedMay 14, 2024
Allow dangerous_implicit_autorefs lint in some tests
1 parent 454ce31 commit 57f6416

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
 

‎library/core/src/pin.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@
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;
@@ -676,7 +677,7 @@
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
//! }

‎src/tools/miri/tests/pass/dst-raw.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Test DST raw pointers
22

3+
#![allow(dangerous_implicit_autorefs)]
4+
35
trait Trait {
46
fn foo(&self) -> isize;
57
}

‎tests/ui/dynamically-sized-types/dst-raw.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//@ run-pass
22
// Test DST raw pointers
33

4-
54
#![feature(unsized_tuple_coercion)]
5+
#![allow(dangerous_implicit_autorefs)]
66

77
trait Trait {
88
fn foo(&self) -> isize;

0 commit comments

Comments
 (0)
Failed to load comments.