title: How to declare an array of structs and initialize it later?
body: <p>I have a struct:</p>
  <pre class="lang-rust prettyprint-override"><code>struct Point {
      x: u32,
      y: u32,
  }
  </code></pre>
  <p>I want to have two <code>Point</code>s in two different variables. I want to <strong>declare them first and initialize later</strong>. It works fine with separate values:</p>
  <pre class="lang-rust prettyprint-override"><code>let p0: Point;
  let p1: Point;
  
  p0 = Point { x: 1, y: 2 };
  p1 = Point { x: 2, y: 3 };
  </code></pre>
  <p>I want to do the same but with an array:</p>
  <pre class="lang-rust prettyprint-override"><code>let p: [Point; 2];
  
  p[0] = Point { x: 1, y: 2 };
  p[1] = Point { x: 2, y: 3 };
  </code></pre>
  <p>Doesn't work as I get a compilation error:</p>
  <pre class="lang-none prettyprint-override"><code>error[E0381]: use of possibly-uninitialized variable: `p`
   --&gt; src/main.rs:9:5
    |
  9 |     p[0] = Point { x: 1, y: 2 };
    |     ^^^^ use of possibly-uninitialized `p`
  </code></pre>
  <p>Why does it behave differently for single variables and arrays? Can I do it without using <code>Default::default()</code>?</p>