diff options
Diffstat (limited to 'tests/expand')
28 files changed, 36 insertions, 30 deletions
diff --git a/tests/expand/default/struct.expanded.rs b/tests/expand/default/struct.expanded.rs index 2528ece..70f04ef 100644 --- a/tests/expand/default/struct.expanded.rs +++ b/tests/expand/default/struct.expanded.rs @@ -77,7 +77,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/default/tuple_struct.expanded.rs b/tests/expand/default/tuple_struct.expanded.rs index 3e8e306..1322d22 100644 --- a/tests/expand/default/tuple_struct.expanded.rs +++ b/tests/expand/default/tuple_struct.expanded.rs @@ -65,7 +65,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/multifields/struct.expanded.rs b/tests/expand/multifields/struct.expanded.rs index 17dab6a..1f7dfdd 100644 --- a/tests/expand/multifields/struct.expanded.rs +++ b/tests/expand/multifields/struct.expanded.rs @@ -142,7 +142,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned1; let _ = &this.pinned2; diff --git a/tests/expand/multifields/tuple_struct.expanded.rs b/tests/expand/multifields/tuple_struct.expanded.rs index 28e7fd8..aef8f8d 100644 --- a/tests/expand/multifields/tuple_struct.expanded.rs +++ b/tests/expand/multifields/tuple_struct.expanded.rs @@ -118,7 +118,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/naming/struct-all.expanded.rs b/tests/expand/naming/struct-all.expanded.rs index 6506928..88e024c 100644 --- a/tests/expand/naming/struct-all.expanded.rs +++ b/tests/expand/naming/struct-all.expanded.rs @@ -109,7 +109,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/naming/struct-mut.expanded.rs b/tests/expand/naming/struct-mut.expanded.rs index 53c5212..1365b23 100644 --- a/tests/expand/naming/struct-mut.expanded.rs +++ b/tests/expand/naming/struct-mut.expanded.rs @@ -75,7 +75,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/naming/struct-none.expanded.rs b/tests/expand/naming/struct-none.expanded.rs index 2528ece..70f04ef 100644 --- a/tests/expand/naming/struct-none.expanded.rs +++ b/tests/expand/naming/struct-none.expanded.rs @@ -77,7 +77,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/naming/struct-own.expanded.rs b/tests/expand/naming/struct-own.expanded.rs index 0c1fc76..899166f 100644 --- a/tests/expand/naming/struct-own.expanded.rs +++ b/tests/expand/naming/struct-own.expanded.rs @@ -111,7 +111,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/naming/struct-ref.expanded.rs b/tests/expand/naming/struct-ref.expanded.rs index 3f52ac5..f636f10 100644 --- a/tests/expand/naming/struct-ref.expanded.rs +++ b/tests/expand/naming/struct-ref.expanded.rs @@ -77,7 +77,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/naming/tuple_struct-all.expanded.rs b/tests/expand/naming/tuple_struct-all.expanded.rs index 325b9db..e4032be 100644 --- a/tests/expand/naming/tuple_struct-all.expanded.rs +++ b/tests/expand/naming/tuple_struct-all.expanded.rs @@ -88,7 +88,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/naming/tuple_struct-mut.expanded.rs b/tests/expand/naming/tuple_struct-mut.expanded.rs index 8cbb11f..076e4a0 100644 --- a/tests/expand/naming/tuple_struct-mut.expanded.rs +++ b/tests/expand/naming/tuple_struct-mut.expanded.rs @@ -60,7 +60,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/naming/tuple_struct-none.expanded.rs b/tests/expand/naming/tuple_struct-none.expanded.rs index 3e8e306..1322d22 100644 --- a/tests/expand/naming/tuple_struct-none.expanded.rs +++ b/tests/expand/naming/tuple_struct-none.expanded.rs @@ -65,7 +65,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/naming/tuple_struct-own.expanded.rs b/tests/expand/naming/tuple_struct-own.expanded.rs index 84bc14b..eda8267 100644 --- a/tests/expand/naming/tuple_struct-own.expanded.rs +++ b/tests/expand/naming/tuple_struct-own.expanded.rs @@ -96,7 +96,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/naming/tuple_struct-ref.expanded.rs b/tests/expand/naming/tuple_struct-ref.expanded.rs index 587d741..3c2618f 100644 --- a/tests/expand/naming/tuple_struct-ref.expanded.rs +++ b/tests/expand/naming/tuple_struct-ref.expanded.rs @@ -62,7 +62,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/not_unpin/struct.expanded.rs b/tests/expand/not_unpin/struct.expanded.rs index efa660f..680fb03 100644 --- a/tests/expand/not_unpin/struct.expanded.rs +++ b/tests/expand/not_unpin/struct.expanded.rs @@ -77,7 +77,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/not_unpin/tuple_struct.expanded.rs b/tests/expand/not_unpin/tuple_struct.expanded.rs index 89a257e..8bc6bbc 100644 --- a/tests/expand/not_unpin/tuple_struct.expanded.rs +++ b/tests/expand/not_unpin/tuple_struct.expanded.rs @@ -65,7 +65,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/pinned_drop/enum.expanded.rs b/tests/expand/pinned_drop/enum.expanded.rs index c8eb0e4..6e6ed54 100644 --- a/tests/expand/pinned_drop/enum.expanded.rs +++ b/tests/expand/pinned_drop/enum.expanded.rs @@ -1,5 +1,5 @@ -use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; +use pin_project::{pin_project, pinned_drop}; # [pin (__private (PinnedDrop , project = EnumProj , project_ref = EnumProjRef))] enum Enum<T, U> { Struct { @@ -130,6 +130,7 @@ const _: () = { } } }; +#[doc(hidden)] impl<T, U> ::pin_project::__private::PinnedDrop for Enum<T, U> { unsafe fn drop(self: Pin<&mut Self>) { #[allow(clippy::needless_pass_by_value)] diff --git a/tests/expand/pinned_drop/enum.rs b/tests/expand/pinned_drop/enum.rs index f5b8aa4..c162ef6 100644 --- a/tests/expand/pinned_drop/enum.rs +++ b/tests/expand/pinned_drop/enum.rs @@ -1,6 +1,7 @@ -use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; +use pin_project::{pin_project, pinned_drop}; + #[pin_project(PinnedDrop, project = EnumProj, project_ref = EnumProjRef)] enum Enum<T, U> { Struct { diff --git a/tests/expand/pinned_drop/struct.expanded.rs b/tests/expand/pinned_drop/struct.expanded.rs index 9d7f489..10ca8c1 100644 --- a/tests/expand/pinned_drop/struct.expanded.rs +++ b/tests/expand/pinned_drop/struct.expanded.rs @@ -1,5 +1,5 @@ -use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; +use pin_project::{pin_project, pinned_drop}; #[pin(__private(PinnedDrop))] struct Struct<T, U> { #[pin] @@ -78,7 +78,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; @@ -112,6 +112,7 @@ const _: () = { } } }; +#[doc(hidden)] impl<T, U> ::pin_project::__private::PinnedDrop for Struct<T, U> { unsafe fn drop(self: Pin<&mut Self>) { #[allow(clippy::needless_pass_by_value)] diff --git a/tests/expand/pinned_drop/struct.rs b/tests/expand/pinned_drop/struct.rs index 948e6cc..691d3cb 100644 --- a/tests/expand/pinned_drop/struct.rs +++ b/tests/expand/pinned_drop/struct.rs @@ -1,6 +1,7 @@ -use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; +use pin_project::{pin_project, pinned_drop}; + #[pin_project(PinnedDrop)] struct Struct<T, U> { #[pin] diff --git a/tests/expand/pinned_drop/tuple_struct.expanded.rs b/tests/expand/pinned_drop/tuple_struct.expanded.rs index b30ee66..506726c 100644 --- a/tests/expand/pinned_drop/tuple_struct.expanded.rs +++ b/tests/expand/pinned_drop/tuple_struct.expanded.rs @@ -1,5 +1,5 @@ -use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; +use pin_project::{pin_project, pinned_drop}; #[pin(__private(PinnedDrop))] struct TupleStruct<T, U>(#[pin] T, U); #[allow(box_pointers)] @@ -66,7 +66,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; @@ -100,6 +100,7 @@ const _: () = { } } }; +#[doc(hidden)] impl<T, U> ::pin_project::__private::PinnedDrop for TupleStruct<T, U> { unsafe fn drop(self: Pin<&mut Self>) { #[allow(clippy::needless_pass_by_value)] diff --git a/tests/expand/pinned_drop/tuple_struct.rs b/tests/expand/pinned_drop/tuple_struct.rs index a536039..1f4917c 100644 --- a/tests/expand/pinned_drop/tuple_struct.rs +++ b/tests/expand/pinned_drop/tuple_struct.rs @@ -1,6 +1,7 @@ -use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; +use pin_project::{pin_project, pinned_drop}; + #[pin_project(PinnedDrop)] struct TupleStruct<T, U>(#[pin] T, U); diff --git a/tests/expand/project_replace/struct.expanded.rs b/tests/expand/project_replace/struct.expanded.rs index 476c0ab..d3ed9e4 100644 --- a/tests/expand/project_replace/struct.expanded.rs +++ b/tests/expand/project_replace/struct.expanded.rs @@ -111,7 +111,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/project_replace/tuple_struct.expanded.rs b/tests/expand/project_replace/tuple_struct.expanded.rs index 0026a9f..91077f3 100644 --- a/tests/expand/project_replace/tuple_struct.expanded.rs +++ b/tests/expand/project_replace/tuple_struct.expanded.rs @@ -96,7 +96,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/pub/struct.expanded.rs b/tests/expand/pub/struct.expanded.rs index 246d9b6..7e6b975 100644 --- a/tests/expand/pub/struct.expanded.rs +++ b/tests/expand/pub/struct.expanded.rs @@ -77,7 +77,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/pub/tuple_struct.expanded.rs b/tests/expand/pub/tuple_struct.expanded.rs index 033fbaf..48355e3 100644 --- a/tests/expand/pub/tuple_struct.expanded.rs +++ b/tests/expand/pub/tuple_struct.expanded.rs @@ -65,7 +65,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; diff --git a/tests/expand/unsafe_unpin/struct.expanded.rs b/tests/expand/unsafe_unpin/struct.expanded.rs index 4066d49..76f4e52 100644 --- a/tests/expand/unsafe_unpin/struct.expanded.rs +++ b/tests/expand/unsafe_unpin/struct.expanded.rs @@ -77,7 +77,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) { let _ = &this.pinned; let _ = &this.unpinned; diff --git a/tests/expand/unsafe_unpin/tuple_struct.expanded.rs b/tests/expand/unsafe_unpin/tuple_struct.expanded.rs index 59a40da..a0a52a8 100644 --- a/tests/expand/unsafe_unpin/tuple_struct.expanded.rs +++ b/tests/expand/unsafe_unpin/tuple_struct.expanded.rs @@ -65,7 +65,7 @@ const _: () = { } } } - #[forbid(safe_packed_borrows)] + #[forbid(unaligned_references, safe_packed_borrows)] fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) { let _ = &this.0; let _ = &this.1; |