Compiling natram v0.1.0 (/home/vi/code/natram) error: internal compiler error: src/librustc/hir/map/mod.rs:1031: no name for expr move || { let server_addr = server_addr; let name = name; let pco = pco; let cs = cs; { let _t = { let sendaddr = pco.sendto; let bindaddr = match pco.bind { Some(x) => { x } _ => { match pco.sendto { Some(SocketAddr::V4(st)) => { match { let _t = st.ip().is_loopback(); _t } { true => { "127.0.0.1:0".parse().unwrap() } _ => { "0.0.0.0:0".parse().unwrap() } } } _ => { "0.0.0.0:0".parse().unwrap() } } } }; let keepalive_interval = Duration::from_secs(cs.keepalive_interval); let client = match ::std::ops::Try::into_result(match UdpSocket::bind(bindaddr) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }) { ::std::result::Result::Err(err) => #[allow(unreachable_code)] return ::std::ops::Try::from_error(::std::convert::From::from(err)), ::std::result::Result::Ok(val) => #[allow(unreachable_code)] val, }; let mut server = match ::std::ops::Try::into_result(match UdpSocket::bind("0.0.0.0:0".parse::().unwrap()) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }) { ::std::result::Result::Err(err) => #[allow(unreachable_code)] return ::std::ops::Try::from_error(::std::convert::From::from(err)), ::std::result::Result::Ok(val) => #[allow(unreachable_code)] val, }; match ::std::ops::Try::into_result(match server.connect(server_addr) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }) { ::std::result::Result::Err(err) => #[allow(unreachable_code)] return ::std::ops::Try::from_error(::std::convert::From::from(err)), ::std::result::Result::Ok(val) => #[allow(unreachable_code)] val, }; struct Port { u_rx: RecvHalf, u_tx: SendHalf, p: u16, } let mut sanity_limit: usize = 65536; let mut ports: Vec = Vec::with_capacity(cs.num_ports); let mut rnd = rand::thread_rng(); use rand::RngCore; loop { let p: u16 = (rnd.next_u32() & 65535) as u16; match { let _t = p <= 1024; _t } { true => { continue ; } _ => { } } let nullip = std::net::Ipv4Addr::UNSPECIFIED; match match UdpSocket::bind(SocketAddr::V4(std::net::SocketAddrV4::new(nullip, p))) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Ok(u) => { let (u_rx, u_tx) = u.split(); ports.push(Port{u_rx, u_tx, p,}); } _ => { } } match { let _t = ports.len() == cs.num_ports; _t } { true => { break ; } _ => { } } sanity_limit -= 1; match { let _t = sanity_limit == 0; _t } { true => { break ; } _ => { } } } match { let _t = ports.is_empty(); _t } { true => { match ::std::ops::Try::into_result(Err("Failed to open any ports for communication")) { ::std::result::Result::Err(err) => #[allow(unreachable_code)] return ::std::ops::Try::from_error(::std::convert::From::from(err)), ::std::result::Result::Ok(val) => #[allow(unreachable_code)] val, }; } _ => { } } let mut advertisment = OutgoingControlMessage{na: name, ports: ports.iter().map(|pp| pp.p ^ PORT_MASK).collect(), disc: true,}; let mut advertisment_b = match ::std::ops::Try::into_result(serde_cbor::to_vec(&advertisment)) { ::std::result::Result::Err(err) => #[allow(unreachable_code)] return ::std::ops::Try::from_error(::std::convert::From::from(err)), ::std::result::Result::Ok(val) => #[allow(unreachable_code)] val, }; let (mut client_rx, mut client_tx) = client.split(); let (mut servrecv, mut servsend) = server.split(); let (mut triggeradvsend, mut triggeradvsend_h) = channel::<()>(1); let mut triggeradvsend2 = triggeradvsend.clone(); let (mut commactor, mut commactor_h) = channel::(32); use unzip3::Unzip3; let (ports_tx, ports_rx, port_numbers): (Vec, Vec, Vec) = ports.into_iter().map(|pp| (pp.u_tx, pp.u_rx, pp.p)).unzip3(); let mut commactor_st = CommunicationActorState{ports: ports_tx, client_tx, client_peer: sendaddr, port_statuses: ::alloc::vec::from_elem(Default::default(), port_numbers.len()), max_norecv_time: Duration::from_secs(cs.keepalive_interval * 2),}; tokio::spawn(::std::future::from_generator(move || { loop { match match commactor_h.recv() { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Some(msg) => { match match commactor_st.msg(msg) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Err(e) => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["Error: ", "\n"], &match (&e,) { (arg0,) => [::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt)], })); }; } _ => { } } } _ => break , } } })); /// Data port receivers: { let _t = match ::std::iter::IntoIterator::into_iter(ports_rx.into_iter().enumerate()) { mut iter => loop { let mut __next; match ::std::iter::Iterator::next(&mut iter) { ::std::option::Option::Some(val) => __next = val, ::std::option::Option::None => break , } let (i, mut u_rx) = __next; { let mut commactor = commactor.clone(); tokio::spawn(::std::future::from_generator(move || { loop { let mut buf = [0u8; 2048]; match match u_rx.recv_from(&mut buf) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Err(e) => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["Error receiving from data port: ", "\n"], &match (&e,) { (arg0,) => [::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt)], })); }; match tokio::time::delay_for(Duration::from_millis(100)) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; continue ; } Ok((len, from)) => { let _ = match commactor.send(CommunicationActorMessage::PortData(i, buf[::std::ops::Range{start: 0, end: len,}].to_vec(), from)) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; } } } })); } }, }; _t }; let mut commactor2 = commactor.clone(); tokio::spawn(::std::future::from_generator(move || { loop { let mut buf = [0u8; 2048]; let mut last_known_peeraddr: Option = None; match match client_rx.recv_from(&mut buf[::std::ops::RangeFull]) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Err(e) => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["error receiving from client: ", "\n"], &match (&e,) { (arg0,) => [::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt)], })); }; match tokio::time::delay_for(Duration::from_millis(33)) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; continue ; } Ok((len, from)) => { match sendaddr { Some(forcedaddr) => { match { let _t = from != forcedaddr; _t } { true => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["Dropping foreign message to client port\n"], &match () { () => [], })); }; continue ; } _ => { } } } _ => { match { let _t = last_known_peeraddr != Some(from); _t } { true => { last_known_peeraddr = Some(from); let _ = match commactor2.send(CommunicationActorMessage::NewClientPeerAddress(from)) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; } _ => { } } } } let _ = match commactor2.send(CommunicationActorMessage::ClientData(buf[::std::ops::Range{start: 0, end: len,}].to_vec())) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; } } } })); /// Handler of incoming adverts tokio::spawn(::std::future::from_generator(move || { loop { let mut buf = [0u8; 2048]; let len = match match servrecv.recv(&mut buf[::std::ops::RangeFull]) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Err(e) => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["error receiving from server: ", "\n"], &match (&e,) { (arg0,) => [::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt)], })); }; match tokio::time::delay_for(Duration::from_millis(50)) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; continue ; } Ok(x) => x, }; let msg: IncomingControlMessage = match serde_cbor::from_slice(&buf[::std::ops::Range{start: 0, end: len,}]) { Err(e) => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["Error decoding from server: ", "\n"], &match (&e,) { (arg0,) => [::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt)], })); }; continue ; } Ok(x) => x, }; match { let _t = msg.disc; _t } { true => { let _ = match triggeradvsend2.send(()) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; } _ => { } } let _ = match commactor.send(CommunicationActorMessage::ControlMessage(msg)) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; } })); tokio::spawn(::std::future::from_generator(move || { let mut first = true; loop { match match triggeradvsend_h.recv() { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Some(()) => { match match servsend.send(&advertisment_b[::std::ops::RangeFull]) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, } { Err(e) => { { ::std::io::_eprint(::core::fmt::Arguments::new_v1(&["Error sending advert to server: ", "\n"], &match (&e,) { (arg0,) => [::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt)], })); }; } _ => { } } match { let _t = first; _t } { true => { first = false; advertisment.disc = false; advertisment_b = serde_cbor::to_vec(&advertisment).unwrap(); } _ => { } } } _ => break , } } })); let mut ticker = tokio::time::interval(Duration::from_secs(cs.keepalive_interval)); loop { match ticker.tick() { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }; match ::std::ops::Try::into_result(match triggeradvsend.send(()) { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { ::std::pin::Pin::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result , ::std::task::Poll::Pending => { } } yield (); }, }) { ::std::result::Result::Err(err) => #[allow(unreachable_code)] return ::std::ops::Try::from_error(::std::convert::From::from(err)), ::std::result::Result::Ok(val) => #[allow(unreachable_code)] val, }; } }; _t } } (hir_id=HirId { owner: DefIndex(71), local_id: 2673 }) thread 'rustc' panicked at 'Box', src/librustc_errors/lib.rs:892:9 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print_fmt at src/libstd/sys_common/backtrace.rs:84 3: ::fmt at src/libstd/sys_common/backtrace.rs:61 4: core::fmt::write at src/libcore/fmt/mod.rs:1025 5: std::io::Write::write_fmt at src/libstd/io/mod.rs:1426 6: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:65 7: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:50 8: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:193 9: std::panicking::default_hook at src/libstd/panicking.rs:210 10: rustc_driver::report_ice 11: as core::ops::function::Fn>::call at /rustc/3eeb8d4f2fbae0bb1c587d00b5abeaf938da47f4/src/liballoc/boxed.rs:1036 12: proc_macro::bridge::client::::enter::{{closure}}::{{closure}} at /rustc/3eeb8d4f2fbae0bb1c587d00b5abeaf938da47f4/src/libproc_macro/bridge/client.rs:305 13: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:475 14: std::panicking::begin_panic 15: rustc_errors::HandlerInner::bug 16: rustc_errors::Handler::bug 17: rustc::util::bug::opt_span_bug_fmt::{{closure}} 18: rustc::ty::context::tls::with_opt::{{closure}} 19: rustc::ty::context::tls::with_opt 20: rustc::util::bug::opt_span_bug_fmt 21: rustc::util::bug::bug_fmt 22: rustc::hir::map::Map::name 23: rustc::traits::error_reporting::::note_obligation_cause 24: rustc::traits::error_reporting::::report_selection_error 25: rustc::traits::error_reporting::::report_fulfillment_errors 26: rustc_typeck::check::FnCtxt::resolve_generator_interiors 27: rustc::ty::context::tls::with_context::{{closure}} 28: rustc_typeck::check::typeck_tables_of 29: rustc::ty::query::::compute 30: rustc::dep_graph::graph::DepGraph::with_task_impl 31: rustc::ty::query::plumbing::::force_query 32: rustc::ty::query::plumbing::force_from_dep_node 33: rustc::dep_graph::graph::DepGraph::try_mark_previous_green 34: rustc::dep_graph::graph::DepGraph::try_mark_green 35: rustc::dep_graph::graph::DepGraph::try_mark_green_and_read 36: rustc::ty::query::plumbing::::get_query 37: rustc_typeck::collect::type_of 38: rustc::ty::query::__query_compute::type_of 39: rustc::ty::query::::compute 40: rustc::dep_graph::graph::DepGraph::with_task_impl 41: rustc::ty::query::plumbing::::get_query 42: rustc::hir::intravisit::walk_expr 43: rustc::hir::intravisit::Visitor::visit_fn 44: rustc::hir::intravisit::walk_item 45: ::visit_item 46: rustc::hir::map::Map::visit_item_likes_in_module 47: rustc_typeck::collect::collect_mod_item_types 48: rustc::ty::query::__query_compute::collect_mod_item_types 49: rustc::ty::query::::compute 50: rustc::dep_graph::graph::DepGraph::with_task_impl 51: rustc::ty::query::plumbing::::get_query 52: rustc::ty::query::plumbing::::ensure_query 53: rustc_typeck::check_crate::{{closure}}::{{closure}} 54: rustc::util::common::time 55: rustc_typeck::check_crate 56: rustc_interface::passes::analysis 57: rustc::ty::query::__query_compute::analysis 58: rustc::dep_graph::graph::DepGraph::with_task_impl 59: rustc::ty::query::plumbing::::get_query 60: rustc::ty::context::tls::enter_global 61: rustc_interface::interface::run_compiler_in_existing_thread_pool 62: std::thread::local::LocalKey::with 63: scoped_tls::ScopedKey::set 64: syntax::with_globals note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.41.0-nightly (3eeb8d4f2 2019-12-12) running on x86_64-unknown-linux-gnu note: compiler flags: -C debuginfo=2 -C incremental -C link-arg=-fuse-ld=lld --crate-type bin note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [typeck_tables_of] processing `client::client` #1 [typeck_tables_of] processing `client::client::{{closure}}#0` #2 [type_of] processing `client::client::{{closure}}#0` #3 [collect_mod_item_types] collecting item types in module `client` #4 [analysis] running analysis passes on this crate end of query stack error: aborting due to previous error error: could not compile `natram`. To learn more, run the command again with --verbose.