Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove P: Unpin bound on impl Future for Pin #81363

Merged
merged 4 commits into from
Jul 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update library/core/src/pin.rs
Co-authored-by: Ralf Jung <[email protected]>
  • Loading branch information
jonhoo and RalfJung committed Jun 16, 2021
commit b5e5a182caa6efb7359978a6ff596f403cb4c099
2 changes: 1 addition & 1 deletion library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ impl<'a, P: DerefMut> Pin<&'a mut Pin<P>> {
/// This is a generic method to go from `Pin<&mut Pin<Pointer<T>>>` to `Pin<&mut T>`. It is
/// safe because the existence of a `Pin<Pointer<T>>` ensures that the pointee, `T`, cannot
/// move in the future, and this method does not enable the pointee to move. "Malicious"
/// implementations of `Pointer::DerefMut` are likewise ruled out by the contract of
/// implementations of `P::DerefMut` are likewise ruled out by the contract of
/// `Pin::new_unchecked`.
jonhoo marked this conversation as resolved.
Show resolved Hide resolved
#[unstable(feature = "pin_deref_mut", issue = "none")]
jonhoo marked this conversation as resolved.
Show resolved Hide resolved
#[inline(always)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally use #[inline] and only use #[inline(always)] when really necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used #[inline(always)] because that annotation is used on both as_mut and get_mut, and so it feels like the logic that applies there would apply here, but I could be wrong. Happy to change if preferred.

Expand Down