-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Make PinCoerceUnsized require Deref #149218
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
f921d32 to
f4fa919
Compare
|
@bors try |
Make PinCoerceUnsized require Deref
This comment has been minimized.
This comment has been minimized.
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
I added these impls because otherwise the introduction of |
|
🎉 Experiment
Footnotes
|
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
This comment has been minimized.
This comment has been minimized.
397d9cf to
b0f5a87
Compare
This comment has been minimized.
This comment has been minimized.
b0f5a87 to
2d1fe43
Compare
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
Crater results are clean. Which team does this need an FCP with? |
|
☔ The latest upstream changes (presumably #150115) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Probably T-lang? |
Also, delete impls on non-Deref types. Pin doesn't do anything useful for non-Deref types, so PinCoerceUnsized on such types makes no sense. This is a breaking change, since stable code can observe the deleted `PinCoerceUnsized` impls by uselessly coercing between such types inside a `Pin`. There is still some strange behavior, such as `Pin<&mut i32>` being able to coerce to `Pin<&dyn Send>`, but not being able to coerce to `Pin<&i32>`. However, I don't think it's possible to fix this. Fixes rust-lang#145081
2d1fe43 to
969c3df
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Also, delete impls on non-Deref types.
Pin doesn't do anything useful for non-Deref types, so PinCoerceUnsized on such types makes no sense.
This is a breaking change, since stable code can observe the deleted
PinCoerceUnsizedimpls by uselessly coercing between such types inside aPin.There is still some strange behavior, such as
Pin<&mut i32>being able to coerce toPin<&dyn Send>, but not being able to coerce toPin<&i32>. However, I don't think it's possible to fix this.Fixes #145081