title: What casts are allowed with `as`?
body: <p><a href="https://doc.rust-lang.org/book/casting-between-types.html">The Rust Book section on the <code>as</code> operator</a> currently says</p>
  
  <blockquote>
    <p>The as keyword does basic casting:</p>
  </blockquote>
  
  <pre><code>let x: i32 = 5;
  
  let y = x as i64;
  </code></pre>
  
  <blockquote>
    <p>It only allows certain kinds of casting, however.</p>
  </blockquote>
  
  <p>What are those <em>certain kinds</em> of allowed casting?</p>
  
  <p>A since-deleted answer here explained that sometimes you need to chain multiple <code>as</code>-casts to accomplish a safe result, that can't be done in a single step. When is that necessary?</p>