<p dir="auto">Any <code class="notranslate">enum</code> type that references itself in a constructor appears to cause the compiler to run out of stack.  As a simple example, here's <code class="notranslate">ll.rs</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum list { nil, cons(int, list) }
fn main() {}"><pre class="notranslate"><code class="notranslate">enum list { nil, cons(int, list) }
fn main() {}
</code></pre></div>
<p dir="auto">On compiling with backtrace:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ RUST_LOG=rustc=0,::rt::backtrace rustc ll.rs
rust: task eaed20 ran out of stack
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7f44bdd105f5]
/usr/local/bin/../lib/librustrt.so(+0x199b5)[0x7f44bdd109b5]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task9new_stackEmPvm+0x3c)[0x7f44bdd10d1c]
/usr/local/bin/../lib/librustrt.so(upcall_s_new_stack+0x1d)[0x7f44bdd1305d]
/usr/local/bin/../lib/librustrt.so(+0x2cd39)[0x7f44bdd23d39]
/usr/local/bin/../lib/librustrt.so(upcall_new_stack+0x42)[0x7f44bdd14192]
/usr/local/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(+0x5d7d5)[0x7f44be6517d5]
/usr/local/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(_ZN3map7chained3get17_b22fd9d6e1cb5e02E+0x1dd)[0x7f44be62173d]
/usr/local/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(+0x4ee94)[0x7f44be642e94]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty12tag_variants17_438379e850418683E+0x5c)[0x7f44be06e0bc]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_ebae492368cb31bcE+0xa5)[0x7f44be060fb5]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_ebae492368cb31bcE+0x27d)[0x7f44be06118d]
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', src/comp/driver/rustc.rs:176
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7f44bdd105f5]
/usr/local/bin/../lib/librustrt.so(+0x2cd39)[0x7f44bdd23d39]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x39)[0x7f44bdd13ad9]
rustc[0x405222]
rustc[0x40545c]
/usr/local/bin/../lib/librustrt.so(task_start_wrapper+0x32)[0x7f44bdd0f812]
rust: domain main @0xe9cc60 root task failed
$ rustc --version
rustc 0.1
host: x86_64-unknown-linux-gnu
$"><pre class="notranslate">$ RUST_LOG=rustc=0,::rt::backtrace rustc ll.rs
rust: task eaed20 ran out of stack
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7f44bdd105f5]
/usr/local/bin/../lib/librustrt.so(+0x199b5)[0x7f44bdd109b5]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task9new_stackEmPvm+0x3c)[0x7f44bdd10d1c]
/usr/local/bin/../lib/librustrt.so(upcall_s_new_stack+0x1d)[0x7f44bdd1305d]
/usr/local/bin/../lib/librustrt.so(+0x2cd39)[0x7f44bdd23d39]
/usr/local/bin/../lib/librustrt.so(upcall_new_stack+0x42)[0x7f44bdd14192]
/usr/local/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(+0x5d7d5)[0x7f44be6517d5]
/usr/local/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(_ZN3map7chained3get17_b22fd9d6e1cb5e02E+0x1dd)[0x7f44be62173d]
/usr/local/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(+0x4ee94)[0x7f44be642e94]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty12tag_variants17_438379e850418683E+0x5c)[0x7f44be06e0bc]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_ebae492368cb31bcE+0xa5)[0x7f44be060fb5]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_ebae492368cb31bcE+0x27d)[0x7f44be06118d]
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail <span class="pl-s"><span class="pl-pds">'</span>explicit failure<span class="pl-pds">'</span></span>, src/comp/driver/rustc.rs:176
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7f44bdd105f5]
/usr/local/bin/../lib/librustrt.so(+0x2cd39)[0x7f44bdd23d39]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x39)[0x7f44bdd13ad9]
rustc[0x405222]
rustc[0x40545c]
/usr/local/bin/../lib/librustrt.so(task_start_wrapper+0x32)[0x7f44bdd0f812]
rust: domain main @0xe9cc60 root task failed
$ rustc --version
rustc 0.1
host: x86_64-unknown-linux-gnu
$</pre></div>
<p dir="auto">(There appears to be many issues similar to this but I lack the expertise to determine whether they are the same bug.  Those issues include <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1286474" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/742" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/742/hovercard" href="https://github.com/rust-lang/rust/issues/742">#742</a>.  Is <code class="notranslate">tag</code> an old keyword for <code class="notranslate">enum</code>?  My compiler doesn't know about it.)</p>
<p dir="auto">The <code class="notranslate">net</code> module has a few things which I would like to consider improving:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Must the <code class="notranslate">Acceptor</code> and <code class="notranslate">Listener</code> traits exists? It's a shame having to import the traits just to make a simple server.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Does the layout make sense? <code class="notranslate">std::io::net::ip</code> is quite long. Possibly a top-level <code class="notranslate">net</code> module? Possibly shorten using reexports?</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> What more needs to be exported? The current primitives implement the basic Reader/Writer traits, but not much beyond that. There are many methods provided by librustuv/libnative which are not exported. Need to make sure the signatures are correct.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> "Unix pipes" are not unix pipes on windows (they are named pipes)</li>
</ul>
<p dir="auto">Wish list</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">TcpStream::open("google.com:80")</code> does not work</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I can clone a tcp stream, but I cannot close that duplicate tcp stream (from my owned stream)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Creating a server is quite wordy. There are a number of imports, lots of ip addr configuration, lots of listening/accepting, etc.</li>
</ul>
<p dir="auto">Nominating, I believe it is quite important to have a solid networking story.</p>