<p dir="auto"><code class="notranslate">io::Error</code> can't implement <code class="notranslate">Clone</code> right now because it uses a trait object internally for custom errors. With <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66742065" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/24133" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/24133/hovercard" href="https://github.com/rust-lang/rust/pull/24133">#24133</a> adding the <code class="notranslate">Sync</code> bound, it becomes possible to put <code class="notranslate">io::Error</code> in <code class="notranslate">Arc</code>. But it would still be nice to be able to <code class="notranslate">Clone</code> it again, which could be accomplished by changing the private <code class="notranslate">Box&lt;Custom&gt;</code> field to <code class="notranslate">Arc&lt;Custom&gt;</code> instead.</p>
<p dir="auto">The <code class="notranslate">Cell::as_unsafe_cell</code> and <code class="notranslate">RefCell::as_unsafe_cell</code> methods return a reference to the underlying <code class="notranslate">UnsafeCell</code> in both cases.</p>
<p dir="auto">It's not clear what the use cases are for these methods and whether they can be achieved in some alternative way. If you are using these methods, please leave a comment with your use case.</p>