# Pre-RFC: Function Variants

**URL:** <https://internals.rust-lang.org/t/pre-rfc-function-variants/16732>\
**Category:** language design\
**Created:** [June 1, 2022, 10:55pm UTC](https://internals.rust-lang.org/t/pre-rfc-function-variants/16732 "2022-06-01T22:55:24Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [June 2, 2022, 1:21am UTC](https://internals.rust-lang.org/t/pre-rfc-function-variants/16732/7 "2022-06-02T01:21:07Z")

</div>

> [@dpaoliello](#):
>
> `pin` is missing a bunch of permutations, do we really want to add another 10 functions to cover everything?

`Box::pin(x)` is a helper for `Pin::from(Box::new(x))` and doesn't have any performance considerations over the longer spelling, just ~~a safety advantage. Those using an uninit new necessarily are doing unsafe to initialize the place, so it seems fine to require to unsafely pin the pointee. The one place it might reduce `unsafe` usage is with `try_new`, since "`try_pin`" wouldn't require using `unsafe`, but fallible allocation (in the global allocator) is a niche operation (due to how OOM works on the major OSes) anyway.~~

EDIT: ninjad by @steffahn pointing out the safe `From` conversion

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-function-variants/16732)._
