diff options
| author | Urgau <urgau@numericable.fr> | 2024-03-30 16:40:24 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2025-04-20 11:36:28 +0200 |
| commit | e8a6c175c51fbc347ea0b4479cc1b2de0932ddab (patch) | |
| tree | 69e90d53a8791235174fe4b87022a04c03442f43 | |
| parent | 40ba47d3b0d53374c9170871f82a410e632fe1e3 (diff) | |
| download | rust-e8a6c175c51fbc347ea0b4479cc1b2de0932ddab.tar.gz rust-e8a6c175c51fbc347ea0b4479cc1b2de0932ddab.zip | |
Allow `dangerous_implicit_autorefs` lint in some tests
| -rw-r--r-- | library/core/src/pin.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/dst-raw.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/stacked-borrows/interior_mutability.rs | 2 | ||||
| -rw-r--r-- | tests/ui/dynamically-sized-types/dst-raw.rs | 2 |
4 files changed, 7 insertions, 1 deletions
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index 48ed5ae451e..39c11572e47 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -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]); //! } diff --git a/src/tools/miri/tests/pass/dst-raw.rs b/src/tools/miri/tests/pass/dst-raw.rs index f26191a1d59..3d0b843b3da 100644 --- a/src/tools/miri/tests/pass/dst-raw.rs +++ b/src/tools/miri/tests/pass/dst-raw.rs @@ -1,5 +1,7 @@ // Test DST raw pointers +#![allow(dangerous_implicit_autorefs)] + trait Trait { fn foo(&self) -> isize; } diff --git a/src/tools/miri/tests/pass/stacked-borrows/interior_mutability.rs b/src/tools/miri/tests/pass/stacked-borrows/interior_mutability.rs index 830e9c33847..e86cb3711ac 100644 --- a/src/tools/miri/tests/pass/stacked-borrows/interior_mutability.rs +++ b/src/tools/miri/tests/pass/stacked-borrows/interior_mutability.rs @@ -1,3 +1,5 @@ +#![allow(dangerous_implicit_autorefs)] + use std::cell::{Cell, Ref, RefCell, RefMut, UnsafeCell}; use std::mem::{self, MaybeUninit}; diff --git a/tests/ui/dynamically-sized-types/dst-raw.rs b/tests/ui/dynamically-sized-types/dst-raw.rs index 111848c5a7f..935f0f11ca6 100644 --- a/tests/ui/dynamically-sized-types/dst-raw.rs +++ b/tests/ui/dynamically-sized-types/dst-raw.rs @@ -1,6 +1,8 @@ //@ run-pass // Test DST raw pointers +#![allow(dangerous_implicit_autorefs)] + trait Trait { fn foo(&self) -> isize; } |
