Skip to content

Commit

Permalink
Allow dangerous_implicit_autorefs lint in some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Aug 12, 2024
1 parent 60d501c commit 78288af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
//! }
Expand Down
2 changes: 2 additions & 0 deletions src/tools/miri/tests/pass/dst-raw.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Test DST raw pointers

#![allow(dangerous_implicit_autorefs)]

trait Trait {
fn foo(&self) -> isize;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dynamically-sized-types/dst-raw.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//@ run-pass
// Test DST raw pointers


#![feature(unsized_tuple_coercion)]
#![allow(dangerous_implicit_autorefs)]

trait Trait {
fn foo(&self) -> isize;
Expand Down

0 comments on commit 78288af

Please sign in to comment.