Skip to content

Commit

Permalink
Inline project methods
Browse files Browse the repository at this point in the history
  • Loading branch information
EFanZh committed Mar 4, 2023
1 parent 8a8b6e0 commit 8147ab9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ macro_rules! __pin_project_struct_make_proj_method {
),+
}
) => {
#[inline]
$proj_vis fn $method_ident<'__pin>(
self: $crate::__private::Pin<&'__pin $($mut)? Self>,
) -> $proj_ty_ident <'__pin, $($ty_generics)*> {
Expand Down Expand Up @@ -969,6 +970,7 @@ macro_rules! __pin_project_struct_make_proj_replace_method {
),+
}
) => {
#[inline]
$proj_vis fn project_replace(
self: $crate::__private::Pin<&mut Self>,
replacement: Self,
Expand Down Expand Up @@ -1016,6 +1018,7 @@ macro_rules! __pin_project_enum_make_proj_method {
),+
}
) => {
#[inline]
$proj_vis fn $method_ident<'__pin>(
self: $crate::__private::Pin<&'__pin $($mut)? Self>,
) -> $proj_ty_ident <'__pin, $($ty_generics)*> {
Expand Down Expand Up @@ -1059,6 +1062,7 @@ macro_rules! __pin_project_enum_make_proj_replace_method {
),+
}
) => {
#[inline]
$proj_vis fn project_replace(
self: $crate::__private::Pin<&mut Self>,
replacement: Self,
Expand Down Expand Up @@ -1565,6 +1569,7 @@ pub mod __private {
}

impl<T> Drop for UnsafeOverwriteGuard<T> {
#[inline]
fn drop(&mut self) {
// SAFETY: the caller of `UnsafeOverwriteGuard::new` must guarantee
// that `target` is valid for writes when this guard is destructed.
Expand Down

0 comments on commit 8147ab9

Please sign in to comment.