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

Change the argument type of project method back to self: Pin<&mut Self> #90

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Sep 11, 2019

Closes #89

@@ -19,8 +19,7 @@ fn project_stmt_expr_nightly() {

let mut baz = Baz::Variant1(1, 2);

let mut baz = Pin::new(&mut baz);
let mut baz = baz.project();
let mut baz = Pin::new(&mut baz).project();
Copy link
Owner Author

Choose a reason for hiding this comment

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

Well, this might be useful too.

@@ -295,30 +291,30 @@ fn lifetime_project() {

impl<T, U> Struct<T, U> {
fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut T> {
self.project_into().pinned
self.project().pinned
Copy link
Owner Author

Choose a reason for hiding this comment

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

I didn't see this as a problem because I know both ways, but it would be easier to do all of this with a single method.

@taiki-e
Copy link
Owner Author

taiki-e commented Sep 18, 2019

bors r+

bors bot added a commit that referenced this pull request Sep 18, 2019
90: Change the argument type of project method back to `self: Pin<&mut Self>` r=taiki-e a=taiki-e

Closes #89


Co-authored-by: Taiki Endo <[email protected]>
@bors
Copy link
Contributor

bors bot commented Sep 18, 2019

Build failed

  • taiki-e.pin-project

@taiki-e
Copy link
Owner Author

taiki-e commented Sep 18, 2019

bors retry

bors bot added a commit that referenced this pull request Sep 18, 2019
90: Change the argument type of project method back to `self: Pin<&mut Self>` r=taiki-e a=taiki-e

Closes #89


Co-authored-by: Taiki Endo <[email protected]>
@bors
Copy link
Contributor

bors bot commented Sep 18, 2019

Build succeeded

  • taiki-e.pin-project

@bors bors bot merged commit 97bc267 into master Sep 18, 2019
@taiki-e taiki-e deleted the pin-self branch September 18, 2019 09:04
This was referenced Sep 18, 2019
bors bot added a commit that referenced this pull request Sep 22, 2019
101: Release 0.4.0-beta.1 r=taiki-e a=taiki-e

Changes:

* [Changed the argument type of project method back to `self: Pin<&mut Self>`.][90]

* [Removed "project_attr" feature and always enable `#[project]` attribute.][94]

* [Removed "renamed" feature.][100]

* [`#[project]` attribute can now be used for `use` statements.][85]

* [Added `project_ref` method and `#[project_ref]` attribute.][93]

* [`#[pin_project]` attribute now determines the visibility of the projection type/method is based on the original type.][96]

cc #21

[85]: #85
[90]: #90
[93]: #93
[94]: #94
[96]: #96
[100]: #100

Co-authored-by: Taiki Endo <[email protected]>
@taiki-e taiki-e added the A-pin-projection Area: #[pin_project] label Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pin-projection Area: #[pin_project]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the argument type of project method back to self: Pin<&mut Self>
1 participant