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 294d9d7

Browse files
committedMar 11, 2025
Allow dangerous_implicit_autorefs lint in some tests
1 parent 9352815 commit 294d9d7

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed
 

‎library/core/src/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@
676676
//! let data_ptr = unpinned_src.data.as_ptr() as *const u8;
677677
//! let slice_ptr = unpinned_src.slice.as_ptr() as *const u8;
678678
//! let offset = slice_ptr.offset_from(data_ptr) as usize;
679-
//! let len = (*unpinned_src.slice.as_ptr()).len();
679+
//! let len = unpinned_src.slice.as_ptr().len();
680680
//!
681681
//! unpinned_self.slice = NonNull::from(&mut unpinned_self.data[offset..offset+len]);
682682
//! }

‎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
}

‎src/tools/miri/tests/pass/stacked-borrows/interior_mutability.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(dangerous_implicit_autorefs)]
2+
13
use std::cell::{Cell, Ref, RefCell, RefMut, UnsafeCell};
24
use std::mem::{self, MaybeUninit};
35

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

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

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

0 commit comments

Comments
 (0)
Failed to load comments.