# Placement NWBI\<- FAQ (New/Box/In/Left Arrow)

**URL:** <https://internals.rust-lang.org/t/placement-nwbi-faq-new-box-in-left-arrow/2789>\
**Category:** language design\
**Created:** [October 14, 2015, 12:51pm UTC](https://internals.rust-lang.org/t/placement-nwbi-faq-new-box-in-left-arrow/2789 "2015-10-14T12:51:43Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![vadimcn](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/vadimcn/32/2789_2.png) [@vadimcn](https://internals.rust-lang.org/u/vadimcn)\
**Post date:** [February 29, 2016, 5:53am UTC](https://internals.rust-lang.org/t/placement-nwbi-faq-new-box-in-left-arrow/2789/19 "2016-02-29T05:53:17Z")

</div>

Having recently re-read this FAQ, I've developed a couple of new-ish thoughts 🙂:

> [@pnkfelix](#):
>
> Ignoring the issue that this relies on return-value optimization actually kicking in (which @pnkfelix found to not be generally reliable, and in any case we wouldn't want debug builds to differ so much in runtime behavior that they could e.g. stack overflow with ease)

I don't see how this could work without relying on RVO. What if the VALUE is a function call? IIRC, the idea was that large values are returned by pointer into the caller-allocated space anyways, so all that `box` expression needs to do is ensure that pointer passed to the callee is the one returned by the placer. Why wouldn't this work with closures?

> [@pnkfelix](#):
>
> the most obvious place where this completely falls down is that it does not do the right thing for something like this:
> 
> let b: Handle\<T\> = placer \<- try!(run\_code()
> 
> because under the once-function desugaring, that gets turned into something like:
> 
> placer.make\_place(|| -\> T { try!(run\_code()) })

Yeah, but if `run_code()` returns `Result<T,E>`, how can we avoid creating a temporary value for it? We can't put it into the memory allocated by the placer, since `Result<T,..>` is larger than T (in most cases), so it'd have to go on the stack, which kinda defeats the whole purpose of using placement operator...

---

_[View the full topic](https://internals.rust-lang.org/t/placement-nwbi-faq-new-box-in-left-arrow/2789)._
