<p dir="auto">The compiler segfaults on the following program:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="struct X { field: Option&lt;X&gt; }

fn main() { let x = X { field: None }; }"><pre class="notranslate"><code class="notranslate">struct X { field: Option&lt;X&gt; }

fn main() { let x = X { field: None }; }
</code></pre></div>
<p dir="auto">Surprisingly, the following program successfully compiles:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="struct X { field: Option&lt;X&gt; }

fn main(){}"><pre class="notranslate"><code class="notranslate">struct X { field: Option&lt;X&gt; }

fn main(){}
</code></pre></div>
<p dir="auto">The following program causes a stack overflow:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="struct S {
    element: Option&lt;S&gt;
}

fn main() {
}"><pre class="notranslate"><code class="notranslate">struct S {
    element: Option&lt;S&gt;
}

fn main() {
}
</code></pre></div>
<p dir="auto">There is a check that enums do not recurse in this way, but no such check for structs.  (Note, though, that there is a check that structrs are <em>instantiable</em>, which is slightly different)</p>