Skip to content

Instantly share code, notes, and snippets.

@am0d
Created November 15, 2012 00:41
Show Gist options
  • Save am0d/4075881 to your computer and use it in GitHub Desktop.
Save am0d/4075881 to your computer and use it in GitHub Desktop.
Small file showing compiler crash on imports
$ rustc tcp_fail.rs
tcp_fail.rs:3:4: 3:17 error: failed to resolve import
tcp_fail.rs:3 use std::net::ip;
^~~~~~~~~~~~~
tcp_fail.rs:4:4: 4:18 error: failed to resolve import
tcp_fail.rs:4 use std::net::tcp;
^~~~~~~~~~~~~~
error: failed to resolve imports
error: aborting due to 3 previous errors
rust: task failed at 'explicit failure', /home/a_m0d/workspace/rust/rust-git/src/libsyntax/diagnostic.rs:78
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fb4eba8e4bd]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(+0x2cae9)[0x7fb4ebaa1ae9]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(upcall_fail+0x1b0)[0x7fb4eba90b90]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libsyntax-84efebcb12c867a2-0.5.so(_ZN10diagnostic14__extensions__9meth_71285fatal17_d42eeaedcfb9ecd23_05E+0x94)[0x7fb4ec7f3f24]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libsyntax-84efebcb12c867a2-0.5.so(_ZN10diagnostic14__extensions__9meth_713915abort_if_errors16_535a3cb6d6bcfd13_05E+0x204)[0x7fb4ec7f4284]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle7resolve14__extensions__10meth_416697resolve17_f36d57336b8c36143_05E+0xb0)[0x7fb4ebfbe940]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle7resolve13resolve_crate17_e9ef35ba1428dbf13_05E+0x85)[0x7fb4ec0119f5]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6driver6driver12compile_upto17_28e2921617fe484e3_05E+0x1040)[0x7fb4ec36cd00]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(+0x6d6a0c)[0x7fb4ec3a6a0c]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6driver6driver13compile_input16_b5c68085ae125803_05E+0xbb)[0x7fb4ec37054b]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN12run_compiler17_a3efb6d4bbd119a73_05E+0x268a)[0x7fb4ec3a061a]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(+0x6d6a0c)[0x7fb4ec3a6a0c]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(+0x6d5733)[0x7fb4ec3a5733]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(+0x6d478c)[0x7fb4ec3a478c]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x762dd)[0x7fb4ed1162dd]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb32e0)[0x7fb4ed1532e0]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fb4eba8ec64]
rust: task failed at 'explicit failure', /home/a_m0d/workspace/rust/rust-git/src/librustc/rustc.rs:233
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fb4eba8e4bd]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(+0x2cae9)[0x7fb4ebaa1ae9]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(upcall_fail+0x1b0)[0x7fb4eba90b90]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb32e0)[0x7fb4ed1532e0]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN7monitor17_4e515819347a1bb53_05E+0x2ad6)[0x7fb4ec3a37c6]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(+0x6d6a0c)[0x7fb4ec3a6a0c]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN4main17_5d3b7377995f40c33_05E+0x86)[0x7fb4ec3a6616]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fb4eba8ec64]
rust: domain main @0xd78200 root task failed
rust: task failed at 'killed', /home/a_m0d/workspace/rust/rust-git/src/libcore/task.rs:615
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fb4eba8e4bd]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(+0x2cae9)[0x7fb4ebaa1ae9]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(upcall_fail+0x1b0)[0x7fb4eba90b90]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN4task5yield16_9531951b4f79f8b3_05E+0xbd)[0x7fb4ed0ff1bd]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x8dec6)[0x7fb4ed12dec6]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN7private11weaken_task17_3656b542514436883_05E+0xd9)[0x7fb4ed12dd09]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x8dbfb)[0x7fb4ed12dbfb]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb32e0)[0x7fb4ed1532e0]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x8cf02)[0x7fb4ed12cf02]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x8c852)[0x7fb4ed12c852]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x8be66)[0x7fb4ed12be66]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x762dd)[0x7fb4ed1162dd]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb32e0)[0x7fb4ed1532e0]
/home/a_m0d/workspace/rust/rust-git/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fb4eba8ec64]
extern mod std(vers="0.5");
extern mod core(vers="0.5");
use std::net::ip;
use std::net::tcp;
use std::uv_global_loop;
fn main() {
let ip_address = match ip::get_addr("example.com", uv_global_loop::get()) {
Ok(m) => copy m,
_ => fail
}.head();
io::println(fmt!("%?", ip_address));
let _ = {
let connection = tcp::connect(move ip_address, 80, uv_global_loop::get());
if connection.is_ok() {
move result::unwrap(move connection)
} else {
return
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment