title: What does it mean for a constant value in Rust to be inlined?
body: <p>The <a href="https://doc.rust-lang.org/1.30.0/book/first-edition/const-and-static.html" rel="nofollow noreferrer">documentation for <code>const</code></a>:</p>
  
  <blockquote>
    <p>Constants live for the entire lifetime of a program. More specifically, constants in Rust have no fixed address in memory. This is because they’re effectively inlined to each place that they’re used. References to the same constant are not necessarily guaranteed to refer to the same memory address for this reason.</p>
  </blockquote>
  
  <p>I've only seen "inline functions" in C++, but never inline constant values. What is a beginner friendly explanation of how this works? </p>
  
  <p>I'm also confused by "no fixed address in memory". Does that mean every time we use a <code>const</code> value, a value on the <em>stack</em> is allocated just for this expression and after the expression is done executing, it'll be <em>destroyed</em>?</p>