Skip to content

Compiler panic #26511

Closed
Closed
@Xazzzi

Description

@Xazzzi

I'm new to rust, be nice to me ;)

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: run with `RUST_BACKTRACE=1` for a backtrace

I tried this code:

use std::sync::mpsc::channel;
use websocket::{Server,Sender};
let (tx,rx) = channel::<Box<Sender<_>>>();

I expected the channel for passing boxed sendes around to be created, or at least some meaningful error from compiler telling me why what i'm trying to do here is impossible.

Instead, this happened:

src/main.rs:7:19: 7:46 error: internal compiler error: cat_expr Errd
src/main.rs:7     let (tx,rx) = channel::<Box<Sender<_>>>();

Meta

rustc --version --verbose:

rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
binary: rustc
commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e
commit-date: 2015-05-13
build-date: 2015-05-14
host: x86_64-unknown-linux-gnu
release: 1.0.0

Backtrace:

stack backtrace:
   1:     0x7fc40ecc3449 - sys::backtrace::write::hbc46dc0cfb3b9537d4r
   2:     0x7fc40eccb156 - panicking::on_panic::h74d3c14d86c58ac8jrw
   3:     0x7fc40ec8e462 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v
   4:     0x7fc40c2593fd - rt::unwind::begin_unwind::h6365792021826883910
   5:     0x7fc40c259392 - diagnostic::SpanHandler::span_bug::h15654069e1b4ed62EqB
   6:     0x7fc40caf5083 - session::Session::span_bug::h51bebfa939964985ODq
   7:     0x7fc40da9adad - check::regionck::visit_expr::hea39a9609363990fYhd
   8:     0x7fc40da9b247 - check::regionck::visit_local::ha27d5c7a055a259e3ed
   9:     0x7fc40da97d48 - check::regionck::Rcx<'a, 'tcx>::visit_fn_body::hf2385fd1ec2e2fd3pUc
  10:     0x7fc40db11896 - check::check_bare_fn::h1ca89f422d965ecetwn
  11:     0x7fc40db0f6f2 - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h29ccc99d00d684a7wtn
  12:     0x7fc40dbd369a - check_crate::closure.38028
  13:     0x7fc40dbcea30 - check_crate::h22dcd95e17a2d96dXcC
  14:     0x7fc40f207cc8 - driver::phase_3_run_analysis_passes::h43926ceca86caa9fnGa
  15:     0x7fc40f1e8dc5 - driver::compile_input::hb78754f2f33c01efQba
  16:     0x7fc40f2aa4d1 - run_compiler::h258d36d5501c1cdfz4b
  17:     0x7fc40f2a8122 - boxed::F.FnBox<A>::call_box::h7239693171334256553
  18:     0x7fc40f2a7659 - rt::unwind::try::try_fn::h14329119008520845439
  19:     0x7fc40ed3dac8 - rust_try_inner
  20:     0x7fc40ed3dab5 - rust_try
  21:     0x7fc40f2a7908 - boxed::F.FnBox<A>::call_box::h17332056298259451807
  22:     0x7fc40ecca041 - sys::thread::create::thread_start::h490278b5c3c0b49faqv
  23:     0x7fc40954c181 - start_thread
  24:     0x7fc40e91447c - __clone
  25:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions