<story><title>Rust 1.47</title><url>https://blog.rust-lang.org/2020/10/08/Rust-1.47.html</url></story><parent_chain><item><author>k__</author><text>What does &amp;quot;becoming const&amp;quot; mean?</text></item><item><author>adamch</author><text>It&amp;#x27;s a little thing, but one of my favourite parts of any Rust release is seeing which stdlib functions become `const`. The ergonomics of build-time evaluation are slowly improving, and I&amp;#x27;m very excited to slowly do less at runtime!</text></item></parent_chain><comment><author>mden</author><text>Const values are inlined at compile time wherever they are used.&lt;p&gt;Const functions let you run code to define const values. This code will be run at compile time before the const values are inlined.&lt;p&gt;For example let&amp;#x27;s say you have a constant for PI but you need 2*PI. You could do the multiplication in const context, meaning the multiplication will happen during compilation and not execution. Slowly more and more of the language is becoming usable in const context so more advanced things can be done during compile time.</text></comment>
<story><title>Rust 1.47</title><url>https://blog.rust-lang.org/2020/10/08/Rust-1.47.html</url></story><parent_chain><item><author>k__</author><text>What does &amp;quot;becoming const&amp;quot; mean?</text></item><item><author>adamch</author><text>It&amp;#x27;s a little thing, but one of my favourite parts of any Rust release is seeing which stdlib functions become `const`. The ergonomics of build-time evaluation are slowly improving, and I&amp;#x27;m very excited to slowly do less at runtime!</text></item></parent_chain><comment><author>dahfizz</author><text>&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;doc.rust-lang.org&amp;#x2F;reference&amp;#x2F;items&amp;#x2F;functions.html#const-functions&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;doc.rust-lang.org&amp;#x2F;reference&amp;#x2F;items&amp;#x2F;functions.html#con...&lt;/a&gt;&lt;p&gt;Basically, const functions can be used in places regular functions can&amp;#x27;t because they are directly &amp;quot;run&amp;quot; by the compiler at compile time.</text></comment>