<story><title>What&apos;s a reference in Rust?</title><url>https://jvns.ca/blog/2017/11/27/rust-ref/</url></story><parent_chain></parent_chain><comment><author>kibwen</author><text>&lt;i&gt;&amp;gt; In Rust, a boxed pointer sometimes includes an extra word (a “vtable pointer”) and sometimes don’t. It depends on whether the T in Box&amp;lt;T&amp;gt; is a type or a trait. Don’t ask me more, I do not know more.&lt;/i&gt;&lt;p&gt;For those wanting to know more about this, the idea is that types whose size is unknown at compile-time receive this two-word representation. I tend to refer to these as &amp;quot;fat pointers&amp;quot;, which is terminology from Cyclone (though Cyclone&amp;#x27;s fat pointers serve a different purpose). More documentation on these can be found at &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;doc.rust-lang.org&amp;#x2F;beta&amp;#x2F;nomicon&amp;#x2F;exotic-sizes.html#dynamically-sized-types-dsts&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;doc.rust-lang.org&amp;#x2F;beta&amp;#x2F;nomicon&amp;#x2F;exotic-sizes.html#dyn...&lt;/a&gt; and in the section in the book on slices (terminology taken from Go, whose slices are similar though with an extra word) &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;doc.rust-lang.org&amp;#x2F;book&amp;#x2F;second-edition&amp;#x2F;ch04-03-slices.html#string-slices&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;doc.rust-lang.org&amp;#x2F;book&amp;#x2F;second-edition&amp;#x2F;ch04-03-slices...&lt;/a&gt;</text></comment>
<story><title>What&apos;s a reference in Rust?</title><url>https://jvns.ca/blog/2017/11/27/rust-ref/</url></story><parent_chain></parent_chain><comment><author>codefined</author><text>As someone who has just spent the last 15 minutes escaping to HN from Rust due to reference errors, this was amazingly useful and actually helped me fix the error I was getting.</text></comment>