Allow dangerous_implicit_autorefs lint in some tests

This commit is contained in:
Urgau 2024-03-30 16:40:24 +01:00
parent 40ba47d3b0
commit e8a6c175c5
4 changed files with 7 additions and 1 deletions

View file

@ -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();
//!
//! unpinned_self.slice = NonNull::from(&mut unpinned_self.data[offset..offset+len]);
//! }

View file

@ -1,5 +1,7 @@
// Test DST raw pointers
#![allow(dangerous_implicit_autorefs)]
trait Trait {
fn foo(&self) -> isize;
}

View file

@ -1,3 +1,5 @@
#![allow(dangerous_implicit_autorefs)]
use std::cell::{Cell, Ref, RefCell, RefMut, UnsafeCell};
use std::mem::{self, MaybeUninit};

View file

@ -1,6 +1,8 @@
//@ run-pass
// Test DST raw pointers
#![allow(dangerous_implicit_autorefs)]
trait Trait {
fn foo(&self) -> isize;
}