Skip to content

Too strict trait bound for Pin::map_unchecked(_mut) #67669

New issue

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

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

Already on GitHub? # to your account

Closed
Thomasdezeeuw opened this issue Dec 27, 2019 · 0 comments · Fixed by #67935
Closed

Too strict trait bound for Pin::map_unchecked(_mut) #67669

Thomasdezeeuw opened this issue Dec 27, 2019 · 0 comments · Fixed by #67935
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Thomasdezeeuw
Copy link
Contributor

Most methods on Pin use T: ?Sized to allow the underlying pointer to be dynamically sized. However both Pin::map_unchecked_mut and Pin::map_unchecked have another generic parameter U (the type to map to), which does not contain such (loosening of) trait bound. Is it intentional for U to be Sized, or is this an oversight? In other words would a change to allow U: ?Sized for the above mentioned methods be accepted?

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Dec 27, 2019
Centril added a commit to Centril/rust that referenced this issue Jan 9, 2020
…tboats

Relax the Sized bounds on Pin::map_unchecked(_mut)

Fixes rust-lang#67669.
Centril added a commit to Centril/rust that referenced this issue Jan 9, 2020
…tboats

Relax the Sized bounds on Pin::map_unchecked(_mut)

Fixes rust-lang#67669.
@bors bors closed this as completed in ee90f09 Jan 9, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants