-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add From
impls for wrapper types
#146013
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: master
Are you sure you want to change the base?
Add From
impls for wrapper types
#146013
Conversation
- `From<T> for ThinBox<T>` - `From<T> for UniqueRc<T>` - `From<T> for UniqueArc<T>` - `From<T> for ManuallyDrop<T>` - `From<T> for AssertUnwindSafe<T>`
rustbot has assigned @Mark-Simulacrum. Use |
@rustbot label +needs-crater |
Error: Label needs-crater can only be set by Rust team members Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip. |
This comment has been minimized.
This comment has been minimized.
@bors try |
This comment has been minimized.
This comment has been minimized.
Add `From` impls for wrapper types
@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 |
🎉 Experiment
Footnotes
|
I haven't been able to review all the regressions yet. But from the few I spot-checked: most are spurious (filesystem errors), but a few are not. All the real regressions I saw were due to the |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Alright… now we can retry crater |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
We probably only need to regressions from the first run, but I'm not sure if it's the same |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@craterbot name=pr-146013-1 mode=check-only crates=https://crater-reports.s3.amazonaws.com/pr-146013/retry-regressed-list.txt |
📝 Configuration of the ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
Footnotes
|
No regressions 🎉 |
There's has been no issue discussing this, no ACP. Can you add some motivation why these are needed, why those trait bounds are on there and so on? |
These are for consistency with the existing The |
This makes things a bit unconvincing for the In any case, the bounds here would be good to cover in a doc comment to remove the guesswork. |
3434856
to
2f88698
Compare
Probably not very. But it could come up when constructing a type like union Foo<T> {
// `ManuallyDrop` needed because it’s a union and `T` has no `Copy` bound
field: ManuallyDrop<T>,
// ...
}
I don’t see it as any worse than all the other wrapper type |
From<T: Copy> for ManuallyDrop<T>
From<T: UnwindSafe> for AssertUnwindSafe<T>
From<T> for LazyCell<T, F>
From<T> for LazyLock<T, F>
From<T> for ThinBox<T>
(unstable)From<T> for UniqueRc<T>
(unstable)From<T> for UniqueArc<T>
(unstable)@rustbot label T-libs-api needs-fcp
Also needs a crater run, as the insta-stable impls are technically breaking changes.