<p dir="auto">Introduce <code class="notranslate">Mutable&lt;T&gt;</code> to implement a dynamic mutable slot, with dynamic borrow check, in once place. Obsolete <code class="notranslate">Cell&lt;T&gt;</code> and <code class="notranslate">RcMut&lt;T&gt;</code>  (and what about <code class="notranslate">@mut T</code>? See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15584695" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/7140" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/7140/hovercard" href="https://github.com/rust-lang/rust/issues/7140">#7140</a>)</p>
<p dir="auto">For <code class="notranslate">Mutable&lt;T&gt;</code> use an implementation with wrapped borrowed pointers to allow for both closured-bracketed and "roaming" borrowed pointers.</p>
<p dir="auto"><del>A working test is <a href="https://gist.github.com/anonymous/f007d9b907509c03c17f">https://gist.github.com/anonymous/f007d9b907509c03c17f</a></del></p>
<p dir="auto">Updated, WIP: <a href="https://github.com/blake2-ppc/rust/compare/mutable-t">https://github.com/blake2-ppc/rust/compare/mutable-t</a></p>
<p dir="auto">I'm not sure if this is a bug or not, needs further investigation. It appears that by reusing the fulfillment_cx <a href="https://github.com/jroesch/rust/blob/fulfillment-context-refactor/src/librustc/middle/traits/mod.rs#L452">here</a> we incur more obligations and later trip an <a href="https://github.com/jroesch/rust/blob/fulfillment-context-refactor/src/librustc_typeck/check/regionck.rs#L337">assertion</a>.</p>
<p dir="auto">The two possibilities I see is:<br>
- normalization is not actually fully happening and we have a bug else where<br>
- we are adding a duplicate bound into the list causing its size to change.</p>