aboutsummaryrefslogtreecommitdiff
path: root/examples/pinned_drop-expanded.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pinned_drop-expanded.rs')
-rw-r--r--examples/pinned_drop-expanded.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/pinned_drop-expanded.rs b/examples/pinned_drop-expanded.rs
index 48eb7fc..82207b6 100644
--- a/examples/pinned_drop-expanded.rs
+++ b/examples/pinned_drop-expanded.rs
@@ -23,7 +23,7 @@
// ```
#![allow(dead_code, unused_imports, unused_parens, unknown_lints, renamed_and_removed_lints)]
-#![allow(clippy::needless_lifetimes)]
+#![allow(clippy::needless_lifetimes, clippy::mut_mut)]
use std::pin::Pin;
@@ -82,7 +82,7 @@ const _: () = {
//
// See ./struct-default-expanded.rs and https://github.com/taiki-e/pin-project/pull/34
// for details.
- #[forbid(safe_packed_borrows)]
+ #[forbid(unaligned_references, safe_packed_borrows)]
fn __assert_not_repr_packed<'a, T>(this: &Struct<'a, T>) {
let _ = &this.was_dropped;
let _ = &this.field;
@@ -135,6 +135,7 @@ const _: () = {
// Users can implement [`Drop`] safely using `#[pinned_drop]` and can drop a
// type that implements `PinnedDrop` using the [`drop`] function safely.
// **Do not call or implement this trait directly.**
+#[doc(hidden)]
impl<T> ::pin_project::__private::PinnedDrop for Struct<'_, T> {
// Since calling it twice on the same object would be UB,
// this method is unsafe.